You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.
I have a file with data as geojson. I want to load this in and do some operations on the data (for example checking if a point is inside a polygon) with the use of NTS. For reading in the geojson data I wanted to use GeoJSON. Unfortunally it is not easy to convert (cast) the geometries from that library to the ones NTS is using.
Then I found this GeoApi project with its goal to make geo libraries more compatible with each other. The GeoJSON project is not using this library. I therefore forked it to find out if it is easy to add the different interfaces to the geometry classes in the GeoJSON project. Unfortunately by using the IPoint interface from GeoAPI I also need to implement all kind of geometric operations. Something which is already implemented in NTS.
Should the interfaces not be split up in pure data container interfaces and interfaces describing the available methods for a geometry. This way I can easily cast a geometry created by the GeoJSON library over to NTS.
Would love to hear your feedback.
Johan
The text was updated successfully, but these errors were encountered:
Perhaps specific interfaces could be created for the parts that only hold data. The existing interfaces should then be split into a data part and a method part which is derived from the data part.
Why not use NetTopologySuite.IO.GeoJSON package.
It was derived from @jbatterman s GeoJSON-Net code a while back. It might not be fully in line with the current package, but you get NTS/GeoAPI geometries for free :)
The original GeoAPI package was derived from the GeoAPI java (some ancient 0.x version) package that has undergone some sort of standardization. That was a long time before I joined the project so I cannot really say anything about it.
The only implementation of the GeoAPI interface set (.NET) that I know of is NetTopologySuite.
For your project I would suggest you go with a set of extension methods to cast GeoJSON-Net geometries to GeoAPI geometries.
The original GeoAPI package was derived from the GeoAPI java
Actually, we (I) started with this goal, but then I switched to a simple(r) "abstraction" over NTS/JTS Geometry model.
Anyway, as @FObermaier said, it's straightforward to create some extension methids to converto from/to GeoJSON-Net objects.
Hello,
I have a file with data as geojson. I want to load this in and do some operations on the data (for example checking if a point is inside a polygon) with the use of NTS. For reading in the geojson data I wanted to use GeoJSON. Unfortunally it is not easy to convert (cast) the geometries from that library to the ones NTS is using.
Then I found this GeoApi project with its goal to make geo libraries more compatible with each other. The GeoJSON project is not using this library. I therefore forked it to find out if it is easy to add the different interfaces to the geometry classes in the GeoJSON project. Unfortunately by using the IPoint interface from GeoAPI I also need to implement all kind of geometric operations. Something which is already implemented in NTS.
Should the interfaces not be split up in pure data container interfaces and interfaces describing the available methods for a geometry. This way I can easily cast a geometry created by the GeoJSON library over to NTS.
Would love to hear your feedback.
Johan
The text was updated successfully, but these errors were encountered: