Geowebcache tile naming scheme

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Geowebcache tile naming scheme

adam steer-2
Hi Oceanians

is anyone out there extremely familiar with geowebcache’s tile naming schemes - for example given a grid schema what are the decisions behind how map tiles are named?

Essentially given a grid schema declaration and a bunch of imagery I need to replicate what GWC does in Python. …and unfortunately gdal2tiles / the OSM tile naming code doesn't use the same tile naming / indexing schema (it needs to match exactly an existing tiling schema - which is custom, and I haven’t managed to decrypt yet).

What I’m missing is a likely small but very critical piece of logic which will let me map from geographic bounds to tile index locations, for example from:

input_tiff(minx miny maxx maxy) -> /zoomlevel/????/????_????.png

…for output tiles in EPSG4326 (plate carree), indexed to lower left corner.

I’ve been digging into Geowebcache code, but Java does my head in and the wormholes get too deep in there. I can’t find any documentation which really explains well how this mapping is done.

I have a small budget for an hour of your time; alternately feel free to respond in public and I will buy you beer/dinner/give good mojo to FOSS4G SotM Oceania.

Thanks!

Adam

_______________________________________________
Oceania mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/oceania
Reply | Threaded
Open this post in threaded view
|

Re: Geowebcache tile naming scheme

Alex Leith
Hey Adam


Looks like the plan was `layername/projection_z/[x/(2^(z/2))]_[y/(2^(z/2))]/x_y.extension`

But then it changed along the lines of: "the bit shifting starts with 2, effectively making it `2^( 1 + ( z / 2 ))` And there's some zero-padding."

Personally, I think re-implementing the cache creation process in Python will be rather tedious and there will be a lot of mess between generating the data and having it 'just work' in GeoServer.

I'll ping you on Slack ;-) 

Cheers,




On Wed, 24 Apr 2019 at 10:08, adam steer <[hidden email]> wrote:
Hi Oceanians

is anyone out there extremely familiar with geowebcache’s tile naming schemes - for example given a grid schema what are the decisions behind how map tiles are named?

Essentially given a grid schema declaration and a bunch of imagery I need to replicate what GWC does in Python. …and unfortunately gdal2tiles / the OSM tile naming code doesn't use the same tile naming / indexing schema (it needs to match exactly an existing tiling schema - which is custom, and I haven’t managed to decrypt yet).

What I’m missing is a likely small but very critical piece of logic which will let me map from geographic bounds to tile index locations, for example from:

input_tiff(minx miny maxx maxy) -> /zoomlevel/????/????_????.png

…for output tiles in EPSG4326 (plate carree), indexed to lower left corner.

I’ve been digging into Geowebcache code, but Java does my head in and the wormholes get too deep in there. I can’t find any documentation which really explains well how this mapping is done.

I have a small budget for an hour of your time; alternately feel free to respond in public and I will buy you beer/dinner/give good mojo to FOSS4G SotM Oceania.

Thanks!

Adam
_______________________________________________
Oceania mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/oceania


--
Alex Leith
m: 0419189050

_______________________________________________
Oceania mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/oceania
Reply | Threaded
Open this post in threaded view
|

Re: Geowebcache tile naming scheme

adam steer-2
Hey Alex, 

I found that - but there’s nothing on ‘what is x’ and ‘what is y’. For example if I start y and y at bottom left (of a +-180 degree lon, +-90 lat grid), the x and y given in the tile names is noplace near where that tile exists in lat and lon (the grid schema says top left == false, so bottom left should be x=0, y=0 in the grid, right?)

I have my reasons for needing to unpack this stuff :D

Cheers

On Wed, 24 Apr 2019 at 10:24, Alex Leith <[hidden email]> wrote:
Hey Adam


Looks like the plan was `layername/projection_z/[x/(2^(z/2))]_[y/(2^(z/2))]/x_y.extension`

But then it changed along the lines of: "the bit shifting starts with 2, effectively making it `2^( 1 + ( z / 2 ))` And there's some zero-padding."

Personally, I think re-implementing the cache creation process in Python will be rather tedious and there will be a lot of mess between generating the data and having it 'just work' in GeoServer.

I'll ping you on Slack ;-) 

Cheers,




On Wed, 24 Apr 2019 at 10:08, adam steer <[hidden email]> wrote:
Hi Oceanians

is anyone out there extremely familiar with geowebcache’s tile naming schemes - for example given a grid schema what are the decisions behind how map tiles are named?

Essentially given a grid schema declaration and a bunch of imagery I need to replicate what GWC does in Python. …and unfortunately gdal2tiles / the OSM tile naming code doesn't use the same tile naming / indexing schema (it needs to match exactly an existing tiling schema - which is custom, and I haven’t managed to decrypt yet).

What I’m missing is a likely small but very critical piece of logic which will let me map from geographic bounds to tile index locations, for example from:

input_tiff(minx miny maxx maxy) -> /zoomlevel/????/????_????.png

…for output tiles in EPSG4326 (plate carree), indexed to lower left corner.

I’ve been digging into Geowebcache code, but Java does my head in and the wormholes get too deep in there. I can’t find any documentation which really explains well how this mapping is done.

I have a small budget for an hour of your time; alternately feel free to respond in public and I will buy you beer/dinner/give good mojo to FOSS4G SotM Oceania.

Thanks!

Adam
_______________________________________________
Oceania mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/oceania


--
Alex Leith
m: 0419189050


--

_______________________________________________
Oceania mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/oceania