WMS:Importing Shapefiles

From XMS Wiki
(Redirected from WMS:Importing Shape Files)
Jump to navigationJump to search

ARC/INFO® or ArcView® shape files provide the easiest method to import GIS data into WMS. Unfortunately the shape file format is extremely redundant, meaning that points or lines that are shared by lines or polygons are multiply defined.

Therefore, in order to convert a shape file to a WMS coverage, it may take up to several minutes (depending on size) to build the correct line or polygon topology. This was very problematic in previous versions because WMS often bogged down when reading moderately large files. This is one of the primary reasons that the GIS module was developed and with or without a license to ArcObjects shapefile data can now be managed better by WMS.

With the addition of the GIS module there are now two different ways to import shapefile data.

Direct Conversion of Shapefile Data to Coverages

The first is the traditional method which allows loading a shapefile layer (or a point, line, and polygon shapefile layer in the case of the drainage coverage) directly into a coverage, using the File | Open command.

Then map attribute fields of the shapefiles database (*.dbf) file to their pertinent WMS parameters (some key words are automatically recognized as listed in the table below.

Using the GIS Module to Convert Shapefile Data to Coverages

When opening a shapefile in the GIS module using the Add Shapefile Data or Add Data commands WMS first reads the points/lines/polygons into a simple display list and does not try to "build" topology by connecting arcs at nodes, and eliminating shared edges of polygons as required when creating a coverage. This makes the display and selection of the polygons much easier and more efficient. Then select only the polygons to convert to a coverage and map them. In this way WMS will only be building topology for the selected polygons.

Cleaning Imported Shapefile Data

If intending to use the data from the shape file in more than one session, save it as a WMS map file after importing/mapping the first time. Further, after importing the shape files, consider the following:

  • Clean the feature objects in order to snap nodes within a certain distance, intersect arcs, and eliminate dangling arcs.
  • Reorder Streams for arcs which will be used as stream arcs. WMS requires that the direction of an arc (from-node to to-node) be from “downstream” to “upstream.”
  • Build Polygon so that WMS can define the topologic tree used for hydrologic modeling. After intersection of arcs, reordering of streams, etc. it is often necessary to rebuild the polygon topology so that the topologic structure is consistent with the tree used for hydrologic modeling.

Key Words for Automatic Mapping of Attributes

The following key words are used to automatically map shapefile (dbase or .dbf) attribute field names to data within WMS.

Keyword names to map Shape file attribute item names to WMS variables:

Parameter Name Description/Possible Values
Point Attributes
Drainage Point type* draintype 0=Generic
5=Drainage outlet point
29=Route point
Temrminus Combine name comname HEC-1 terminus name
Terminus Route name rtename HEC-1 route name
LA County reach type la_type
LA County reach location la_loc
LA County reach lateral la_lateral
LA County reach slope la_slope
LA County reach length la_length
LA County reach n la_n
LA County reach side n la_siden
LA County reach slope la_sideslp
LA County reach depth la_depth
LA County reach channel def la_chdef
LA County reach char width la_charw
LA County reach velocity la_vel
LA County reach detail la_detail
LA County reach hydrograph la_hydrog
LA County reach input hydrograph la_inhydro
LA County reach input hydrograph area la_inharea
LA County reach relief la_relief
LA County reach trap la_trap
LA County reachsize la_size
LA County reach capacity la_capc
LA County reach bulked flow la_bulkedf
LA County reach reservoir routing la_resrt
LA County reach initial pool elev la_initp
LA County reach street width la_streetw
LA County reach reach curb height la_curbh
GSSHA Point type casctype GSSHA point type:
0 = generic
1 = link break
2 = hydraulic structure (weir)
3 = bridge
4 = culvert
11 = dynamic well
12 = static well
13 = constant head
14 = river head
15 = rating curve
16 = rule curve
17 = scheduled discharge
24 = GSSHA low point
25 = GSSHA oulet
Link id linkid Link id
Free flow coefficient ffcoeff Free flow coefficient
Crest width crestwid Crest width
Crest elevation crestelev Crest elevation
Flooded coefficient floodcoef Flooded coefficient
Gage depth gagedepth Rain gage depth for gage coverage
SWMM name swmmname SWMM node name
SWMM ponding type swmmpondtype SWMM ponding type options:
"None"
"Allowed"
"Sealed"
"Link Spill Crest to 2D"
"Link Invert to 2D"
SWMM constant inflow swmmconstinflow SWMM node constant inflow
SWMM ground elevation swmmgroundelev SWMM node ground elevation
SWMM invert elevation swmminvertelev SWMM node invert elevation
Z coordinate elevation This changes the Z-coordinate of the point
Arc Attributes
Drainage arc type* draintype 0 = Generic
2 = Ridge
3 = Stream
32 = Lake
44 = Pipe
GSSHA arc type casctype GSSHA arc type:
0 = Generic
1 = Trapezoidal channel
3 = General stream
8 = Cross section channel
12 = Trapezoidal channel (Groundwater process enabled)
13 = Cross section channel (Groundwater process enabled)
30 = Trapezoidal channel (Sediment process enabled)
31 = Trapezoidal channel (Sediment and groundwater processes enabled)
42 = Embankment
45 = Pipe
Link ID linkid GSSHA Link ID
Manning's cmannings GSSHA Manning's "n" value
Bottom width bwidth GSSHA bottom width
Channel depth chdepth GSSHA channel depth
Side slope sideslope GSSHA side slope
M River mriver GSSHA M-River value
K River kriver GSSHA K-River value
Arc Elevation elevation Arc point elevation
Flood barrier elevation fbelev Flood barrier elevation
SWMM name swmmname SWMM link name
SWMM shape swmmshape SWMM link shape options:
"Circular"
"Rectangular"
"User defined"
"Special"
"Trapezoidal"
"Power Fn."
"Natural"
SWMM diameter swmmdiameter SWMM link height/diameter
SWMM length swmmlength SWMM link length
SWMM upstream invert swmmupinvert SWMM link upstream invert elevation
SWMM downstream invert swmmdninvert SWMM link downstream invert elevation
Polygon Attributes
Drainage polygon type* draintype Drainage polygon type:
0 = generic
1 = boundary
2 = lake
Drainage basin id basinid Drainage basin id (integer)
sub-basin area basinarea Basin area (float)
sub-basin slope basinslop Average slope within the sub-basin (float)
sub-basin maximum flow distance mfdist Max flow path, including overland and stream flow (float)
sub-basin max flow distance slope mfdslope Slope along the max flow path as defined above (float)
sub-basin distance to centroid centdist Distance from centroid to closest point on main channel (float)
sub-basin stream centroid to outlet centout Distance from point in stream closest to centroid to outlet (float)
sub-basin slope from centroid to outlet slcentout Slope along the distance defined above (float)
sub-basin percent southfacing psouth Percentage of area facing south, 0.0-1.0 (float)
sub-basin percent northfacing pnorth Percent of area facing north, 0.0-1.0 (float)
sub-basin maximum stream length mstdist The longest stream distance within the basin (float)
sub-basin maximum stream slope mstslope The slope along the longest stream distance (float)
sub-basin length basinlen Distance to furthest point along basin perimeter (float)
sub-basin shape factor shapefact Basin length divided by basin area (float)
sub-basin sinuosity factor sinuosity Maximum stream length divided by basin length (float)
sub-basin perimeter perimeter Perimeter of basin (float)
sub-basin average elevation meanelev Average elevation (float)
sub-basin centroid centroidx Basin centroid, closest point in basin if centroid is outside of the basin (X-coord) (float)
sub-basin centroid centroidy Basin centroid, closest point in basin if centroid is outside of the basin (Y-coord) (float)
sub-basin name basinname Basin name (string)
sub-basin lagtime lagtime Lag time, in Hours (float)
sub-basin time of concentration tc Time of Concentration, in hours (float)
sub-basin SCS curve number cn SCS Curve number computed from hydrologic soil type and land use (Integer)
sub-basin initial abstraction ia Initial abstraction used for the HEC-1 Green and Ampt method
sub-basin volumetric moisture deficit dtheta Volumetric moisture deficit used for the HEC-1 Green and Ampt method
sub-basin wetting front suction psif Wetting front suction used for the HEC-1 Green and Ampt method
sub-basin hydraulic conductivity xksat Hydraulic conductivity used for the HEC-1 Green and Ampt method
sub-basin percent impervious rtimp Percent impervious used for the HEC-1 Green and Ampt method
sub-basin Maricopa County adjusted slope adjslope Maricopa County adjusted slope for computing Clark Tc and R values
sub-basin Clark R value clarkr Clark R value for the HEC-1 Clark unit hydrograph method
sub-basin average precipitation precip Basin average precipitation, in inches (float)
sub-basin LA County lateral la_lateral LA County lateral
sub-basin LA County location la_loc LA County location
sub-basin LA County rainfall depth la_raind LA County rainfall depth
sub-basin LA County Tc la_tc LA County Tc
sub-basin LA County percent impervious la_imprv LA County percent impervious
sub-basin LA County soil number la_soil LA County soil number
sub-basin LA County basin hydrograph la_hydrog LA County basin hydrograph
sub-basin LA County basin bulked flow la_bulkedf LA County basin bulked flow
landuse lu_code Land use code from the SCS land use table. Possible values range from 0-127
Land use join ID mu_code Land use join ID
Percent impervious imperv_ LA County percent impervious
soil type hydgrp SCS Soil type, A, B, C, or D or 0, 1, 2, or 3
soil type (LA County) class LA County soil type
sub-basin rainfall depth rainfall Rainfall depth
runoff coefficient, C runoffc Rational method runoff coefficient, C (float)
GSSHA polygon type casctype GSSHA polygon type:
0 = Generic
1 = Boundary
2 = Lake
3 = No Boundary
4 = Wetland
GSSHA leakage discharge ldis GSSHA leakage discharge
GSSHA spillway width spwidth GSSHA spillway width
GSSHA discharge coefficient discoeff GSSHA discharge coefficient
GSSHA water elevation welev GSSHA water elevation
GSSHA spillway crest spillcres GSSHA spillway crest
Rainfall zone ID rnzone_ Rainfall zone ID
Rainfall zone name name Rainfall zone name
DPA zone dpa_zones DPA zone
Flood area fexarea Flood area
Flood depth fexdepth Flood depth
Flood class ID fexcid Flood class ID
Flood class name fexcname Flood class name
NFF state state NFF state (2-letter state abbreviation, e.g. UT = Utah)
NFF state's region nff_region NFF region in state

* means this is essential to import into WMS and create a watershed model directly. The three essential items are point, arc, and polygon types. The general stream arc should be used to represent a stream in a watershed model. The boundary polygon type should be used to represent a polygon boundary. The outlet point type should be used to represent a watershed outlet or sub-basin outlet point.


In order to import shapefile attributes into WMS and build a tree automatically, the following conditions must be met:

  1. A point coverage containing watershed and sub-basin outlets with the appropriate type (outlet point) attribute defined must exist.
  2. An arc, or line, coverage containing streams in the watershed with the appropriate type (general stream) attribute defined must exist.
  3. A polygon coverage containing watershed boundaries must exist.
  4. There cannot be any overlapping arcs.
  5. Stream arcs must be created from the downstream to the upstream node for all stream arcs.

If a data value in the shapefile corresponds to a WMS variable but it is not defined with the appropriate keyword it can be mapped manually using the Attribute Mapping dialog. One item from the database fields window is selected and the corresponding coverage attribute field is also identified. Finally, the Map button is selected to define a new mapped attribute. The Unmap button can be used to remove a pair of mapped fields.

Related Topics: