-
Notifications
You must be signed in to change notification settings - Fork 16
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 do I generate tangent images for the actual earth science data in lat-lon grid? #8
Comments
I checked that you are using the equirectangular image in your examples. But what if I want to use the actual data on a spherical latitude-longitude grid as an input. |
Hi @manmeet3591, glad you like the paper! Can you be a little more specific about the format of your data? Is it truly like (lat, lon, value)? If so, what is the resolution of the sampling? |
Sorry for this late reply. |
You can look at http://schubert.atmos.colostate.edu/~cslocum/netcdf_example.html also as an example |
Do you think if I can project my data on the lat-lon grid to the projection you have used (for example the equiangular input projection file https://github.com/meder411/Tangent-Images/blob/master/examples/inputs/earthmap4k.jpg), I should be able to transform my lat-lon data to tangent images? Also I see that your input is an image, what if we want to directly input a 2d numpy array which is in equiangular projection? Can you help me with directly inputting such data to your code? |
I am presently working with a cubed-sphere projection (using https://github.com/jweyn/DLWP-CS), but I very firmly believe that tangent images is better than that as you have also explained in your paper. |
Tangent images are really nothing more than a resampling of the data to a new, lower distortion, format. If your data is already indexed by spherical coordinates (like an equirectangular image or a cubed sphere), you just need to resample from that representation to the tangent images themselves. The way this resampling is typically done is by generating a mapping *from* the source format according to the layout of the destination format. For example, this function generated the mapping from spherical coordinates to tangent images. If you run it, you will see that the output is the shape of the tangent images, and each tangent image pixel contains the spherical coordinates it should sample from. Similarly, this function expressly creates a sampling map from an equirectangular representation. If you look closely, it really just wraps that first function and adds a call to a function that converts spherical coordinates to a floating point pixel location on the equirectangular image. Not having worked with the cubed sphere, I am not exactly sure how you represent that data, but I would recommend copying the |
@meder411 Thank you very much for the elaborate answer. I got your point. Ideally how many tangent images would you recommend when we are mapping from spherical data to tangent images, is there a quantitative formula for the same to ensure that the spherical distortion is minimized. |
Hi @meder411 really nice work. I had the chance to read your paper some months ago and was looking out for the best possible way to transform my earth science data to tangent images and back. I can see that the example you gave in your medium post is from data on the sphere with Earth as an example and also the animation on the readme of this github repository, but how can I actually generate tangent images from the lat-lon gridded dataset ?
The text was updated successfully, but these errors were encountered: