Reputation: 1
I'm using GDAL.rasterize to rasterize a simple shapefile of points. The shapefile points simply consists of Xco-ord, Yco-ord and an integer data value. Everything about the output file is fine except for a single row containing only No_data inserted mysteriously by the process about 3/4 way down the raster and hence all subsequent rows below that then appear misaligned by 100m southward. but data exists in shapefile for that anomalous row ?
I have tried creating other formats instead of TIFF, such as EHDr, but they all turn out the same
So, thinking it was memory related I tried reducing he extent
if I reduce the extent to only rasterise below the line of the inserted null row , the resultant output is still offset
if I reduce the extent to only rasterise above the row of the inserted null data , the resultant output is fine for that portion as it is when I do the whole extent
I took a thin sliver of the extent reducing the number of cols but keeping the rows, same thing occurred.
So I don't think its memory related any longer
The output raster is a simple 6256 cols by 12361 rows tiff in 100mx100m grid
Extent is 45080,670080,4355,1240255 CRS is EPSG: 27700
This is the Gdal .rasterise switches I used
gdal_rasterize -l !fileOUT! -a OP_DATAFIELD -tr 100.0 100.0 -a_nodata -9999 -te 44780.0 4155.0 670380.0 1240255.0 -ot Int16 C:\WorkingMDT\!SHPfileIN!.shp C:\WorkingMDT\!fileOUT!.tiff
What I need to happen is a raster without the anomalous row 3/4 way down it that is offsetting all subsequent rows,
What's causing that anomalous row to be inserted?
Now I can manually correct this by converting to .asc and editing out the anomaly row but id rather find the programmatic cause
All help and consideration much appreciated. Here is a screenshot of the issue Green is the raster created, blue crosses the original data points, the row of no_data that has been inserted and the subsequent downward shift can be clearly seen
Upvotes: 0
Views: 269