storing map template in database
Posted
by
Timigen
on Programmers
See other posts from Programmers
or by Timigen
Published on 2014-06-05T14:39:59Z
Indexed on
2014/06/05
21:41 UTC
Read the original article
Hit count: 487
I am working on an application that displays choropleth maps. These maps are of all different types, some display state by county, country by state/province, or world by country.
How should I handle storing the map information in the database?
My Thoughts:
I won't need to do queries to find POI inside a region, so I don't think there is a need to use spatial datatypes. I am considering storing a map as a geoJSON object (I am using JS mapping library that accepts geoJSON).
The only issue is what if I want a map of the US northeast. Then I would have geoJSON for the US and a separate one for the US northeast, which would be redundant.
Would it make sense to have a shape database where I had each state then when I needed a map of the US I could query for each state, and when I needed a map of the US Northeast I could again query for what I need?
Note: I am not concerned with storing the data for each region, just the region itself. I will query for the data on the fly for the specific region.
© Programmers or respective owner