rnet.model#

rnet.model(*paths, crs=4326, keep_vertices=False, keep_links=False, reindex_nodes=True, layer_name='lines', exclude=[], r=0.001, p=2, place_radius=0)#

Construct a model from multiple data sources.

Parameters
*pathsstr

A single directory path or multiple file paths. The following file types are supported:

  • OSM files containing street map data

  • TIF files containing elevation data

  • CSV files containing place data

crsint, optional

EPSG code of model CRS. The default is 4326.

Returns
Model
Other Parameters
keep_vertices, keep_linksbool, optional

If True, then the sets of vertices and links are retained in the model. The defaults are False.

reindex_nodesbool, optional

If True, then nodes are indexed using a range starting at 0. Otherwise, nodes inherit IDs from the set of vertices. The default is True.

New in version 0.0.7.

layer_namestr, optional

Name of the layer from which OSM features are read. The default is ‘lines’.

excludeList[str], optional

Tags to exclude when reading OSM files. By default, the following tags are included: ‘living_street’, ‘residential’, ‘unclassified’, ‘tertiary_link’, ‘tertiary’, ‘secondary_link’, ‘secondary’, ‘primary_link’, ‘primary’, ‘trunk_link’, ‘trunk’, ‘motorway_link’, ‘motorway’.

rfloat, optional

Search radius for nearby points in degrees, used for querying elevations via IDW interpolation. The default is 0.001.

pint, optional

Power setting for IDW interpolation. The default is 2.

place_radiusfloat, optional

If given, this radius is used to form place groups and create areas. Places form a group if they are located within this radius. The area of a place group is formed by the union of circles centered at each group member with this radius. Units should match those of the given crs. The default is 0.

New in version 0.0.7.