[gdal-dev] gdal_contour: 2.2.4 vs. 2.4.1

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] gdal_contour: 2.2.4 vs. 2.4.1

Seonghyeon Hahn
Hello,

We've been using gdal v2.2.4 for a while. In particular, we've been frequently using the "gdal_contour" command
for raster-to-vector conversion from the Golden Software ASCII Grid (GSAG) into the WAsP .map format
in the following way:

% gdal_contour ./input.grd ./output.map -i 10.0 -f WAsP

This has been working fine with gdal2.2.4, but recently upgraded gdal2.4.1 doesn't seem to work. If I run it
in the verbose mode by setting CPL_DEBUG=ON, it writes the following error messages:

% gdal_contour ./input.grd ./output.map -i 10.0 -f WAsP --config CPL_DEBUG ON
GDAL: GDALOpen(./input.grd, this=0x1e9dee0) succeeds as GSAG.
GDAL: GDALDriver::Create(WAsP,./output.map,0,0,0,Unknown,(nil))
0GDAL: GDAL_CACHEMAX = 794 MB
ERROR 6: No field defined and no Z coordinate
ERROR 1: cannot write linestring
ERROR 6: No field defined and no Z coordinate
ERROR 1: cannot write linestring
...
More than 1000 errors or warnings have been reported. No more will be reported from now.
40...50...60...70...80...90...GDAL: GDALClose(./output.map, this=0x1e9dc60)
GDAL: GDALClose(./input.grd, this=0x1e9dee0)
100 - done.

Googling wasn't very helpful for this issue. Can anyone help me with this?

Thanks in advance.

Classification: Restricted


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: gdal_contour: 2.2.4 vs. 2.4.1

Even Rouault-2
On mercredi 15 mai 2019 05:53:30 CDT Seonghyeon Hahn wrote:

> Hello,
>
> We've been using gdal v2.2.4 for a while. In particular, we've been
> frequently using the "gdal_contour" command for raster-to-vector conversion
> from the Golden Software ASCII Grid (GSAG) into the WAsP .map format in the
> following way:
>
> % gdal_contour ./input.grd ./output.map -i 10.0 -f WAsP
>
> This has been working fine with gdal2.2.4, but recently upgraded gdal2.4.1
> doesn't seem to work.

OK, I've reproduced the issue. I've just submitted a fix for the WaSP driver
to the master, 3.0 and 2.4 branches.
You can workaround the bug by doing a 2-step process:
1) output to shapefile (or whatever other format which supports 3D) with
gdal_contour, with an explicit -3d flag:

        $ gdal_contour input.grd tmp.shp -3d -i 10.0

2) convert to WaSP:

        $ ogr2ogr output.map tmp.shp -f WAsP

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev