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?
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.
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 https://github.com/icesat2py/icepyx/pull/331#discussion_r1005759533_
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.