Latitude / Longitude mapping

Sylvain Bougerel sylvain.bougerel.devel at gmail.com
Mon Sep 15 03:43:32 UTC 2008


Hi Gerald,

I've been putting some thinking into your problem for quite some time.

Because it occured to me that no single planar mapping would actually
satisfy the requirement of properly mapping the entire curved space of
the earth in LLA system (longitude, lattitude, altitude).

However, ECEF system would definitly (meters in earth-centered earth
fixed coordinates) not satify you either, because they make distance
calculation tricky, and besides, they do not map properly into LLA
zone: because the square 1degree north, 1 degree east, 1 degree west,
1 degree south, correspond to a curved surface in ECEF coordinates,
and it is very difficult to approximate.

So how?

Use a 4D Kd-tree. Map the Latitude and Longitude using the normal
vector of a point in ECEF coordinates (this gives you a 3D point), the
additional dimension is for the altitude (the it become a 4D point) in
LLA system. I hope it's clear. It's actually like LLA, except that the
2 coordinate in degree get changed into 3 coordinates in meters that
correspond to the normal of a point with regard to the surface of the
earth expressed in ECEF coordinate system.

Using this mapping, you have a 4D kd tree with proper ordering all
around the earth (for finding nearth neighbor), perfect range/zone
mapping into LLA (for finding all the points within a range of
coordinates), and constant metric (everything is expressed in meters).
However, the distance calculation becomes very tricky, but the benefit
of this method far outweights the tricky distance calculation.

I got this idea from Riemannian geometry.

I know it's been a very long time. But it's a problem I will have too,
so I wanted to work on it a little bit. I hope this can help.



Sylvain



2008/8/11 Paul Harris <paulharris at computer.org>:
> if you wanted accuracy, you'd have to convert them to a planar mapping
> (although I don't know which coord set would be appropriate to use?).
> kdtree just uses euclidean distances, which doesn't match the distance on a
> sphere.
>
> you might be able to do something with UTM coords... except you will have to
> deal with the zones somehow.
>
> 2008/8/8 Gerald Gutierrez <md1 at mogeso.com>
>>
>> Does anyone have experience with using kdtree's in a spherical mapping
>> scenario? I need to batch geolocate a set of lats/longs to their closest
>> cities (data from geonames.org) and am having trouble working out how I
>> would map the lats/longs into 2D coordinates that make sense for a kdtree.
>> Not certain whether the spherical nature of the Earth would affect anything.
>> Would I simply use lat/long as the kdtree coordinates, or do I need to
>> convert them into a planar mapping first?
>>
>> _______________________________________________
>> libkdtree-devel mailing list
>> libkdtree-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel
>>
>
>
> _______________________________________________
> libkdtree-devel mailing list
> libkdtree-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel
>
>



More information about the libkdtree-devel mailing list