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

accept all vector file inputs #384

Open
JessicaS11 opened this issue Oct 26, 2022 · 0 comments
Open

accept all vector file inputs #384

JessicaS11 opened this issue Oct 26, 2022 · 0 comments

Comments

@JessicaS11
Copy link
Member

    At L361, it says `if spatial_extent.split(".")[-1] in ["kml", "shp", "gpkg"]:` which restricts the possible file types to KMLs, shapefiles and geopackages. However at L114, the code uses `gpd.read_file(spatial_extent)`, which should mean that any other OGR supported vector file format should work (e.g. GeoJSON, FlatGeoBuf, etc).

Do you think it's possible to remove the hardcoded file extension check at L361? Maybe a try-except statement to see if the file can be read directly into a geopandas.GeoDataFrame?

Originally posted by @weiji14 in #331 (comment)

Theoretically, the NSIDC subsetter should accept any vector file that is also supported by OGR. We'd like to remove the file format restrictions, but need to add some more tests/confirm that this tracks.
See also the brief discussion in the PR.

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