-
Notifications
You must be signed in to change notification settings - Fork 47
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
How could I get right tile (WGS 84 / Lat-lon / Geographic / EPSG:4326) by long, lat and zoom? #53
Comments
For GIBS GCS, the level 0 resolution is 288 deg / tile, not 180 deg/tile. It was chosen to approximate the full resolution of the MODIS images, avoiding oversampling or undersampling, while still having full width tiles at most levels (2 and up). Making this adjustment, the formula to use is:
|
@lucianpls oh big thanks it works 🎉 ! I've spent weekend on it trying understand why it doesn't work 😫 , you should put this magic number into wiki of GIBS or something like that, it will be very helpful |
If you fetch and process the WMTS capabilities response from GIBS, you'll find all the information there, just as the standard requires. But there are hardly any software clients that do that, most expect a binary division of the whole world. Which only works for global projections and for a fixed set of resolutions. If you have real data and you don't want to distort it too much, using custom tiling grids is the only choice. |
hm, sadly I'm not so deep in GIS yet. What do you mean by |
Web Mercator assumes the world map fits in a square tile of 256x256, then keeps subdividing. There is also a GCS grid where the whole world fits in two tiles side by side at top level, the way your original formula works. There are no partial content tiles ever. Those are the most common tiling schemes. You might want to look at GDAL, it has python bindings and knows how to fetch the data from GIBS, using the GDAL WMS, hiding the tiling aspect. |
Thanks! Yes, I'm using both projections and going to try Btw, I know it is completely unrelated to current issue, but is these issues good place for asking questions slightly related to how is it better to work with NASA GIBS?
|
Scroll down to "Script-level Access via GDAL"
https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers
Cycle through dates to pull animation frames.
…________________________________
From: Eugene Krevenets [notifications@github.com]
Sent: Monday, May 08, 2017 5:52 AM
To: nasa-gibs/onearth
Cc: Subscribed
Subject: Re: [nasa-gibs/onearth] How could I get right tile (WGS 84 / Lat-lon / Geographic / EPSG:4326) by long, lat and zoom? (#53)
I know it is completely unrelated to current issue, but is those issues<https://github.com/nasa-gibs/onearth/issues/> good place for asking questions slightly related to how is it better to work with NASA GIBS?
* I'm trying to show gif animation of Earth random rectangle area. Thanks to you I've found how to get tile by location but is there any tool which sticks and animates GIBS tiles?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#53 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHBln87OkjsogE6tcGQqL-3dcM6vZXlNks5r3w_8gaJpZM4NTRqV>.
|
@jeffreyrhall @lucianpls thanks for your help! btw after some searching I've found that other folks use another much more useful API, based on https://gibs.earthdata.nasa.gov/image-download endpoint. I wonder why I can't find any information about this endpoint on noted wiki https://wiki.earthdata.nasa.gov/ or official NASA pages? |
That endpoint is not a standards-based service and is not an official GIBS imagery endpoint. Obviously, we're not obscuring its existence for those that can sniff it out in the web traffic. Access methods such as the GDAL WMS driver described previously leverage our more efficient tile-based APIs. Image download currently does not, which has performance implications for both server and client. This is something we may formally support in the future, but for now it is not advertised. With regards to providing a simple way to get the tile for a specified lat/lon/zoom... others have provided the math in here. However, this is one of those things that it would be nice if we had a script in our toolkit that one could run. I know I would benefit. Feel free to contribute to the open source project if you want! :) |
@mcechini Big thanks for your help! I love NASA open data, and I like hack it :). And actually these issues are part of my space apps challenge project https://github.com/botstory/nasa-bot where I try to create chat bot assistant to GIBS dataset :). I thought it would be much easy but stuck exactly on trying to show right map region by coords so noted endpoint https://gibs.earthdata.nasa.gov/image-download would save a lot of time on prototyping phase. But actually I have almost done client to download and compose map animation and once it would work property I could extract it to separate python utility/service which could be used for creating map animation. Hope I'm not reinventing the wheels :) |
Sounds like great work. If there are things you want to contribute back to the project, we can take a look if there is a place for it. |
@mcechini thanks! I will ;) |
I'm trying to get tile by long, lat and zoom by formula:
but it doesn't work.
Here is related question https://gis.stackexchange.com/questions/239496/how-to-convert-long-lat-to-a-tile-of-nasa-gibs-wgs-84-lat-lon-geographic
The text was updated successfully, but these errors were encountered: