Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoJson.Text compatibility with *.Contrib converters #16

Open
TheAtomicOption opened this issue May 4, 2022 · 6 comments
Open

GeoJson.Text compatibility with *.Contrib converters #16

TheAtomicOption opened this issue May 4, 2022 · 6 comments

Comments

@TheAtomicOption
Copy link

Currently the nugets in https://github.com/GeoJSON-Net/GeoJSON.Net.Contrib for converting to/from GeoJSON objects only work with GeoJSON.NET. This effectively locks anyone who needs them into the old Newtonsoft.Json libraries.

The most straight forward solution I can see for this is to fork GeoJSON.Net.Contrib to a new GeoJSON.Text.Contrib repo, and modify the using statements to GeoJSON.Text, and create new nugets to match.

@TheAtomicOption
Copy link
Author

TheAtomicOption commented May 5, 2022

Update I've forked the repo myself and renamed everything here: https://github.com/TheAtomicOption/GeoJSON.Text.Contrib

the Wkb compiles and tests correctly.

The MsSqlServer compiles but fails all tests as the testing project can't find the native DLLs

The EntityFramework project compiles, but fail some tests due to not counting coordinates correctly and null not matching NaN for the unused Z dimension.

Since EF Core now uses NetTopologySuite since v2.2 I converted the extension methods in that project to be to/from NTS types.


Feel free to Fork this fork back into a new repo under the GeoJSON-Net user, and create nugets as appropriate

@TheAtomicOption
Copy link
Author

Fixed EF tests

@TheAtomicOption
Copy link
Author

Added explicit reference to System.Data.SqlClient which fixes missing dependency for MsSqlSpatial tests.
Fixed Misc tests by making them use System.Text.Json instead of Newtonsoft.

All tests now pass when run with the last build. However the VS button to run tests fails during build due to treating the Nuget warnings as errors. This might be related to this long unresolved bug: NuGet/Home#5375

@TheAtomicOption
Copy link
Author

Added suppression of the NU1701 warning at the package dependency declaration level. VS test buttons now build and run all tests successfully.

I'm going to consider this a complete successful conversion until someone brings up additional issues.

@TheAtomicOption
Copy link
Author

Built a basic WKT converter that's independent of SqlServer DLLs into the Wkb assembly.

@matt-lethargic
Copy link
Member

Nice one 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants