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

Support for warp? #123

Closed
alex-s-gardner opened this issue Feb 8, 2023 · 4 comments · Fixed by #126
Closed

Support for warp? #123

alex-s-gardner opened this issue Feb 8, 2023 · 4 comments · Fixed by #126

Comments

@alex-s-gardner
Copy link
Contributor

Are there any intentions for GeoArrays to support warping between projections?

@evetion
Copy link
Owner

evetion commented Feb 11, 2023

Do you have a specific form of warp in mind? Only a vertical change, or creating completely new geoarrays? Maybe warp from one GeoArray into another one? That would help with designing an api.

The options for warping in pure Julia are limited, but we should be easy to call GDAL for this.

@alex-s-gardner
Copy link
Contributor Author

@evetion I've been using the interpolations.jl which seems pretty fast. The one thing that I do a lot is interpolate (warp) one array into the same extent, projection and resolution as another array so they can be operated on together.

@evetion evetion mentioned this issue Mar 27, 2023
2 tasks
@evetion
Copy link
Owner

evetion commented Mar 31, 2023

Interpolations.jl might be nice for a package extension. I've implemented gdalwarp in version 0.8.

ga = GeoArray(zeros((360, 180)))
bbox!(ga, (min_x=-180, min_y=-90, max_x=180, max_y=90))
crs!(ga, GeoFormatTypes.EPSG(9754))
ga2 = GeoArrays.warp(ga, Dict("t_srs" => "EPSG:4326+3855"))

There's also warp(ga, like::GeoArray), which retrieves the crs, extent and size from the like GeoArray.

Arguments in the Dict are described in https://gdal.org/programs/gdalwarp.html

@alex-s-gardner
Copy link
Contributor Author

Ohhh... the new like::GeoArray is a fantastic addition

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

Successfully merging a pull request may close this issue.

2 participants