jones139 / BrewMap

The client and server side code to produce a map of uk breweries based on OpenStreetMap Data (http://wiki.openstreetmap.org/wiki/WikiProject_United_Kingdom_Breweries)
http://brewmap.maps3.org.uk
6 stars 3 forks source link

Use geoJSON for data file format #26

Open jones139 opened 13 years ago

jones139 commented 13 years ago

The data files use a made-up json format. We should use geoJSON (http://geojson.org/) for future compatibility with other software. This is not a particular issue for the BrewMap, but if we use this code for other things that may need linear features or areas rather than just points, a geoJSON compatible format would be sensible. (I am thinking about the uk historic map, which will want to show roman roads etc as linear features.

craigloftus commented 13 years ago

It should be relatively easy to change the format. It seems like we have a pretty simple FeatureCollection.

Perhaps we should use the opportunity to also change the structure of data and queries currently used? The present structure isn't very scalable.

An example off the top of my head would be for the client to request a number of entities within the bounding box of the map? The server would respond with a random set of matches of all types, up to the limit specified by the client. The client could further specify the types of entities desired in the query. The problem with this example is that it would be more expensive for the server.

jones139 commented 13 years ago

You are right, but I think we should treat it as two different tasks - converting the server and client sides to use geoJSON will be quite easy (I have found out that postgis will output geoJSON). I will open a separate issue to discuss how to deal with scalability.