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

Responses should be in geojson format #58

Open
hampelm opened this issue Jun 11, 2013 · 1 comment
Open

Responses should be in geojson format #58

hampelm opened this issue Jun 11, 2013 · 1 comment

Comments

@hampelm
Copy link
Contributor

hampelm commented Jun 11, 2013

With this, we'll be able to serve geodata in a consistent format. This'll also let us take advantage of 2dsphere indexes in Mongo 2.4, which support more geometries.

This will require changes to the dashboard and mobile client.

From the GeoJSON spec:

  • A feature object must have a member with the name "geometry". The value of the geometry member is a geometry object as defined above or a JSON null value.
  • A feature object must have a member with the name "properties". The value of the properties member is an object (any JSON object or a JSON null value).
  • If a feature has a commonly used identifier, that identifier should be included as a member of the feature object with the name "id".

From the MongoDB 2dsphere index docs:

{ <location field> : { type : "<GeoJSON type>" ,
                       coordinates : <coordinates>
} } 
@hampelm
Copy link
Contributor Author

hampelm commented Jun 11, 2013

We'll also need a migration script in maintenance.

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

No branches or pull requests

1 participant