Network datasets in PostgreSQL

Network datasets are collections of feature classes that possess a connectivity relationship. Network datasets are created using three types of sources—edge feature sources, such as street centerlines; junction feature sources, such as point feature classes containing railroad crossings; and turn feature sources. They are used to model transportation. To use network datasets, you must have the ArcGIS Network Analyst extension installed.

Network datasets in ArcGIS for Desktop

In the Catalog tree, feature datasets that contain network datasets in PostgreSQL look the same until you expand the dataset. Once the dataset is expanded, you see the network dataset, which is represented by the following icon:

Network dataset icon

The name of the network in a geodatabase in PostgreSQL contains the database name, the name of the network owner, and the name of the network itself.

For example, a network dataset, road_network_nd, owned by hbear in the geodatabase m16, would be listed in the Catalog tree as m16.hbear.road_network_nd.

When you create a network dataset, a system junctions feature class is also created. This feature class has the name of the network dataset followed by _Junctions.

Network datasets in a PostgreSQL database

Network datasets are tracked in the gdb_items table. The gdb_itemtypes table stores a value indicating that the object is a network dataset. The gdb_itemrelationships table stores information on how the network and the feature dataset it is in are related.

There are also tables that are created in the schema of the user who owns the network dataset. They are as follows:

The ID in the names of the first six tables is the logicial network ID. The itemID in the last two tables is the objectid from the gdb_items table.

The structures for the tables are as follows:

n_<id>_desc

The n_<id>_desc table contains items for each junction, edge, and turn element in the network dataset.

Field name

Field type

Description

Null?

oid

integer

The unique identifier of an element in a network

NOT NULL

userclassid

integer

The identifier of the feature class to which the element belongs

NOT NULL

userid

integer

The ObjectID of the feature

NOT NULL

usersubid

integer

The identifier of an element in a feature; only applicable to complex edge features

NOT NULL

elementtype

smallint

A code indicating the type of network element

NOT NULL

eid

integer

The unique element identifier of the network element; only unique for the type of network element

NOT NULL

n_<id>_prop

The n_<id>_props table contains a summary description of a network's properties, such as element counts and maximum EID values.

Field name

Field type

Description

Null?

propertyid

integer

The unique identifier of the network property

NOT NULL

propertyname

varchar(32)

The name of the property

NOT NULL

propertyvalue

integer

The value of the property

NOT NULL

nd_<itemID>_dirtyareas

The nd_<itemid>_dirtyareas table tracks what spatial features in the network dataset have been edited.

Field name

Field type

Description

Null?

objectid

integer

Unique identifier for the record

NOT NULL

isretired

integer

Indicates whether this feature is still used to track the dirty area of a network dataset

NOT NULL

dirtyarea

st_geometry

geometry

The polygon geometry of the dirty area

nd_<itemID>_dirtyobjects

The nd_<itemid>_dirtyobjects table tracks edited relational objects in the network dataset such as turns and historical traffic records.

Field name

Field type

Description

Null?

objectid

integer

Unique identifier for the record

NOT NULL

classid

integer

The objectID of the dirty object item in the gdb_items table

NOT NULL

oid

integer

The object ID of the dirty object

NOT NULL

updatetype

smallint

The type of edit performed—insert (0), update (1), or delete (2)—that resulted in the dirty object

NOT NULL

All of the remaining network tables contain the same field names and types. Their structure is as follows:

Field name

Field type

Description

Null?

oid

integer

The unique identifier of the bytea page in the table

NOT NULL

pagenumber

integer

The number of the bytea page in the table

NOT NULL

pageblob

bytea

The description for the element the table is describing, such as edge and edge status

tableid

integer

For the n_<ID>_edgeweight, n_<ID>_turnweight, and n_<ID>_junctionweight BLOB tables, the tableID is the weightID. For the n_<ID>_topology BLOB table, the tableID is the position of the original table within the array of topology tables defined in the GeoDatabase\GeoDatabase\Network\Network\TableDefs.h file.

NOT NULL

The following is a diagram of a network dataset in PostgreSQL:

Network dataset tables in PostgreSQL

Dashed lines indicate implicit relationships between columns.

There are additional, optional tables you may use as part of your network dataset to model travel times based on historical traffic speeds or denote changes in time zone that could affect network analysis. These are tables that you create prior to creating your network dataset and are stored in your schema (just like the feature class on which a network is built is in the creator's schema). You specify the names of the tables. See the ArcGIS Network Analyst extension section of the documentation for details on using these historical traffic and time zone tables.

Network datasets in an XML workspace document

Network datasets are tagged as logical networks. The following is an excerpt from an XML document created by exporting from the RoadNetwork dataset.

<LogicalNetworkName>m16.hbear.RoadNetwork_ND</LogicalNetworkName> 
  <NetworkType>1</NetworkType> 
  <Buildable>true</Buildable> 
  <SupportsTurns>true</SupportsTurns> 
  <Properties xsi:nil="true" /> 
  <UserData xsi:nil="true" /> 
  <EdgeFeatureSources xsi:type="esri:ArrayOfEdgeFeatureSource">
    <EdgeFeatureSource xsi:type="esri:EdgeFeatureSource">
      <ID>1</ID> 
      <ClassID>1</ClassID> 
      <Name>m16.hbear.Streets</Name> 
      <ElementType>esriNETEdge</ElementType> 
      <Properties xsi:nil="true" /> 
      <FromElevationFieldName /> 
      <ToElevationFieldName /> 
        <Connectivity xsi:type="esri:PropertySet">
          <PropertyArray xsi:type="esri:ArrayOfPropertySetProperty">
            <PropertySetProperty xsi:type="esri:PropertySetProperty">
              <Key>Version</Key> 
              <Value xsi:type="xs:short">1</Value> 
            </PropertySetProperty>
            <PropertySetProperty xsi:type="esri:PropertySetProperty">
              <Key>UsesSubtypes</Key> 
              <Value xsi:type="xs:short">0</Value> 
            </PropertySetProperty>
            <PropertySetProperty xsi:type="esri:PropertySetProperty">
              <Key>ClassConnectivity</Key> 
              <Value xsi:type="xs:short">1</Value> 
            </PropertySetProperty>
            <PropertySetProperty xsi:type="esri:PropertySetProperty">
              <Key>SubtypeConnCount</Key> 
              <Value xsi:type="xs:int">0</Value> 
            </PropertySetProperty>
            <PropertySetProperty xsi:type="esri:PropertySetProperty">
              <Key>DefaultGroup</Key> 
              <Value xsi:type="xs:int">1</Value> 
            </PropertySetProperty>
            <PropertySetProperty xsi:type="esri:PropertySetProperty">
              <Key>GroupCount</Key> 
              <Value xsi:type="xs:int">0</Value> 
            </PropertySetProperty>
         </PropertyArray>
      </Connectivity>
    </EdgeFeatureSource>
  </EdgeFeatureSources>
  <JunctionFeatureSources xsi:type="esri:ArrayOfJunctionFeatureSource" /> 
    <SystemJunctionSources xsi:type="esri:ArrayOfSystemJunctionSource">
      <SystemJunctionSource xsi:type="esri:SystemJunctionSource">
        <ID>3</ID> 
        <ClassID>4</ClassID> 
        <Name>m16.hbear.RoadNetwork_ND_Junctions</Name> 
        <ElementType>esriNETJunction</ElementType> 
        <Properties xsi:nil="true" /> 
        <ElevationFieldName /> 
      </SystemJunctionSource>
    </SystemJunctionSources>
  <TurnFeatureSources xsi:type="esri:ArrayOfTurnFeatureSource">
    <TurnFeatureSource xsi:type="esri:TurnFeatureSource">
      <ID>2</ID> 
      <ClassID>2</ClassID> 
      <Name>m16.hbear.Turns</Name> 
      <ElementType>esriNETTurn</ElementType> 
      <Properties xsi:nil="true" /> 
    </TurnFeatureSource>
  </TurnFeatureSources>
  <EvaluatedNetworkAttributes xsi:type="esri:ArrayOfEvaluatedNetworkAttribute">
    <EvaluatedNetworkAttribute xsi:type="esri:EvaluatedNetworkAttribute">
      <ID>1</ID> 
      <Name>Oneway</Name> 
      <Units>Unknown</Units> 
      <DataType>esriNADTBoolean</DataType> 
      <UsageType>esriNAUTRestriction</UsageType> 
      <UserData xsi:nil="true" /> 
      <UseByDefault>true</UseByDefault> 
      <AttributeParameters xsi:type="esri:ArrayOfNetworkAttributeParameter" /> 
    </EvaluatedNetworkAttribute>
  </EvaluatedNetworkAttributes>

Related Topics

8/21/2013