private static GeoPolygon unprojectPolygon(Polygon polygon, GnomonicProjection projection) { GeoPolygon geoPolygon = new GeoPolygon(); foreach (Contour contour in polygon.Contours) { GeoContour geoContour = new GeoContour(); geoContour.Layout = contour.Layout; foreach (ICoordinate p in contour.Vertices) { geoContour.Vertices.Add(unprojectPoint(new PointD(p), projection)); } geoPolygon.Contours.Add(geoContour); } return(geoPolygon); }
private static GeoPolygon unprojectPolygon(Polygon polygon, GnomonicProjection projection) { GeoPolygon geoPolygon = new GeoPolygon(); foreach (Contour contour in polygon.Contours) { GeoContour geoContour = new GeoContour(); geoContour.Layout = contour.Layout; foreach (ICoordinate p in contour.Vertices) geoContour.Vertices.Add(unprojectPoint(new PointD(p), projection)); geoPolygon.Contours.Add(geoContour); } return geoPolygon; }