$within $center radius unit question

395 views
Skip to first unread message

thepumpkin1979

unread,
Sep 15, 2010, 4:41:07 PM9/15/10
to mongodb-user
Hi Guys.

I'll appreciate if anyone can tell me what's the unit of "radius"
argument when using $within and $center operator.

I've readed this but I don't see any mention on it:
http://www.mongodb.org/display/DOCS/Geospatial+Indexing

Can anyone tell me how can I convert miles or kilometers to this
radius unit?

Thanks in Advance,

Johan.

roger

unread,
Sep 15, 2010, 4:48:04 PM9/15/10
to mongodb-user
They're in degrees - so 1 ~= 69 miles.

We'll be adding this to dthe documentation.

see: http://groups.google.com/group/mongodb-user/browse_thread/thread/beb1c0a5f228c77e

Andrew Gross

unread,
Sep 15, 2010, 5:07:35 PM9/15/10
to mongod...@googlegroups.com
Looks like they are in units of Longitude and Latitude.  It says below it that each degree is ~69 miles at the equator, with skew increasing as you get closer to the poles.

Andrew Gross   
Support Engineer

QualityHealth 
Programs that PerformTM



--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.


roger

unread,
Sep 15, 2010, 5:16:02 PM9/15/10
to mongodb-user
That is correct. There are some improvements to this underway in a
next version of mongo.

On Sep 15, 2:07 pm, Andrew Gross <agr...@QHperform.com> wrote:
> Looks like they are in units of Longitude and Latitude.  It says below it that each degree is ~69 miles at the equator, with skew increasing as you get closer to the poles.
>
> Andrew Gross
> Support Engineer
>
> QualityHealth
> Programs that PerformTM
>
> 848.248.4981 t
> 716.983.1741 c
> agr...@QHperform.com<mailto:ebo...@QHperform.com>www.QHperform.com<http://www.QHperform.com/>

Richard Kreuter

unread,
Sep 15, 2010, 5:18:37 PM9/15/10
to mongod...@googlegroups.com
Strictly speaking, there are no units: it's just cartesian geometry.

(The default bounds for coordinates are [-180, 180], which models
degrees of latitude/longitude at the equator, but you can specify custom
bounds, in which case the radius is just a distance in your space.)

Reply all
Reply to author
Forward
0 new messages