NetTopologySuite / NetTopologySuite.IO.ShapeFile

The ShapeFile IO module for NTS.
33 stars 25 forks source link

How to update existing shape file #72

Closed Zeleksonob closed 1 year ago

Zeleksonob commented 3 years ago

Hi All , I managed to read from a shapefile and create a new shapefile and write to it , but I didn't see any example of how to update existing shapefile features. any can help with this?

Thanks.

DGuidi commented 3 years ago

no specific support for this: you should read the data, modify the features and then write the modified data in a new file

KubaSzostak commented 1 year ago

If you want update feature attributes, then from technical point of view it is possible. DBF records have fixed size, so they can be updated in place. It is not supported by this library, though. If you want update SHP geometry, then it is not possible. Shapefile is a variable-record-length file in which each record describing a shape can have different size. So there is no way to update it in place.