[postgis-tickets] [PostGIS] #5084: Bad rasterization of linestring

PostGIS trac at osgeo.org
Fri Feb 4 08:26:54 PST 2022


#5084: Bad rasterization of linestring
---------------------+---------------------------
 Reporter:  gvuidel  |      Owner:  robe
     Type:  defect   |     Status:  new
 Priority:  high     |  Milestone:  PostGIS 3.2.1
Component:  raster   |    Version:  3.2.x
 Keywords:           |
---------------------+---------------------------
 In some cases rasterization of linestring is incomplete.
 Example :

 {{{
 SELECT ST_AsRaster('LINESTRING(986015.7 6720291.2,986024.3 6720347,986028
 6720417.4,986025.6 6720474.3)'::geometry, 2::double precision, 2, 0, 0)
 }}}


 In the resulting raster the line is discontinuous at the right border of
 the raster. If I shift the grid the result is correct :

 {{{
 SELECT ST_AsRaster('LINESTRING(986015.7 6720291.2,986024.3 6720347,986028
 6720417.4,986025.6 6720474.3)'::geometry, 2::double precision, 2, 0.1,
 0.1)

 }}}

 I think the problem is related to the bounding box of the generated raster
 which is too small. In this case it should be enlarge at right to one
 pixel.

 I have tested on PostGIS 3.2, 3.1.1 and 2.5.1 and I obtain the same
 erroneous result.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5084>
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