[gdal-dev] Re: gdal_rasterize output off by one pixel/cell
Hermann Peifer
peifer at gmx.eu
Tue Aug 23 07:27:34 EDT 2011
Eli, Matt,
I just rasterised some point data with GDAL 1.9dev from svn and can
confirm both observations:
a) points are lost at the edges
b) points and pixels do not line up correctly in qgis
I can align points and pixels by shifting the corner coordinates of the
resulting GeoTIFF by 0.5 pixel, but this is hardly a "fix":
gdal_translate test.tif test_shifted.tif -a_ullr -180.5 90.5 179.5 -89.5
I was able to reproduce the same results with GDAL 1.6.3, so I am
wondering for how long the issue is already lurking around -- or are we
just doing something terribly wrong? Hopefully not.
Hermann
On 22/08/2011 18:50, Eli Adam wrote:
> Matt,
>
> You may want to look at this ticket and see if it is the same thing. If so, you can add yourself to the cc list and you will get emails when there are updates to the ticket. You can also add any additional relevant information to the ticket.
>
> http://trac.osgeo.org/gdal/ticket/3774
>
> Regards, Eli
>
>
>
>>>> On 8/20/2011 at 11:06 AM, in message
> <AA52F8AC-89DC-4543-A210-0DD0BA9E58FD at my.und.edu>, "Burton-Kelly, Matthew"
> <matthew.burton.kelly at my.und.edu> wrote:
>> Hello,
>>
>> I'm attempting to create a raster from a shapefile of point data, with grid
>> cells 1 degree square. Although the area I have defined matches up with the
>> origin coordinates I want, and the grid cells match up with a vector 1-degree
>> grid I produced in QGIS, the squares supposedly containing the point data are
>> shifted, it looks like down and to the right. Has anyone encountered this
>> issue before?
>>
>> Here is the command I used:
>> gdal_rasterize -a<column name> -ts 360 180 -te -180 -90 180 90 -l<source layer name
>> in source file> <source file> <destination file>
>>
>> I have uploaded a screenshot of the output I am describing here:
>> http://www.flickr.com/photos/matthewbk/6059112633
>>
>> Thanks for any insight,
>> Matt
>>
More information about the gdal-dev
mailing list