-
Notifications
You must be signed in to change notification settings - Fork 8
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
RasterLayer reprojection #37
Comments
Note you can just use the existing |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: this original "RFC" is only for a single, simple GeoTIFF. A multi-resolution image like a COG is much harder because you have to handle visibility of internal tiles to figure out what to load.
There's a continuum of options between reprojecting every pixel and reprojecting only the corners.
return
. From QUESTION: How to get WGS 84 coordinates from GeoTiff? geotiffjs/geotiff.js#176:Therefore, to reproject an arbitrary pixel, given
source_crs
,dest_crs
,pixel_x
,pixel_y
,image_height
,image_width
(watch out for flipped-y coordinates in images), you should be able to do something like the pseudocode:Then the next question is how many points to reproject. You can reproject only the corners, but for non-linear transformations, the inner pixels won't be in exactly the right place.
Alternatively you can reproject every image pixel, so that every pixel is in exactly the right position. To do this, you'd modify the existing mesh-creation code. (Since 8.2 when the GlobeView was added, the BitmapLayer creates a mesh and uses the
GL.TRIANGLES
draw mode.) The simplest way to do this then is to make a uniform mesh where every pixel gets two triangles. Then use those triangles as the inner mesh state.References:
The text was updated successfully, but these errors were encountered: