[GRASS-user] v.out.ogr to KML ERROR 1: Latitude is invalide

Moritz Lennert mlennert at club.worldonline.be
Fri Jun 19 05:52:24 EDT 2009

On 19/06/09 10:57, Hamish wrote:
> Moritz wrote:
>> Sorry, just reread your message, and my answer is probably
>> not really helpful. In fact v.out.ogr does transform your
>> data to EPSG 4326, as the following message shows:
>>>> Warning 1: Longitude 638073.992861 has been modified to fit into range
>>>> [-180,180]. This warning will not be issued any more
> by "modified" I would guess that it means it just throws away anything
> out of that range, or sets it to the nearest -180,180 edge, not
> reprojecting it.
>> You still might want to try to reproject (v.proj) to EPSG
>> 4326, just to see what happens.
> probably required. if so probably update the v.out.ogr help page and
> perhaps add something like this in the code:
>  if( G_strcasecmp(frmt_opt->answer, "KML") == 0  && 
>      G_projection != PROJECTION_LL )
>    G_fatal_error(_("KML format requires lat/lon data"));
> or if you really wanted you could have it try to reproject to WGS84 LL
> in the program instead of giving that fatal error.

I found this: http://trac.osgeo.org/gdal/ticket/2271. Apparently, 
automatic projection is integrated into the ogr KML driver. It seems 
that this feature was introduced with GDAL 1.6, so if you have an 
earlier version you have to reproject first. So, I think we shouldn't 
introduce a fatal error, but maybe just a warning in the man page.


More information about the grass-user mailing list