0

I have the following :

  • openshift cardridges with Node.js 0.10 and MongoDB 2.4
  • 5000 GeoJSON files, each containing a single multipolygon

I am trying to build an app where the user would submit the coordinates of a point and get a list of all the GeoJSON files where this point is inside (contained in) their multipolygon.

What would be the fastest/most efficient way to process this query ? Any general idea/input is welcome, even if it is not using mongoDB.

Thanks !

Ps: I think I may have to wait for openshift to upgrade to mongoDB 2.6 to intersect a point and a multipolygon.

Franckl
  • 1,401
  • 2
  • 12
  • 17
  • $geoIntersects and 2dsphere are both supported in 2.4. For that number of files, intersection of a point and a (multi)polygon should be more or less instantaneous, unless you polygons are insanely complex. – John Powell Jun 12 '14 at 06:09
  • Hi John, What do you call insanely complex ? Each multipolygon is composed of approx 10 polygons with 200 to 1200 coordinates per polygon. Shall I still pursue the route you mentionned with 2dsphere ? – Franckl Jun 12 '14 at 15:17
  • 1
    No, that sounds well within the bounds or normal. Obviously, there is no substitute for testing, but I would be surprised if that caused you any problems. I am in the process of doing a project involving speed comparisons between Postgis and MongoDB, but haven't got very far yet :-( – John Powell Jun 12 '14 at 15:47

0 Answers0