SHPReadParse

class pydriosm.reader.SHPReadParse[source]

Read/parse Shapefile data.

Examples:

>>> from pydriosm.reader import SHPReadParse

>>> SHPReadParse.EPSG4326_WGS84_PROJ4
'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'

>>> SHPReadParse.EPSG4326_WGS84_PROJ4_
{'proj': 'longlat', 'ellps': 'WGS84', 'datum': 'WGS84', 'no_defs': True}

Attributes

ENCODING

str: The encoding method applied to create an OSM shapefile.

EPSG4326_WGS84_ESRI_WKT

str: The metadata associated with the shapefiles coordinate and projection system.

EPSG4326_WGS84_PROJ4

str: Proj4 of EPSG Projection 4326 - WGS 84 (EPSG:4326) for the setting of CRS for shapefile data.

EPSG4326_WGS84_PROJ4_

dict: A dict-type representation of EPSG Projection 4326 - WGS 84 (EPSG:4326) for the setting of CRS for shapefile data.

LAYER_NAMES

set: Valid layer names for an OSM shapefile.

SHAPE_TYPE_GEOM

dict: Shape type codes of shapefiles and their corresponding geometric objects defined in Shapely.

SHAPE_TYPE_GEOM_NAME

dict: Shape type codes of shapefiles and their corresponding geometry object names

SHAPE_TYPE_NAME_LOOKUP

dict: Shape type codes of shapefiles and their corresponding names for an OSM shapefile.

VECTOR_DRIVER

Name of the vector driver for writing shapefile data; see also the parameter driver of geopandas.GeoDataFrame.to_file().

Methods

find_shp_layer_name(shp_filename)

Find the layer name of OSM shapefile given its filename.

merge_layer_shps(shp_zip_pathnames, layer_name)

Merge shapefiles over a layer for multiple geographic regions.

merge_shps(shp_pathnames, path_to_merged_dir)

Merge multiple shapefiles.

read_layer_shps(shp_pathnames[, ...])

Read a layer of OSM shapefile data.

read_shp(shp_pathname[, engine, emulate_gpd])

Read a shapefile.

unzip_shp_zip(shp_zip_pathname[, ...])

Unzip a zipped shapefile.

validate_shp_layer_names(layer_names)

Validate the input of layer name(s) for reading shapefiles.

write_to_shapefile(data, write_to[, ...])

Save .shp data as a shapefile by PyShp.