User Tools

Site Tools


contrib:bz10m_roads_network

This is an old revision of the document!


BZ10M: Bolzano Roads Network - Network Data Model

Import
imp user/pass file=/bz10m/roads_network-current.dmp full=y

Create network (needs to be done once):

INSERT INTO USER_SDO_NETWORK_METADATA(
                network, network_category, geometry_type,
                node_table_name, node_geom_column,
                link_table_name, link_geom_column, link_direction)
        VALUES(
                'BZ_ROADS_NET', 'SPATIAL', 'SDO_GEOMETRY',
                'BZ_ROADS_NODE$', 'GEOMETRY',
                'BZ_ROADS_LINK$', 'GEOMETRY', 'UNDIRECTED');

Current version: 1.0 (9/26/2007)

The imported network data model will contain two tables: BZ_ROADS_LINK$ and BZ_ROADS_NODE$

The links are taken directly from the Spatial table road segments (linestrings). The nodes are created by generating a node for each segment start and end points.

Columns

BZ_ROADS_LINK$:

LINK_ID ID of the link. Equals to the Municipality's spatial table ID column with the following formula:
LINK_ID=ID-23800000000000 - this is because Network Model Editor is not able to visualize objects with huge IDs
START_NODE_IDID of the starting node of the link in the BZ_ROADS_NODE$
END_NODE_ID ID of the ending node of the link in the BZ_ROADS_NODE$
COST NUMBER value created for your needs. Initially - NULL
LINK_NAME Name of the link (street name). Copied from the BZ_ROADS.NAME
LENGTH The length of the link in meters, a thousandth part precision. Copied from the BZ_ROADS.LENGTH
MINUTES Amount of minutes to travel this link. Copied from the BZ_ROADS.LINK
KPH Speed limit. Copied from the BZ_ROADS.KPH
GEOMETRY Geometry column to specify link appearance. Copied from the BZ_ROADS.GEOMETRY

BZ_ROADS_NODE$:

NODE_ID ID of the node
GEOMETRY Geometry column to indicate node coordinates. Was taken from either a start or end point of each BZ_ROADS.GEOMETRY row
Creating index

If you want to use any spatial operators (such as finding all segments within distance, retrieving bounding rectangle etc.) you need to create an index for this table. How to do this for the LINK table (same for NODE, just substitute LINK$ with NODE$):

INSERT INTO USER_SDO_GEOM_METADATA(TABLE_NAME, COLUMN_NAME, DIMINFO)
       VALUES('BZ_ROADS_LINK$', 'GEOMETRY',
              SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, 0.05),
                            SDO_DIM_ELEMENT('Y', -90, 90, 0.05))
       );
CREATE INDEX BZ_ROADS_LINK$_INDEX ON BZ_ROADS_LINK$(GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
/data/www/wiki.inf.unibz.it/data/attic/contrib/bz10m_roads_network.1190818253.txt.gz · Last modified: 2019/01/16 10:03 (external edit)