Search code examples
phpzend-frameworkgeolocationgisopenmap

What is the best way to store geodata (spatial data) for a small open source web application


I'm about to start developing a GIS web application.

I'll use PHP as language, Zend as Framework and Google Maps API for map rendering, but I didn't decided which back-end storage I'm going to use.

I'll need:

  1. Store: Points (Lat & Lng) , Lines (Set of points), Polygons
  2. Make queries like:
    • "Which are the n Points of a given kind nearest of some other given Point ?"
    • "Which are the n Points of a given kind nearest of some given Line ?"
    • "Are point 'a' inside polygon 'g'?"
    • "What is the distance from point 'a' to point 'b' ?"
  3. Combine these spatial data types with other relational data in the same table.

Which open source technology should I use?


Solution

  • If you're allowed to choose any storage - then you might prefer the ones, that support spatial indexes, like PostgreSQL (postgis) or MongoDB or mysql