Convert latitude longitude type in mongodb in order to perform geospatial queries
<p>I have documents in mongodb containing:</p>

<pre><code>{
    "Latitude" : "1.242",
    "Longitude" : "-12.311"
}
</code></pre>

<p>That's right they are strings! How to I convert them into double type and store them as Geoson points i.e.  </p>

<pre><code>{
    "Coordinates" = [-12.311,1.242]  
}  
</code></pre>

<p>I want to be able to perform geospatial queries of the form.  </p>

<pre><code>"$and":[{"Latitude" : { "$not" : { "$within" : { "$center" : [[lat,lon]],1000] } } }},{"Longitude" : { "$not" : { "$within" : { "$center" : [[lat,lon],1000] } } }}]
</code></pre>

<p>A query of the form<br>
<a href="https://stackoverflow.com/questions/14831402/mongodb-not-near">Mongodb not $near</a><br>
Find all points not within the circle of radius 1000 metres formed by lat lon.Can it be done without the change? If yes then please suggest something else. Please help!  </p>