Saturday 12 January 2019

shapefile - error "pointer hDs is NULL in GDAL GetProjectionRef" when using gdal_rasterize




I want to convert a .shp to .tif. So I find the tool gdal_rasterize may help. But when I input the file it always meet this error:


pointer hDs is NULL in GDAL GetProjectionRef


screenshot


I have tried different versions of GDAL(1.11.0 and 2.1.0),same error. The test data is from http://qgis.org/downloads/data/qgis_sample_data.zip


1)Is this wrong because of the data?or the wrong syntax?


2)What is the correct syntax for using gdal_rasterize()?


3)Is there a better way to convert shp to png(or tif)?coding by myself is ok but I use Java.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...