ArcGIS Server Banner

Geometric networks and network datasets in a geodatabase in PostgreSQL

Geometric networks and network datasets in a geodatabase in PostgreSQL

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

Geometric networks are collections of line (edge) and point (junction) feature classes in a feature dataset that possess a connectivity relationship. Geometric networks are used to model infrastructure, such as electric utility lines and sewer systems.

Network datasets are also collections of feature classes that possess a connectivity relationship, but 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.

The tables that are created with a network depend on whether you create a geometric network or a network dataset and also whether or not there are turns present in the network.

Networks in ArcCatalog

In the Catalog tree, feature datasets that contain geometric networks and network datasets in a PostgreSQL database look the same until you expand the dataset. Once the dataset is expanded, you see either a geometric network or network dataset. For example, for a geometric network, you see a layer similar to the following:

Feature dataset containing a geometric network (PostgreSQL)

In this example, Electric_Net is the geometric network in the dataset.

For a network dataset, you see something similar to the following:

Network dataset in ArcCatalog (PostgreSQL)

RoadNetwork_ND is the network dataset. RoadNetwork_ND_Junctions are the junctions for the RoadNetwork_ND network dataset.

Top of page

Networks in a PostgreSQL DBMS

Networks are tracked in system tables and network tables. The following are the system tables used for a geometric network:

Network datasets are maintained in these system tables:

See System tables of a geodatabase in PostgreSQL for descriptions of these tables.

