GeoJSON-Net / GeoJSON.Net.Contrib

Repository for all GeoJSON.Net *.Contrib projects
MIT License
36 stars 22 forks source link

Add support for 3D geometries to the WKB library #29

Closed stijnherreman closed 4 years ago

stijnherreman commented 4 years ago

This PR adds support for 3D geometries to the WKB library. (fixes #27)

The new code is not always written in an optimal way, but I have tried to keep refactoring to the bare minimum and the existing code has some issues already. I have also fixed the existing unit tests, there were a couple small issues and I needed them working to ensure I didn't break anything. I've done further testing in code that uses this library to ensure that the GeoJSON is generated as expected.

There is a risk of a breaking change here: when mixing 2D and 3D geometries in Multi... types or in GeometryCollection, and when the first geometry is 3D, you may see NaN instead of null for the Z value in both the .NET objects and the GeoJSON. Worst case, there may even be a runtime exception. However, the OGC specification does not allow mixing 2D and 3D geometries, so impact should be somewhere between very low and non-existent.

xfischer commented 4 years ago

Thanks a lot @stijnherreman ! Will release a new package now

stijnherreman commented 4 years ago

Great! After it's released, my README change can be reverted :wink:

xfischer commented 4 years ago

@trevor-thoele @stijnherreman Thanks to both of you guys ! Awesome work. Thanks so much for putting time and effort on this. This is how I like OSS ! NuGet https://www.nuget.org/packages/GeoJSON.Net.Contrib.Wkb/0.1.7 has been released and you have been credited as co-authors.

README updated.