We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If an empty "upstream" input is passed to the function, could we make it return the CFE input files for the whole geopackage?
data_access_examples/subsetting/subset.py
Line 232 in 9101c4c
This would allow us to combine (and perhaps reference) the functionality of the script living here (and copied below for reference.)
See also: https://github.com/NOAA-OWP/ngen/pull/459/files#r1179488490
import geopandas as gpd import pandas as pd import json import argparse from shapely.geometry import Point def main(): #setup the argument parser parser = argparse.ArgumentParser() parser.add_argument("-i", dest="infile", type=str, required=True, help="A gpkg file containing divides and nexus layers") parser.add_argument("-C", dest="catchments_prime", type=str, required=True, help="Hydrofabric catchments destination") parser.add_argument("-N", dest="nexuses_prime", type=str, required=True, help="Hydrofabric nexus desination") args = parser.parse_args() infile = args.infile catchments_prime = args.catchments_prime nexuses_prime = args.nexuses_prime print("Reading catchment data...") df_cat = gpd.read_file(str(infile), layer="divides") print("Reading nexus data...") df_nex = gpd.read_file(str(infile), layer="nexus") df_cat.set_index('id', inplace=True) df_nex.set_index('id', inplace=True) print("Reprojecting catchments...") df_cat = df_cat.to_crs(epsg=4326) print("Reprojecting nexuses...") df_nex = df_nex.to_crs(epsg=4326) print("Writing catchment data...") df_cat.to_file(catchments_prime, driver='GeoJSON') print("Writing nexus data...") df_nex.to_file(nexuses_prime, driver='GeoJSON') print("Complete!") if __name__ == "__main__": main()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If an empty "upstream" input is passed to the function, could we make it return the CFE input files for the whole geopackage?
data_access_examples/subsetting/subset.py
Line 232 in 9101c4c
This would allow us to combine (and perhaps reference) the functionality of the script living here (and copied below for reference.)
See also: https://github.com/NOAA-OWP/ngen/pull/459/files#r1179488490
The text was updated successfully, but these errors were encountered: