NetTopologySuite / NetTopologySuite.IO.GeoJSON

GeoJSON IO module for NTS.
BSD 3-Clause "New" or "Revised" License
111 stars 46 forks source link

Problem Serializing non-Feature based IFeature s inside a FeatureCollection using NTS.IO.GeoJSON #88

Closed FObermaier closed 2 years ago

FObermaier commented 3 years ago

This question on stackoverflow revealed that there is an issue with serializing IFeature implementing classes that are

The issue is, that FeatureCollectionConverter attempts to copy the features to a Feature[]. The features should be copied to a IFeature[]: https://github.com/NetTopologySuite/NetTopologySuite.IO.GeoJSON/blob/2019c648aa726441cf89ed45cc2ab4b305de3acf/src/NetTopologySuite.IO.GeoJSON/Converters/FeatureCollectionConverter.cs#L45-L48

DGuidi commented 2 years ago

@FObermaier this issue can be closed, right?

FObermaier commented 2 years ago

Fixed with 13fab6fa0ef2ae6d12f763b5ae616f5b7e83cfac