Search code examples
jsongoogle-mapsgeospatialpostgisgeojson

What I benefit from using Geo Json on mobile side, when all the geo processing is done on server side?


I have a mobile app heavily associated with maps, GPS, location etc.

Currently I'm sending real time location data to server as regular Json (Strings...), and in the server I'm converting it to my custom geo objects, querying geo spatial database (PostGis etc.). Then backwards: I'm converting the results to strings and send them back to client as regular Json. Usually the client needs this results to display them to the user, so it's convenient that they are already strings.

My question is what can I benefit from working with Geo Json format instead? It's clear that it enables "offline mode" using SpatiaLite etc. But what else? What about all the conversions I'm using from/to strings of geo locations? Currently I have some very simple custom geo objects (location object etc.). Can I benefit here? Note that in the end it's good for me have the results as strings for the user, and for now offline mode irrelevant.

Is there a rule of thumb that if you are location/map app - it's best practise to use geo Json and not regular Json?

Thanks,


Solution

  • The benefit of using geojson instead of pushing out values as string is that geojson is a documented, specified format. Client-libraries (like d3.js) can make use of it and make transformations, projections and other geo-related operations on the client.

    If the format benefits you in your current project depends on the libraries and framworks you use with your client. If for example your Project only needs geo-xml or kml output, geojson will be of no use for you.