[GRASS-dev] problem with reading KML

Even Rouault even.rouault at spatialys.com
Mon Feb 5 11:30:36 PST 2018

On lundi 5 février 2018 10:04:25 CET Anna Petrášová wrote:
> Hi,
> I ran into a weird problem with KML with 3D line, v.import failed when
> reprojecting it:
> WARNING: pj_transform() failed: latitude or longitude exceeded limits
> This happened with GRASS 7.4.0 64bit (GDAL 2.2.3) on Windows 10, on my
> Ubuntu with latest GRASS it works (GDAL 2.2.1). Weird thing is that I
> installed the same version of GRASS on Windows 10 virtual machine and
> there it worked without problems.

I can indeed replicate with the LIBKML driver on Windows (probably by libkml itself), and this 
is specific to this combination. From testing, it appears that the presence of newline
+tabulations without spaces between coordinate triplets is the cause of the issue, where 
libkml doesn't detect properly the start of the x coordinate of the new triplet and mangles it 
with the z of the previous one.

As a workaround, you might define OGR_SKIP=LIBKML as configuration option to exclude the 
LIBKML driver and use the "old" KML one that has not that issue.

Or edit the file to replace tabulations by spaces.


Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180205/69a19aca/attachment.html>

More information about the grass-dev mailing list