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

Make tiles from GeoTiff #22

Open
andrewyushkevich opened this issue Jun 23, 2017 · 8 comments
Open

Make tiles from GeoTiff #22

andrewyushkevich opened this issue Jun 23, 2017 · 8 comments

Comments

@andrewyushkevich
Copy link

Hi @ozak

I'd like to ask if it's possible to create tiles from GeoTiff with your lib?
I can't find such def, but maybe I miss something.

Thanks.

@ozak
Copy link
Owner

ozak commented Jun 26, 2017

Hi @andrewyushkevich ,

I think what you want can be implemented by using some of the functions in georasters. E.g. you could use the clip function to clip the different tiles. Or the extract function. Then you can use the to_tiff function to export. Or were you thinking of something more specialized?

I hope this helps.

@andrewyushkevich
Copy link
Author

andrewyushkevich commented Jun 26, 2017

Or were you thinking of something more specialized?

I just want to get tiles dataset typical {z}/{x}/{y} type for using with Openlayers or Leaflet.
Think, that I could cut GeoTIFF raster with your georaster lib, but I don't understand how to work with different scales in it.

@ozak
Copy link
Owner

ozak commented Jun 26, 2017

I think you will need to use gdal2tiles see here.

@andrewyushkevich
Copy link
Author

andrewyushkevich commented Jun 26, 2017

Yes, I've seen this lib, but gdal is quite "big" for the one thing I need.

btw, thanks for help.

@ozak
Copy link
Owner

ozak commented Jun 26, 2017

From what I understand it is all about the name of the directories and files, right? So in principle you could use what I said and export in the correct structure. If you do figure this out, please consider posting the way you did it and submitting a PR, which may be useful to others. Sorry I do not have the time to figure this out right now. I think the main issue will be to convert to png at the end, which may require imagemagick or something similar.

@ozak
Copy link
Owner

ozak commented Jun 26, 2017

Perhaps this may be useful to figure out what the different directory elements are. I guess for the zoom you can use one of the various functions in the library, e.g. block_reduce.

@ozak
Copy link
Owner

ozak commented Jun 26, 2017

And this or this for the conversion.

@sposs
Copy link

sposs commented Feb 26, 2018

I had the same issue, and I simply use the gdal_retile.py script. I had to change it a little bit because the default interface is not very nice, but overall it does the job nicely.
http://www.gdal.org/gdal_retile.html

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

No branches or pull requests

3 participants