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

How to serialize/deserialize asp.net web api end points as GeoJson #56

Open
okwaroissa opened this issue Aug 2, 2020 · 8 comments
Open

Comments

@okwaroissa
Copy link

How can I Use NetTopologySuite.IO.GeoJSON to return GeoJson formated response from asp.net core API end point?

@GiviKDev
Copy link

GiviKDev commented Sep 9, 2020

I'm wondering as well. Example provided in Wiki is working well Using NTS.IO.GeoJSON4STJ with ASP.NET Core MVC
But, Swagger based on Api Explorer is generating full payload, and based on this it's quite hard to get how data should be provided for endpoint.

@airbreather
Copy link
Member

@okwaroissa At the moment, the best we have is some samples on the wiki: https://github.com/NetTopologySuite/NetTopologySuite.IO.GeoJSON/wiki

I'll keep this open as a bit more of a general "improve README" issue.

@GiviKDev if your issue is specific to Swagger, can you please open a new issue for this with more details?

@HarelM
Copy link
Contributor

HarelM commented Sep 22, 2020

Can you elaborate on the question a bit?
I've been using NTS for a long time in asp.net core.
A working (very full) example can be found here:
https://github.com/IsraelHikingMap/Site
Web project is where all the definitions are defined.
API project is where the controllers are located.
I have created some swagger code to allow showing the geojson in swagger as well...

@airbreather
Copy link
Member

I have created some swagger code to allow showing the geojson in swagger as well...

@HarelM I've started to look into swagger. What you have is a good start, but there's still more to be done, for example:
image

I think we should have a dedicated project to integrate with Microsoft.OpenAPI. I'll open a new issue for this, since I actually could use this at work.

@airbreather
Copy link
Member

@GiviKDev if your issue is specific to Swagger, can you please open a new issue for this with more details?

For what it's worth, I've created #68 which seems very related to this.

@HarelM
Copy link
Contributor

HarelM commented Oct 16, 2020

I have no objection for a dedicated project. I'm sure my code is not complete as can be seen in the example above.
Let me know if you need any help. It shouldn't be a heavy task I believe.

@goodstas
Copy link

@airbreather i see that this issue is still open. May you provide the information when it will be closed?
Thank you.

@airbreather
Copy link
Member

@airbreather i see that this issue is still open. May you provide the information when it will be closed? Thank you.

I do not have any near-term plans to work on this.

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

5 participants