Geometric networks in a geodatabase in PostgreSQL
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.
The tables that are created with a network depend on whether there are turns present in the network.
Geometric networks in ArcGIS for Desktop
In the Catalog tree, feature datasets that contain geometric networks look the same until you expand the dataset. Once the dataset is expanded, you see a geometric network represented with the following icon:
The name of a geometric network in a geodatabase in PostgreSQL contains the database name, the name of the owner of the geometric network, and the name of the geometric network itself.
For example, a geometric network, water_net, owned by user gdb, in a geodatabase named sdedb would be listed as sdedb.gdb.water_net in the Catalog tree.
When a geometric network is built, an orphan junction feature class is created inside the feature dataset. The name of this feature class is the name of the network followed by _Junctions.
Any errors that are encountered when the geometric network is created are placed in the build errors table, which you can also see in the Catalog. This table has is named <network_name>_builderr. If there were errors when the water_net geometric network was built, a table named sdedb.gdb.water_net_builderr would be created in the geodatabase.
Geometric networks in a PostgreSQL database
Geometric networks are tracked in the gdb_items table. The gdb_itemtypes table stores a value indicating that the object is a geometric network. The gdb_itemrelationships table stores information on how the network and the feature dataset it is in are related.
In addition to these tables, networks are made up of a set of variably sized tables that is stored in the schema of the user who created the geometric network. The size of these tables depends on the size of the network—for example, the number of junctions and number of edges can affect the network size.
There are 9 fixed tables per network, and they are identified by the following naming convention: N_<ID>_<table_descriptor>, where ID represents a logical network ID, which is stored in the networks definition in the gdb_items table; for example, N_1_<table descriptor>, N_2_<table descriptor>.
The actual number of tables varies depending on what elements the network contains. A maximum of 21 tables could be created for a network with turns and weights.
All these tables are versioned when the network itself is versioned.
The following tables are always created: n_<id>_desc, n_<id>_e<#>, n_<id>_estatus, n_<id>_etopo, n_<id>_flodir, n_<id>_jdesc, n_<id>_jstatus, n_<id>_jtopo, and n_<id>_props.
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 type |
Description |
Null? | |
---|---|---|---|
oid Field name |
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; either 1 = junction or 2 = edge |
NOT NULL |
eid |
integer |
The unique element identifier 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 |
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 |
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.
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 |
- 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>_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>_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
View a diagram of a geometric network in PostgreSQL.
Dashed lines indicate implicit relationships between columns.
You need Adobe Acrobat Reader to open the file.
For a description of the build errors table, see Network build errors table schema.
Geometric 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 an XML document exported from a feature dataset containing a geometric network:
<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>