[OSM-dev] Guys I trusted you, I removed my checks...

Iván Sánchez Ortega ivan at sanchezortega.es
Tue May 19 02:39:30 BST 2009

El Martes, 19 de Mayo de 2009, Paul Johnson escribió:
> My understanding is that there's nothing intrinsically tying us to ±90°
> by ±180°, based on the responses I got on #osm when asking about the
> possibility of mapping something with a geometry grossly different from
> Earth's (ie, Second Life).

Err, you need to take into account the bounds of the database fields holding 
lat and lon.

Last time I checked (API 0.6 backed by MySQL), the lat/lon fields were 
4-byte-long integers, and the API multiplied the lat/lon by 10 million to 
store the data.

That means that the DB bounds for lat/lon are -2147483648 to 2147483647, which 
translates to ~ ±214.74 degrees.

In order to map something outside those bounds, you would have to tweak both 
the API and the DB backend to make room for bigger numbers. I haven't looked 
at it, but it's sane to assume that the API checks for out-of-bounds data.

Iván Sánchez Ortega <ivan at sanchezortega.es>

Un ordenador no es un televisor ni un microondas, es una herramienta compleja.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090519/e6da95d1/attachment.pgp>

More information about the dev mailing list