LocalData / localdata-api

API/server for LocalData
http://localdata.com/
BSD 3-Clause "New" or "Revised" License
20 stars 14 forks source link

Stats fails with multipolygons #184

Open hampelm opened 10 years ago

hampelm commented 10 years ago

Can mongo query multipolygons? Specifically, polygons with holes?

prashtx commented 10 years ago

The version we're using doesn't index multipolygons and I believe doesn't index polygons with holes (which are different from multipolygons). But our indexedGeometry field, which has the geo index, should not contain either of those. When we add responses, we simplify the geometry and take the first polygon.

I believe we should get an error if we fail to produce an indexable geometry. If the index is sparse (which I don't think 2.4 allows on geo indexes), then maybe we can query for entries that are not in that index.

What's the nature of the failure?