문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top