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

cannot load some tiff files #219

Open
chenghuzi opened this issue Oct 10, 2018 · 12 comments
Open

cannot load some tiff files #219

chenghuzi opened this issue Oct 10, 2018 · 12 comments
Assignees

Comments

@chenghuzi
Copy link

Describe the bug
Thanks for your great work on online tiff browsing first! It's really helpful!

I try to use geotiff.io to visualize one of my tiff files: odm_orthophoto.original.tif. And the geotiff.io just give me something like this in the map region:

I'm new to geotiff visualization. So I'm not sure if this is caused by the file format or a geotiff.io's bug.
I tried some other tiff files, some of them works while others don't.

Here are some other examples of the failed tiff files (from geotiff.js's test data):

  1. cielab.tif will end by infinite raster loading loop, showing "Loading Raster"
  2. cmyk.tif Same issue as above.

And one successful example:

  1. rgb.tiff
@DanielJDufour
Copy link
Member

@Tigeraus , thank you so much for testing this and catching these bugs! I will look into them immediately! :-)

@DanielJDufour
Copy link
Member

Here's the output from gdalinfo of your .tif file. It'll help us debug:
image

@DanielJDufour
Copy link
Member

Issue seems to be that geotiff.io didn't successfully parse the projection. I'll continue to look into this more:
image

@DanielJDufour
Copy link
Member

Thank you for catching this error. It appears that your raster doesn't load because georaster-layer-for-leaflet doesn't support UTM.

I created an issue for this library here: GeoTIFF/georaster-layer-for-leaflet#5

@chenghuzi
Copy link
Author

Thanks for your information. I test this with a transformed file odm_orthophoto.originaly.tif and I think it meets the format requirements now. This time it seems the geotiff.io has properly find the coordinates, but the image has not been rendered yet. See:

.

Since I have 4 channels in this tiff file, is this issue caused by the alpha channel?

@chenghuzi
Copy link
Author

Update: It works after removing the alpha channel. Can we get a higher resolution for this file in geotiff.io?

Geotiff.io view:

macOS preview:

@chenghuzi
Copy link
Author

Increasing the zoom level can make some improvement but the render effect is not satisfying enough.
See:

Is this a result of direct rendering rather than rendering with some interpolation?

@DanielJDufour
Copy link
Member

DanielJDufour commented Oct 29, 2018

@Tigeraus , thank you for your feedback. This is very helpful for us! :-)

georaster-layer-for-leaflet uses a super simple nearest neighbor interpolation. It sets the resolution here: https://github.com/GeoTIFF/georaster-layer-for-leaflet/blob/master/georaster-layer-for-leaflet.js#L114 The resolution is a measurement of how many pixels to sample for the rendered canvas.

I have created an issue for this and assigned it top-priority. #220

Would a URL param and an advanced setting tool with an ability for the user to configure the resolution meet your need?

@chenghuzi
Copy link
Author

Yes, a URL param configuration is enough for a web app. But I think it would be better for those who want to customize this app if you can add some static configuration approaches like a json or yaml file.

@DanielJDufour
Copy link
Member

yes @Tigeraus , that is a great idea! Among the solutions listed below, which is most important to you. We'll work on that first! :-)

  1. config.yml file
  2. config.json file
  3. url param
  4. advanced user settings

@DanielJDufour
Copy link
Member

Hi, @Tigeraus . I just wanted to let you know that you can now adjust the resolution of the raster based on the url URL Param. You can learn more about it here: https://github.com/GeoTIFF/geotiff.io/blob/master/ADVANCED_FEATURES.md#adjusting-resolution

I'm still working on the other solutions like the configuration JSON and/or YAML

@chenghuzi
Copy link
Author

Wow, that's cool! thanks a lot!

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

2 participants