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

L2 preprocessing #133

Open
mdsumner opened this issue Feb 18, 2023 · 1 comment
Open

L2 preprocessing #133

mdsumner opened this issue Feb 18, 2023 · 1 comment

Comments

@mdsumner
Copy link
Member

mdsumner commented Feb 18, 2023

get a rough bbox

This for northernmost_latitude etc, files should have this or similar (and how can we get this anyway, surely someone has indexed this for ocean colour?)

ncmeta::nc_atts(f[1]) |> dplyr::filter(variable == "NC_GLOBAL", stringr::str_detect(name, "most")) 

get the boundary in longlat

This is the top,right,bot,left rows and columns in the longlat array as a path.

create VRT

vapour_vrt(sds_var, geolocation = c(sds_lon, sds_lat))

Now, process the VRTs based on the bbox or point in polygon above.

add this logic to GDAL

GDALwarp of VRT should first cull on that bbox, then by the boundary if no bbox, and finally the geolocation arrays should be detected by the driver, so it could potentially be as fast as us doing a pre-filter on the VRTs.

@mdsumner
Copy link
Member Author

the gdal cull might already be done here OSGeo/gdal#7243

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

No branches or pull requests

1 participant