title: Store GeoJSON polygons in MongoDB
body: <p>I have the following problem with MongoDB. I got some geo data from my home country and i have to store them into mongodb to set up a simple Web Feature Service. This service will mostly do bounding box queries using the <code>$within</code> operator. The data is in GeoJSON format. Therefore i imported at first the Villages and Cities which are represented as points (<code>[1,2]</code>) in this format. No problem. Next step rivers and streets which are LineStrings and according to GeoJSON represented this way <code>[[1,2],[3,4]]</code>. But when importing the districts (which are in fact polygon and according to the GeoJSON specification 3 dim arrrays) i got the error  <code>geo values have to be numbers</code> when creating the index.</p>
  
  <pre><code>db.collection.ensureIndex({"geometry.coordinates" : "2d"});
  </code></pre>
  
  <p>All data are valid GeoJSON, and are in plain 2d coordinates in EPSG:4326 projection.</p>
  
  <p>Does anybody have an idea? </p>