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

Hamish hamish_b at yahoo.com
Fri Jun 19 04:57:13 EDT 2009

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.



More information about the grass-user mailing list