1

I will build a GIS system based on polygons, not just points. I wanted to use MongoDB or PostGIS.

How do this in MongoDB?

enter image description here

Query A - get the center of a polygon

Query B - distance between two polygons

Query C - list of polygons that are part of a third that I specify

Query D - near-distance of the polygon

Support SRID?

mloskot
  • 37,086
  • 11
  • 109
  • 136
Ciro Vargas
  • 422
  • 1
  • 5
  • 16

1 Answers1

1

MongoDB's geospatial indexing currently only indexes points. Although it does support proximity and bounds queries, documents are matched by a single point. You may be able to take advantage of multi-location documents and index multiple points along a polygon, which might support some of your queries with reduced precision; however, that would certainly not be ideal.

PostGIS seems more appropriate for your requirements.

mloskot
  • 37,086
  • 11
  • 109
  • 136
jmikola
  • 6,892
  • 1
  • 31
  • 61