In addition to these tables, the network is a set of variably sized tables. The size of these tables depends on the size of the network—for example, number of junctions (#J) and number of edges (#E).

There are 10 fixed tables per network, and they are identified by the following naming convention: n_<id>_<table_descriptor>, where <id> represents the ID of the network in the gdb_networks table; for example, n_1_<table descriptor>, n_2_<table descriptor>. The actual number of tables varies depending on what type of network you create—geometric network or network dataset—and what elements the network contains. A maximum of 21 tables could be created for a network dataset with turns and weights.

All of these tables are versioned when the network itself is versioned.

The 10 tables that are always created are the n_<id>_desc, n_<id>_e<#>, n_<id>_estatus, n_<id>_etopo, n_<id>_flodir, n_<id>_jdesc, n_<id>_jstatus, n_<id>_jtopo, n_<id>_jtopo2, and n_<id>_props tables. (See below for descriptions.)

NOTE: The n_<id>* tables can be viewed in the DBMS but should not be altered using SQL/third-party applications; doing so can corrupt the network.

n_<id>_<>

Tables in the geodatabase that begin with n_ store information about networks.

n_<id>_desc

The n_<id>_desc table describes the elements of a network. This is a normalized table whose row count is equal to the number of junctions and the number of edges in a geometric network.


Field name Field type Description
oid integer The unique identifier of an element in a geometric 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

1 = junction

2 = edge

NOT NULL
eid integer The unique element ID of the network element; only unique for the type of network element

NOT NULL

n_<id>_props

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
propertyid integer The unique ID 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

All the remaining network tables contain the same field names and types. The table names and what they track are described below the table definition. Those tables that track turns are not used in a geometric network dataset.


Field name Field type Description
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 desciription for the element the table is describing, such as edge, and edge status

n_<id>_e<#>—Describes network edge weights; # = 2, 3, 4, or 5

n_<id>_edesc—Describes the edges in a network

n_<id>_estatus—Describes the status of each edge including its deleted and disabled states

n_<id>_etopo—Describes the network edge topology or connectivity

n_<id>_eturn*—Indicates whether each edge participates in a turn

n_<id>_eturn2*—Lists which turns pass through each edge in the network

n_<id>_flodir—Describes the network flow direction

n_<id>_j<#>—Describes network junction weights; # = 0 or 1

n_<id>_jdesc—Describes the network junctions

n_<id>_jstatus—Describes the status of each network junction including its deleted and disabled states

n_<id>_jtopo—Describes the connectivity of junction elements with edge elements

n_<id>_jtopo2—Describes the connectivity of junction elements with edge elements when there are multiple edges connected to a single junction.

n_<id>_jturn*—Indicates whether each junction participates in a turn

n_<id>_jturn2*—Lists which turns pass through each junction in the network

n_<id>_t<#>*—Describes the weight values of each turn element

n_<id>_tdefn*—Defines each turn element by listing the edges and junctions that make up the turn

n_<id>_tdefn2*—Overflow table for the turn element definition; for example, if multiple edges make up a turn

n_<id>_tdesc*—Describes the turns in a network

n_<id>_tstatus*—Describes the status of each network turn, including its deleted and disabled states

*Would not be present in a geometric network or network dataset without turns.

Click the following link to view the tables involved in the Electric_net geometric network shown above:

PostgreSQL geometric network diagram

The following link opens a diagram of the tables that participate in the RoadsNetwork_ND network dataset:

PostgreSQL network dataset diagram

Top of page

Networks in an XML workspace document

For a geometric network, the data element in an XML document is listed as type GeometricNetwork. The following is a portion of the XML document exported from the Electric dataset.

<DataElement xsi:type="esri:DEGeometricNetwork">
  <CatalogPath>/V=sde.DEFAULT/FD=m6db.perrita.Electric/GN=m6db.perrita.Electric_Net</CatalogPath> 
  <Name>m6db.perrita.Electric_Net</Name> 
  <DatasetType>esriDTGeometricNetwork</DatasetType> 
  <DSID>-1</DSID> 
  <Versioned>false</Versioned> 
  <CanVersion>true</CanVersion> 
  <Extent xsi:type="esri:EnvelopeN">
  <XMin>0</XMin> 
  <YMin>0</YMin> 
  <XMax>6229821.98995209</XMax> 
  <YMax>2299265.90002099</YMax> 
  <SpatialReference xsi:type="esri:ProjectedCoordinateSystem">
  <WKT>PROJCS["NAD_1983_StatePlane_California_VI_FIPS_0406_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",6561666.666666666],PARAMETER["False_Northing",1640416.666666667],PARAMETER["Central_Meridian",-116.25],PARAMETER["Standard_Parallel_1",32.78333333333333],PARAMETER["Standard_Parallel_2",33.88333333333333],PARAMETER["Latitude_Of_Origin",32.16666666666666],UNIT["Foot_US",0.3048006096012192]]</WKT> 
  <XOrigin>5937666.642992</XOrigin> 
  <YOrigin>2016067.94250924</YOrigin> 
  <XYScale>31249.9999708962</XYScale> 
  <ZOrigin>0</ZOrigin> 
  <ZScale>1</ZScale> 
  <MOrigin>0</MOrigin> 
  <MScale>1</MScale> 
  <XYTolerance>6.56166666666667E-04</XYTolerance> 
  <ZTolerance>0.00002</ZTolerance> 
  <MTolerance>0.00002</MTolerance> 
  <HighPrecision>true</HighPrecision> 
  </SpatialReference>
  </Extent>
  <SpatialReference xsi:type="esri:ProjectedCoordinateSystem">
  <WKT>PROJCS["NAD_1983_StatePlane_California_VI_FIPS_0406_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",6561666.666666666],PARAMETER["False_Northing",1640416.666666667],PARAMETER["Central_Meridian",-116.25],PARAMETER["Standard_Parallel_1",32.78333333333333],PARAMETER["Standard_Parallel_2",33.88333333333333],PARAMETER["Latitude_Of_Origin",32.16666666666666],UNIT["Foot_US",0.3048006096012192]]</WKT> 
  <XOrigin>5937666.642992</XOrigin> 
  <YOrigin>2016067.94250924</YOrigin> 
  <XYScale>31249.9999708962</XYScale> 
  <ZOrigin>0</ZOrigin> 
  <ZScale>400000</ZScale> 
  <MOrigin>0</MOrigin> 
  <MScale>400000</MScale> 
  <XYTolerance>6.56166666666667E-04</XYTolerance> 
  <ZTolerance>0.00002</ZTolerance> 
  <MTolerance>0.00002</MTolerance> 
  <HighPrecision>true</HighPrecision> 
  </SpatialReference>
  <NetworkType>esriNTUtilityNetwork</NetworkType> 
  <OrphanJunctionFeatureClassName>m6db.perrita.Electric_Net_Junctions</OrphanJunctionFeatureClassName> 
  <FeatureClassNames xsi:type="esri:Names">
  <Name>m8db.perrita.Prime</Name> 
  <Name>m8db.perrita.Secondary</Name> 
  <Name>m8db.perrita.bridging</Name> 
  <Name>m8db.perrita.circuit_bkr</Name> 
  <Name>m8db.perrita.StreetLights</Name> 
  <Name>m8db.perrita.meters</Name> 
  <Name>m8db.perrita.switch</Name> 
  <Name>m8db.perrita.transformers</Name> 
  <Name>m8db.perrita.Tapwire</Name> 
  <Name>m8db.perrita.Electric_Net_Junctions</Name> 
  </FeatureClassNames>
  <ConnectivityRules xsi:type="esri:ArrayOfConnectivityRule" /> 
  <NetworkWeights xsi:type="esri:ArrayOfNetWeight">
  <NetWeight xsi:type="esri:NetWeight">
  <WeightID>0</WeightID> 
  <WeightName>switch</WeightName> 
  <WeightType>esriWTInteger</WeightType> 
  <BitGateSize>0</BitGateSize> 
  </NetWeight>
  </NetworkWeights>
  <WeightAssociations xsi:type="esri:ArrayOfNetWeightAssociation">
  <NetWeightAssociation xsi:type="esri:NetWeightAssociation">
  <WeightID>0</WeightID> 
  <TableName>m8db.perrita.switch</TableName> 
  <FieldName>Status</FieldName> 
  </NetWeightAssociation>
  </WeightAssociations>
</DataElement>

Network datasets are tagged as LogicalNetworks. 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>

Top of page

See Also

  • Feature datasets in a geodatabase in PostgreSQL