GMS:Importing/Exporting Shapefiles

From XMS Wiki
Revision as of 15:25, 10 June 2014 by Unjedai (talk | contribs)
Jump to navigationJump to search


Shapefile files

When a shapefile is saved from ArcGIS, multiple files are saved. The files are described in the following table. When the shapefile (*.shp) is imported to GMS, the database file (*.dbf) and (*.prj) files are automatically imported at the same time.

File Extension Decription
*.shp
This file contains the geometry of the points, lines, or polygons.
*.dbf
This is a relational database file. The properties of the feature objects are stored in this file.
*.shx
This is an index file. It is ignored by GMS.
*.prj
Projection file [optional]. Contains the projection information for the data which GMS uses to project the data on-the-fly.

Import

Shapefiles are imported to GMS using Open command in the File menu and selecting the *.shp extension. Drag-and-drop is also supported. Shapefiles are handled in GMS by the GIS Module and are listed in the Project Explorer under GIS Layers.

Export

GMS can export the following object types as shapefiles:

The Export command can be found by right-clicking on the object in the Project Explorer.

Exporting Feature Objects

In GMS, a single coverage can contain points, nodes, arcs and polygons. Shapefiles, however, can only contain one type of attribute. Thus, when exporting a coverage as a shapefile, GMS can export up to three shapefiles depending on the type of objects in the GMS coverage. For example, if the GMS coverage contains arcs, points and nodes, the user can export the arcs to one shapefile and the points and nodes to a separate point shapefile. The user can control which shapefiles GMS will create when more than one is possible. The names for the shapefiles come from the prefix listed at the top of the dialog, appended with "_pts" for the point shapefile, "_arcs" for the arc shapefile, and "_polys" for the polygon shapefile.

With the current version of GMS, only steady state data can be exported to a shapefile. Transient properties are not saved to the file.

The table of attributes that is exported matches the table that is displayed in the properties dialog when editing feature objects.

Currently, you can only export one coverage at a time to shapefiles.

Converting Shapefiles to Other Object Types

Shapefiles can be converted to the following types of objects:

Conversion to Feature Objects

When converting a shapefile to feature objects the GIS to Feature Objects Wizard is used.

Shapefile Properties

The tables below indicate how GMS imports and exports shapefile properties. A "type" field must exist as an attribute when importing so GMS knows what kind of attribute to assign to the object. If the "type" field is not found, GMS will import the objects as generic objects without properties and the Map Shapefile Properties dialog will not appear.

A single shapefile may contain objects with different attribute types. Different attribute types require different fields, as shown in the tables. The X's in the table indicate which fields correspond with which attribute types. GMS writes -999 to empty cells when exporting because shapefiles have no way of flagging "null" or "no data" fields. If a field is not required based on the attribute types of the objects to be exported, the field will not be included.

GMS only supports importing of steady state data (one moment in time) from shapefiles.

MODFLOW/MT3D Local Sources Sinks Coverage

For MODFLOW/MT3D local source/sink coverages, if a node is attached to more than one arc, it can have more than one attribute type. When GMS exports these nodes, it exports one node for every attribute type the node has. So the shapefile might end up with several points in the same location, each with different properties. When importing, GMS will resolve all nodes found in the same location to one node and assign the node the union of the properties of all the nodes.

Note that the following options only work for steady state data. Transient well data can be imported using the Pumping Well Data File formats.

Type Z Cond Elev Stage Flux Screentop Screenshot Beginlayer Endlayer
Generic
X
Shead
X
X
X
X
Sconc
X
X
X
Ghead
X
X
X
X
X
Drn
X
X
X
X
X
Riv
X
X
X
X
X
X
Well
X
X
X
X
X
X

Point Properties For MODFLOW/MT3D Local Source/sink Coverage.

Type Z Elev Stage Topelev Botelev
Shead
X
X
Sconc
X
Ghead
X
X
Drn
X
X
Riv
X
X
X
Strm
X
X
X
X

Node Properties For MODFLOW/MT3D Local Source/sink Coverage.

Type Cond Elev Stage Beginlayer Endlayer
Generic
Shead X X X
Sconc X X
Ghead X X X X
Drn X X X X
Riv X X X X X

Polygon Properties for MODFLOW/MT3D Local Source/sink Coverage.

MODFLOW/MT3D Areal Coverage

The fields exported for MODFLOW/MT3D layer coverages depend on what properties are defined for the polygons. They also depend on which flow package (LPF, BCF or HUF) is selected in the Coverage Properties dialog. Similarly when importing GMS looks for the appropriate fields based on the selected flow package.

The following table lists the attributes that go with each flow package.

Shapefile Field Meaning LPF BCF HUF
Type The attribute type ("Layer") X X X
Topelev Top Elevation X X X
Botelev Bottom Elevation X X X
Trans Transmissivity X
Kh Horizontal hydraulic conductivity X X
KV Vertical hydraulic conductivity X
Leak Leakance X
Hanis Horizontal Anisotropy X
Vanis Vertical Anisotropy X
Specstore Specific storage X
Specyield Specific yield X
Pstore Primary storage coefficient X
Sstore Secondary storage coefficient X
Wetdry Wet/dry flag X X X
Zonecode Zone code X X X
Porosity Porosity X X X
Longdisp Longitudinal dispersivity X X X
Bulkdens Bulk density X X X
Imporosity Immobile porosity X X X
Material Material X

Polygon Properties for MODFLOW/MT3D Layer Coverage.

Observation Coverage

When importing shapefiles into an observation coverage, information should exist in the Int (interval) and Conf (confidence) fields, or in the Stdev (standard deviation) field but not both. The confidence value should be an integer between 0 and 100 (i.e., 95 means 95% confidence). GMS will assign default values if there is any information missing.

Type Name Z Layer Value Int Conf Stdev
Obs X X X X X X X

Point Properties for Observation Coverage.

See also