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

WESM Simplified Polygon Output #13

Closed
Jack-Hayes opened this issue Oct 25, 2024 · 3 comments
Closed

WESM Simplified Polygon Output #13

Jack-Hayes opened this issue Oct 25, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Jack-Hayes
Copy link
Member

version: 0.1.dev28+gf5aee55
Python: 3.12.5 custom env

coincident.search.search(dataset='3dep' outputs simplified polygons from simplify_footprint() in src/coincident/search/wesm.py

Hasn't been a major issue except when I was looking at use case workunit == "CO_WestCentral_2019" where the simplified polygon via the 'coincident' search is drastically different than the actual WESM polygon.

Could implement an argument for toggling simplify() and some of it's parameters?

@scottyhq scottyhq added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 26, 2024
@scottyhq
Copy link
Member

To speed up the initial search, I actually just created a separate parquet file of convex hulls rather than simplified polygons of all geometries! I wanted to be able to query the remote WESM.gpkg efficiently, but couldn't figure out a way. So opted for a 2 stage search to 1. find workunit/feature id based on the fast convex hull search then 2. use the feature id to just get the single detailed polygon from the remote WESM (which is fast).

def search_convex_hulls(

But yes, some of them are odd, so using simplify_footprint is probably a better approach!
https://github.com/uw-cryo/stv-aux-data/blob/main/WESM-chulls.geojson

@scottyhq
Copy link
Member

I just learned from https://github.com/mapbox/geojson.io/blob/main/API.md that you can point to public geojson files on github (which renders much nicer than GitHub's default!

https://geojson.io/#id=github:uw-cryo/stv-aux-data/blob/main/WESM-chulls.geojson

Or any public URL: https://geojson.io/#data=data:text/x-url,https://raw.githubusercontent.com/uw-cryo/stv-aux-data/main/WESM-chulls.geojson

@scottyhq
Copy link
Member

in #4 I've switched to just initially searching WESM working bounding boxes . Remote querying the native resolution polygons of the WESM.gpkg is very slow via ogr/geopandas, so the options are really to 1. pre-fetch the entire 1.8GB file or be 2. clever about searching.

Could be good to add a documentation page showing the differences of bbox, convex_hull, and actual polygon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants