Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#4774 closed defect (wontfix)

How to set the geometry parameter of ST_TileEnvelope when 2 tiles exist at zoom level zero

Reported by: jingsam Owned by: pramsey
Priority: medium Milestone: PostGIS 3.0.3
Component: postgis Version: 2.5.x -- EOL
Keywords: Cc:

Description

I want to tile a dataset with a custom tiling scheme which is:

  1. crs is EPSG:4326
  2. 2 tiles exist at zoom 0, which is 0/0/0 and 0/1/0

I tried this: SELECT st_astext(st_tileenvelope(0, 1, 0, st_makeenvelope(-180, -90, 0, 90, 4326)))

ERROR: ST_TileEnvelope: Invalid tile x value, 1

Change History (2)

comment:1 by Algunenano, 4 years ago

Resolution: wontfix
Status: newclosed

By definition, 2 tiles can't exist at zoom 0. If you are using a custom tiling scheme you'll need to create a custom function that deals with whatever rules you want to define.

comment:2 by komzpa, 4 years ago

I had to do that in the past for Landsat imagery. I did it via defining an larger extent and only using zooms from 1, which contained 4 tiles of which only upper 2 were explored.

That required a base box of (-180.0, -166.0, 332.0, 346.0), but afterwards the grids were aligned:

https://github.com/Komzpa/twms/blob/master/twms/projections.py#L31

Note: See TracTickets for help on using tickets.