-
Notifications
You must be signed in to change notification settings - Fork 41
20km UTM tile splitter #745
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
Comments
@VincentVerelst see also this existing code for reuse: |
that code is already existing in WEED jobmanager.... also have a look on my optimized global UTM 20km grid with the name grid20. That is reducing overburden in the processing and removed the flaws of the UTM and MGRS |
my function construct hands back a standard openEO BBOX for the processing |
Currently, in GFMap we have these FeatureCollection splitters that group all geometries by S2 tile and return a list of all these groups. The splitting is based on this grid of non-overlapping S2 tiles, which I received from Kristof Van Tricht (can't tag him): https://artifactory.vgt.vito.be/artifactory/auxdata-public/gfmap/s2grid_voronoi_4326.parquet. We could do the following:
Things to discuss:
|
@VincentVerelst this specific issue is not yet about feature splitting, it's about the easier case of splitting a single AOI into smaller ones, like in the example method signature I added in the description. |
@VincentVerelst @jdries I finish my "AOI_tiler" to be uniform for EU and globe context. If you can upload my grids also on the artifactory then it will be even more universal. The output of the AOI_splitter is always a (geo)pandas dataframe where you can then add some additional columns (like start, end, etc) and directly run in the jobmanager. in the pandas dataframe you have a column called bbox_dict which is then the openEO BBOX representation of the tiled AOI. I use then to extra functions to convert it in the start_function back to a dict. I had no time to allow as input to the "AOI_tiler" other as geopandas (in what ever crs you want). but I also plan to allow: BBOX (openEO BBOX format), shapely polygon (4326), GeoJson (only 4326) and THEN the output is always a (geo)pandas Dataframe with all data needed for the tiles. i prepare some running examples for EU and global at the moment and then send it to you guys. use what you think is useful. |
@jdries @VincentVerelst I wrote now the fully universal AOI splitter.... it eats as input every format you can think of (shapley polygon, openEO BBOX, Geopandas Dataframe, geoparquet or GeoJSON) and also the respected tiling grid can be everything from local file, loaded geoparquet from url, keyword for internal ressources or a GeoJSON object. Output is a Geopandas dataframe with each row representing a tile (geometry) intersecting with the given AOI. You can optional also merge in columns from the original AOI file (like your parameters or so). here is a Notebook which shows that all is working - I tested all possibilities of input against each other: |
for feature extraction I do not need it since I follow there a different strategy, but even that should be not issue to implement in this function. function name is: AOI_tiler |
Example grid: https://artifactory.vgt.vito.be/ui/repos/tree/General/auxdata-public/grids/utm-tiling-grid-20km.gpkg
Define a function like this:
def split_area(aoi: Union[bounds, shapely.Geometry], projection="AUTO:42001", tile_size:float=20.0)
That simply returns a list of geometries that define grid cells, coordinates should be in projection.
Then we want to make it trivial to construct a job_db based on this, so wrap this code in a function:
The text was updated successfully, but these errors were encountered: