WigglyRivers.nhd_extract package

Submodules

WigglyRivers.nhd_extract.nhd_extract module

This class open the data and do preprocessing of the data.

class WigglyRivers.nhd_extract.nhd_extract.ExtractNHDPlusHRData(path_output, name='file', comid_name='NHDPlusID', logger=None, **kwargs)[source]

Bases: object

Basic class to load and pre-processes NHD data. This class opens the NHDPlus High-Resolution data and extracts the information needed to run the meander characterization code.

The NHDPlus High-Reolution data can be downloaded from the following link: https://www.usgs.gov/national-hydrography/nhdplus-high-resolution

The following are the available attributes

Attribute

Description

path_out

path to save the files.

save_format

save format of the information, the formats are:

‘p’: pickle.

‘json’: json type file.

‘mat’: MATLAB type file.

‘csv’: csv type file.

‘txt’: txt type file.

nhd_tables

NHD tables to be loaded, by default it will load the ‘NHDPlusFlowlineVAA’, ‘NHDPlusEROMMA’, ‘NHDPlusIncrPrecipMA’, ‘NHDPlusIncrTempMA’

The following are the methods of the class.

Methods

Description

set_logger

Set the logger to show every process.

get_data_from_nhd_gdb

Extract coordinates and tables from NHD GDB.

load_nhd_data

Loads the tables and coordinates from the NHD GDB.

get_data_from_nhd_gbd(file_data, flowlines='NHDFlowline', comid='NHDPlusID', tables=None, projection=None)[source]

Description:

Get table data from the NHD GBD.


Args:

param file_data:

str, GBD data file.

type file_data:

str

param flowlines:

str, Layer in the NHD data set that has the Flowlines.

type flowlines:

str

param tables:

str, Additional tables that will be asociated to the flowlines.

type tables:

str

param comid:

str, default NHDPlusID. comid of the NHD files.

type comid:

str

param projection:

str, default epsg:2856. Projection of the NHD file into geographic coordinates to calculate the distances.

type projection:

str

param save_shp:

bool, default True. Save shapefile with initial table.

type save_shp:

bool

load_nhd_data(data_table, data_coords=None, **kwargs)[source]
DESCRIPTION:

Get table data from the NHD GBD.

Raw data table.

param data_coords:

str, Coordiantes in the pickle file.

dictionary with new data.

property logger

logger for debbuging

property nhd_tables

nhd tables to be extracted

property path_output

path for data saving

property save_format

save format of the files

Module contents