public void RenderContour(
     IPointD2List contourPoints,
     double contourElevation,
     MapDataAnalysis analysis,
     CGpsMapperMapWriter mapWriter)
 {
     foreach (ContourRenderingTemplate template in templates)
     {
         template.RenderContour(contourPoints, contourElevation, analysis, mapWriter);
     }
 }
Example #2
0
        public void RenderPolygon(
            MapMakerSettings mapMakerSettings,
            MapDataAnalysis analysis,
            IPointD2List polygonPoints,
            CGpsMapperMapWriter mapWriter)
        {
            mapWriter.AddSection("POLYGON")
            .AddTypeReference(TypeRegistration)
            .AddCoordinates(
                "Data",
                analysis.HardwareToLogicalLevelDictionary[TypeRegistration.MaxLevel],
                polygonPoints);

            mapWriter
            .Add("EndLevel", analysis.HardwareToLogicalLevelDictionary[TypeRegistration.MinLevel])
            ;
        }
Example #3
0
        public void RenderContour(
            IPointD2List contourPoints,
            double contourElevation,
            MapDataAnalysis analysis,
            CGpsMapperMapWriter mapWriter)
        {
            mapWriter.AddSection("POLYLINE")
            .AddTypeReference(TypeRegistration)
            .AddCoordinates(
                "Data",
                analysis.HardwareToLogicalLevelDictionary[TypeRegistration.MaxLevel],
                contourPoints)
            .Add("EndLevel", analysis.HardwareToLogicalLevelDictionary[TypeRegistration.MinLevel]);

            if (showElevation)
            {
                mapWriter.Add("Label", (int)contourElevation);
            }
        }
Example #4
0
        public CGpsMapperMapWriter AddCoordinates(string parameterName, int level, IPointD2List points)
        {
            StringBuilder line = new StringBuilder();

            line.AppendFormat("{0}{1}=", parameterName, level);

            for (int i = 0; i < points.PointsCount; i++)
            {
                IPointD2 point = points.GetPointD2(i);
                line.AppendFormat(CultureInfo.InvariantCulture,
                                  "({0},{1})",
                                  RenderCoordinateValue(point.Y),
                                  RenderCoordinateValue(point.X));
                if (i < points.PointsCount - 1)
                {
                    line.Append(",");
                }
            }

            AppendLine(line.ToString());

            return(this);
        }