devnixs / ODataAngularResources

Fluent OData queries from Angular's Resources
MIT License
142 stars 38 forks source link

DbGeography #26

Closed NicoJuicy closed 8 years ago

NicoJuicy commented 8 years ago

I would add DbGeography to your library ( odata v4), any thoughts before i begin? I don't see something similar to it in odataValue:

Example below:

{
    "@odata.context":"http://subdomain.mydomain.me/odata/$metadata#Pois","value":[
      {
          "Id":"d57e6603-5530-4457-b041-6398b7182173","Name":"Demo Home","Address":"Zuidstraat 8 8630 Veurne","Location":{
              "Geography":{
                  "CoordinateSystemId":4326,"WellKnownText":"POINT (51.515574 2.025285)","WellKnownBinary":null
              }
          },"TagId":"ec32e8f3-c0b8-4bcc-af6c-7059b1ef1a65","RouteId":null
      }
    ]
}

Danger is, i need to fork the library to use the "odata" .Net version, based on : http://www.odata.org/blog/geospatial-data-support-in-odata/ . There seem to be some differences with my example code above.

Or should i add the standard and add a wrapper arround the .Net DbGeography type and release a nuget package, so it becomes the standard as described on the odata website?

"GeographyPoint": {"type": "Point","coordinates":[142.1,64.1]}
devnixs commented 8 years ago

Hi NicoJuicy, First if you're gonna add breaking changes it would be great to have a flag like "useDbGeography". Then I don't completely understand what you want. Does your example means that you want properties that are instances of DbGeography serialized properly? Or do you want to be able to query against DbGeography properties?

NicoJuicy commented 8 years ago

Actually, i'm starting a project that will have the CRUD of DbGeography ( probably querying also). I'll probably won't add the entire DbGeography functionality immediatly ( don't know what it all does right now). But add it once a need it.

Fyi: And i meant that, one record in the database POINT (51.015574 2.725285) returns to

"GeographyPoint": {"type": "Point","coordinates":[142.1,64.1]}

So right now, i'm kinda wondering where to start. That's all. But it would probably be better just to dive into it and see where i come out :p

If you have any clues on what i might consider or some edge-cases i'll run into. I'm happy to hear about it. Otherwhise, you can just close this question :)

For future reference use: