Map Coordinates in KML File

362 views
Skip to first unread message

PAA

unread,
Aug 26, 2010, 11:36:44 PM8/26/10
to KML Developer Support - Getting Started with KML
I am trying to use Canadian toprama maps (Lambert Conic Coordinates)
to creat Garmin
Custom Maps. I want to write a kml file and then have Google Earth
create the kmz file.
There are scaling problems. How do I define the proper Lat-long box ??

Thanks

shannon9585

unread,
Aug 27, 2010, 4:02:40 PM8/27/10
to KML Developer Support - Getting Started with KML
Google Earth probably doesn't recognize your coordinate system. You
must convert them to the WGS_1984 geographic coordinate system.

PAA

unread,
Aug 28, 2010, 12:12:20 AM8/28/10
to KML Developer Support - Getting Started with KML
I have a conversion program that converts from Lambert to Lat/Long.
There is some sort of scale issue I think. The further one goes from
the Lambert origin, the errors seem bigger.. I can manually
adjust the map and create an accurate kmz file for Garmin GPSs, but I
should be able to produce a kml file that does the same.
> > Thanks- Hide quoted text -
>
> - Show quoted text -

Josh L

unread,
Aug 28, 2010, 2:46:33 PM8/28/10
to KML Developer Support - Getting Started with KML
It sounds like your conversion program is not doing the appropriate
transformation.

Without getting too much into projections (see
http://earth.google.com/support/bin/static.py?page=guide.cs&guide=22373&topic=23750&answer=148111
for one overview if curious), you will want to ensure your data is not
only Lat/Lng but also WGS84 -- there are many projections that use
decimal degrees for their units and it's possible your conversion is
not using the appropriate datum or something else is amiss.

I often use the free ogr2ogr software to do my conversions (also
requires proj4), which you can install as a bundle on windows by
downloading FWTools or on other operating systems as part of a
standard GDAL / OGR install. There are lots of other programs that
can also do this type of conversion, but it sounds like whatever you
are using currently is not setting the output projection
appropriately.

Cheers,

-Josh

PAA

unread,
Aug 28, 2010, 6:05:24 PM8/28/10
to KML Developer Support - Getting Started with KML
Thank you Josh, but my conversion program seems ok since it agrees
with the lat lon that is available on the online Canadian Topo maps. I
have also delveloped my own spreadsheet with the conversion equations.
Also the datum is GRS80 which is not much different than WGS84. The
coordinate box( northing-easting) provided from the topo maps is lower
right/upper left
while the kml box is upper right/lower left and rotation is involved
and the topo maps have a varying scale. So I think I need some sort of
a scaling correction
but I don't see any info on this on the Internet.

Regards
Paul

On Aug 28, 1:46 pm, Josh L wrote:
> It sounds like your conversion program is not doing the appropriate
> transformation.
>
> Without getting too much into projections (seehttp://earth.google.com/support/bin/static.py?page=guide.cs&guide=223...
> > > - Show quoted text -- Hide quoted text -

PAA

unread,
Aug 28, 2010, 6:07:56 PM8/28/10
to KML Developer Support - Getting Started with KML
Josh do you agree that I should be able to get an accurate Garmin map
using kml files as input to Google Earth?

Cheers again, Paul

On Aug 28, 1:46 pm, Josh L wrote:
> It sounds like your conversion program is not doing the appropriate
> transformation.
>
> Without getting too much into projections (seehttp://earth.google.com/support/bin/static.py?page=guide.cs&guide=223...
> > > - Show quoted text -- Hide quoted text -

Josh L

unread,
Sep 1, 2010, 12:23:20 PM9/1/10
to KML Developer Support - Getting Started with KML
Hi PAA,

I am unfamiliar with the Garmin map format, but it's possible Garmin
supports multiple projections. The KML spec requires your data uses
WGS84 as the datum. You can look at http://spatialreference.org/ref/epsg/4326/
for a variety of ways of describing this projection. If you are
using, for example, GRS80 then it is not valid KML. The issue you're
describing sounds very much like a reprojection problem of one kind or
another, so I do recommend ensuring you are using the appropriate
transformation to get your data into the appropriate projection, and
then if you are still having troubles I'd be happy to take a look at
your KML and original data to see what the problem might be.

Cheers,

-Josh

PAA

unread,
Sep 2, 2010, 8:01:07 PM9/2/10
to KML Developer Support - Getting Started with KML
Thanks Josh again.
For all practical purposes, GRS80 and WGS84 are identical, so a datum
shift is not required.
The custom Garmin maps assume a GE projection, so the problem must be
in converting from Lambert Conic to GE.
However there is little or no discussion on the Internet. Take a look
sometime at the Canadian Topo maps online.
http://atlas.nrcan.gc.ca/

Cheers,
Paul

On Sep 1, 11:23 am, Josh L wrote:
> Hi PAA,
>
> I am unfamiliar with the Garmin map format, but it's possible Garmin
> supports multiple projections.  The KML spec requires your data uses
> WGS84 as the datum.  You can look athttp://spatialreference.org/ref/epsg/4326/

Josh L

unread,
Sep 3, 2010, 2:09:54 PM9/3/10
to KML Developer Support - Getting Started with KML
Hi Paul,

Yes I agree the issue is likely not with your projection being based
on the GRS80 ellipsoid. However it does seem to be a projection
issue, and as soon as I see something wrong with the projection (such
as the datum), it leads me to believe something else may be wrong as
well.

I took a look at the site you reference, and it looks like that
canadian data uses NAD83 based Lambert Conformal Conic, and I would
not expect it to align correctly in GE.

From what I can tell, my original post still seems reasonable: Your
conversion program is not doing the appropriate transformation. I
suggest you try use ogr2ogr or another program to get your data into
valid KML. If you are still having troubles, feel free to post a URL
to (or upload a sample of) your original and transformed KML so we can
take a look and see what might be going wrong.

Cheers,

-Josh


On Sep 2, 5:01 pm, PAA wrote:
> Thanks Josh again.
> For all practical purposes, GRS80 and WGS84 are identical, so a datum
> shift is not required.
> The custom Garmin maps assume a GE projection, so the problem must be
> in converting from Lambert Conic to GE.
> However there is little or no discussion on the Internet. Take a look
> sometime at the Canadian Topo maps online.http://atlas.nrcan.gc.ca/

PAA

unread,
Sep 6, 2010, 10:08:05 AM9/6/10
to KML Developer Support - Getting Started with KML
Hi Josh,

I found the problem. I didn't fully understand the kml format.
The lat lon rectangle (oriented North) must be transformed from the
topo maps.
The topo maps give coordinates for lower left and upper right so they
must be reprojected and rotated
into the GE rectangle. The rotation can be computed fom the topo
coordinates.
Freely available software , Map Fixer and MAPC2MAPC, work for this if
one can't do the math.

Thanks,
Paul
Reply all
Reply to author
Forward
0 new messages