[postgis-tickets] [PostGIS] #5084: Bad rasterization of linestring
PostGIS
trac at osgeo.org
Thu Mar 10 00:49:22 PST 2022
#5084: Bad rasterization of linestring
----------------------+---------------------------
Reporter: gvuidel | Owner: robe
Type: defect | Status: new
Priority: high | Milestone: PostGIS 3.0.6
Component: raster | Version: 3.2.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by gvuidel):
I have found where the problem comes from: in the function
rt_raster_gdal_rasterize in rt_raster.c
The extent is supposed to be increased by one pixel (or a half) for
linestring and point geometries. But in several cases the extent is not
increased causing a wrong rasterization.
I propose to simplify the code and always increase the extent when the
geometry is a linestring or a point as written in the code comments.
I attach a patch file made from the master branch.
I have tested on dev branch and 3.2.1 version.
If needed I can test on other branch/version.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5084#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list