Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify tile size? #737

Open
banesullivan opened this issue Dec 16, 2021 · 2 comments
Open

Specify tile size? #737

banesullivan opened this issue Dec 16, 2021 · 2 comments

Comments

@banesullivan
Copy link
Contributor

Is there a way to specify the tile size? currently, they are 256x256 but could I use 512x512?

@manthey
Copy link
Member

manthey commented Dec 16, 2021

The python API lets you specify tile size in the tileIterator. The default getTile returns the size that is stored in the file (assuming that it is vaguely sensible) or, if a tile source doesn't report a desired tile size, it defaults to 256.

For the GDAL and OpenJPEG sources, this would be an easy thing to expose and change, at least for powers of 2 (though there should probably still be limits). For other sources, this is more complicated (but still shouldn't be very hard).

Generally, I think this would add two more optional parameters when opening a tile source (tileWidth and tileHeight). Initially, we could implement this for just specific sources with whatever requirements those source deem appropriate (e.g., powers of two). One other possible route to this generalizing feature is if we make a "multi source" (#680), then the specification of that could include tile size in an easy generic way.

@manthey
Copy link
Member

manthey commented Jan 28, 2022

As of #764, you can have an extra yaml file that changes how tiles are stored (though this doesn't yet support geospatial sources). This could be done via:

tileWidth: 512
tileHeight: 512
sources:
  - path: <file>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants