Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

Closed Unassigned: Polygon with hole [63600]

$
0
0
Hello
I am sorry for my English
I have short fragment of code

```
static void Main(string[] args)
{
FeatureSet fs = new FeatureSet(FeatureType.Polygon);
fs.Projection = KnownCoordinateSystems.Geographic.World.WGS1984;
List<Coordinate> coorBig = new List<Coordinate> { new Coordinate(0, 0), new Coordinate(0, 100), new Coordinate(100, 100), new Coordinate(100, 0) };
List<Coordinate> coordCenter = new List<Coordinate> { new Coordinate(25, 25), new Coordinate(25, 75), new Coordinate(75, 75), new Coordinate(75, 25) };

LinearRing lr1 = new LinearRing(coorBig);
LinearRing[] lr2 = { new LinearRing(coordCenter) };
Polygon pgHole = new Polygon(lr1, lr2);

fs.AddFeature(pgHole);
fs.SaveAs("C:\\Temp\\testD.shp", true);
}
```

When I open this shape file, I see multipolygon instead polygon this hole. Could somebody help me, what I did wrong? Thanks for your help.
Comments: Not an issue

Viewing all articles
Browse latest Browse all 3973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>