Geographic Information Systems Asked on December 25, 2021
I have a load of GeoJSON which represents roads that are defined as Polygons in the data. I wish to convert them into a simpler representation so as to reduce the amount of noise in the presentation.
Is there any way to do this using the NetTopologySuite?
Polygons can be converted into LineString simply by obtaining his boundary:
IGeometry pol = ...;
IGeometry lineString = pol.Boundary;
Notice that if you have a polygon with holes, the boundary will return a MultiLineString for each part of the polygon. You will have to explode it afterwards to get simple LineStrings.
Answered by César Argul García on December 25, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP