[postgis-tickets] [PostGIS] #5228: ST_MakeEmptyCoverage creates a bad tiling
PostGIS
trac at osgeo.org
Thu Sep 1 14:56:29 PDT 2022
#5228: ST_MakeEmptyCoverage creates a bad tiling
-------------------------+---------------------
Reporter: arthurbazin | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone:
Component: postgis | Version: 3.2.x
Keywords: |
-------------------------+---------------------
When using ST_MakeEmptyCoverage the behaviour is really unexpected.
When reading the documentation, I understand that if we provide a
width/height and a tilewidth/tileheight, It create a set of tile with the
same size (except for the tile on the border left and bottom) that
fullfill the width/height.
But when I'm using this function, I have tiles with different sizes wich
follow an interesting pattern.
Try with this request :
{{{
SELECT
ST_Envelope(
ST_MakeEmptyCoverage(
1, -- Tilewidth
1, -- Tileheight
4, -- Coverage width
4, -- Coverage height
0, -- X origin
0, -- Y origin
1, -- Scale X
1, -- Scale Y
0, -- Skew X
0, -- Skew Y
4326 -- SRID
)
)
}}}
The result have 16 tiles :\\
The 1st 4 tiles have the height of the coverage \\
The 2nd 4 tiles have an height of coverageheight - 1*tilewidth \\
The 3rd 4 tiles have an height of coverageheight - 2*tilewidth \\
The 4th 4 tiles have an height of coverageheight - 3*tilewidth
Maybe I don't understand how this function works but my expected result
would be the result of this request :
{{{
SELECT
ST_Envelope(
ST_Tile(
ST_MakeEmptyRaster(
4, -- Coverage width
4, -- Coverage height
0, -- X origin
0, -- Y origin
1, -- Scale X
1, -- Scale Y
0, -- Skew X
0, -- Skew Y
4326 -- SRID
),
1,
1
)
)
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5228>
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