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

GeoTIFF support #2930

Open
aiqibaobei opened this issue Oct 12, 2024 · 5 comments
Open

GeoTIFF support #2930

aiqibaobei opened this issue Oct 12, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@aiqibaobei
Copy link

Dear MapLibre Development Team,

I hope this message finds you well. I am exploring the capabilities of the MapLibre library and would like to know if it supports loading large GeoTIFF files directly. If this functionality is not natively supported, could you provide guidance on how to implement this using GDAL or other libraries to handle large GeoTIFF files effectively within a MapLibre environment?

Thank you for your assistance!

@ntadej
Copy link
Collaborator

ntadej commented Oct 12, 2024

I would propose to ask this at the main https://github.com/maplibre/maplibre-native repository as I am not familiar with that functionality specifically.

@ntadej ntadej transferred this issue from maplibre/maplibre-native-qt Oct 14, 2024
@louwers louwers changed the title load and render local tiff GeoTIFF support Oct 14, 2024
@louwers louwers added the enhancement New feature or request label Oct 14, 2024
@louwers
Copy link
Collaborator

louwers commented Oct 14, 2024

MapLibre Native supports image sources, maybe that is an option for you.

Right now there is no special support for GeoTIFF as far as I am aware.

@aiqibaobei
Copy link
Author

Yes, I have tried to add some small GeoTIFFs using the following code:
sources: {
"image": {
"type": "image",
"url": "https://maplibre.org/maplibre-gl-js/docs/assets/radar.gif",
"coordinates": [
[-80.425, 46.437],
[-71.516, 46.437],
[-71.516, 37.936],
[-80.425, 37.936]
]
}
}
However, I found that when the TIFF becomes large, loading becomes very sluggish. Perhaps the underlying code is converting it to PNG format. My goal is to use GDAL to dynamically load the original images within a certain range when the map moves or zooms, and to use thumbnails when the camera height is higher, similar to QGIS. It seems that I should customize a source and layer. Do you have any ideas or suggestions? Will your team add similar functionality in the future? It seems that the native library has the potential to load GeoTIFFs.

@kebekus
Copy link

kebekus commented Oct 22, 2024

@aiqibaobei As far as I understand, loading images is supported, but MapLibre was never designed to handle large images efficiently. However, there is a clean solution for your problem: use MBTiles instead. MBTiles are designed to contain pre-computes graphic assetts for various zoom levels and will be rendered with blazing speed, even on low-end or handheld devices.

@aiqibaobei
Copy link
Author

@aiqibaobei As far as I understand, loading images is supported, but MapLibre was never designed to handle large images efficiently. However, there is a clean solution for your problem: use MBTiles instead. MBTiles are designed to contain pre-computes graphic assetts for various zoom levels and will be rendered with blazing speed, even on low-end or handheld devices.

Thank you for the suggestion!

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

No branches or pull requests

4 participants