-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Email [email protected] if you wish to contact the USGS Science Data Management (SDM) team’s application support inbox directly with bugs or feature requests. Otherwise, use the template below.
Is your feature request related to a problem? Please describe.
Now that the ArcGIS version of the tool is no longer supported it would be useful to allow a data from a file geodatabase (.gdb) to be used to populate the entity and attribute and potentially spatial import.
Describe the solution you'd like
The current distribution includes copies of Geopandas and Fiona that can be used to read the required information from a file geodatabase. One issue that would need to be solved is that navigating to a feature class or table in the .gdb structure will need a two step process where you first use a folder browser to navigate to the .gdb folder, and then a custom 'file' picker to select the feature layer or table to import. This would likely require a second custom button "import from file gdb" and a custom widget to handle this process.
Describe alternatives you've considered
None
Additional context
#This is exploratory code showing how this might be accomplished...
import fiona
import geopandas as gpd
import pandas as pd
gdb_path = "SomeFileGeodatabase.gdb"
layers = fiona.listlayers(gdb_path)
# these would be used to populate a second picklist of available layers
print("Layers in the geodatabase:")
for layer in layers:
print(layer)
layer_name = 'selected_layer'
gdf = gpd.read_file(gdb_path, layer=layer_name)
df = pd.DataFrame(gdf.drop(columns='geometry'))
# this df can then go directly into the EA builder