[gdal-dev] Null data and CRS. gdal_warp overkill???

Even Rouault even.rouault at spatialys.com
Wed Nov 25 15:08:09 PST 2015


Le mercredi 25 novembre 2015 21:27:17, nicolas.cadieux at archeotec.ca a écrit :
> Hi,
> I am creating a Windows .bat files with a Python script to make DEMs
> with LiDAR points.  The idea is simple.
> 1) read input txt  file to get the cloud geometries
> 
> 2)gdal_grid with nodata value marker set to -32768
> 
> 3)gdal_warp with -dstnodata to set the value marker (of grid created in
> step 2)
> 
> 4)gdal_fillnotdata.py to replace the no data values (of grid created in
> step 3)
> 
> 5)gdal_warp again with  -dstnodata to set the value marker (again as
> some values may still be outside of spet 4 search radius)
> 
> 6)gdaldem hillshade made with DEM of set 5
> 
> 7)gdal_warp again with -t_srs srs_def: to set the CRS of the Hillshade
> created in step 6.
> 
> It looks like I am loosing time with gdal_warp (step 3,5 and7) as I am
> reading a file, adding novalue data or setting CRS, then writing the new
> file and then deleting the old file.
> 
> Question: Is there another way of doing this without steps 3, 5 and 7 or
> did i get it right?

Yes, you could use gdal_edit.py -a_nodata / -a_srs . See 
http://gdal.org/gdal_edit.html

> 
> Thanks,
> Nicolas
> P.S.
> I am using win7_64 and gdal 1.11.2.
> //

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list