SMS:Shapefiles: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 3: Line 3:
Shapefiles contain data exported from ARC/INFO® or ArcView® in binary format. When they are imported into  SMS, the data is converted to feature objects,  points, arcs, or polygons. Shapefiles are opened through ''File'' | '''Open'''.  Only map data can be saved out from SMS as a shapefile.  
Shapefiles contain data exported from ARC/INFO® or ArcView® in binary format. When they are imported into  SMS, the data is converted to feature objects,  points, arcs, or polygons. Shapefiles are opened through ''File'' | '''Open'''.  Only map data can be saved out from SMS as a shapefile.  


A shapefile is actually comprised of three or more files.  The primary file  is the SHP and it contains the geometric information (coordinates and if  necessary connectivity of the points, lines, polygons).  The DBF file is a  standard database file and stores the attributes of the feature objects.  Finally there will be a SHX file which is an indexing file.  There may be a  few other files that accompany the shapefile and so a user should always move them  around together if copying or moving them to a new directory.
A shapefile is actually comprised of three or more files.  The primary file  is the SHP and it contains the geometric information (coordinates and if  necessary connectivity of the points, lines, polygons).  The DBF file is a  standard database file and stores the attributes of the feature objects.  Finally there will be a SHX file which is an indexing file.  There may be a  few other files that accompany the shapefile and so always move them  around together if copying or moving them to a new directory.


Only one "theme" or type of feature can exist in a shapefile.  For example  it's not currently possible to store points and polygons in the shapefile, or streams and basin  boundaries and so a user may be required to import multiple files to make up the  drainage coverage in SMS.
Only one "theme" or type of feature can exist in a shapefile.  For example  it's not currently possible to store points and polygons in the shapefile, or streams and basin  boundaries and so it may be required to import multiple files to make up the  drainage coverage in SMS.


When a shapefile is opened, the ''Import Shapefile Data'' dialog appears. It is necessary to know if the file is a Point, Arc, or Polygon shapefile. The options in  the dialog are:
When a shapefile is opened, the ''Import Shapefile Data'' dialog appears. It is necessary to know if the file is a Point, Arc, or Polygon shapefile. The options in  the dialog are:
Line 11: Line 11:
* '''Coverage Options''' – Bring up the ''Coverage Options'' dialog to set the coverage in which the shapefile data is created.
* '''Coverage Options''' – Bring up the ''Coverage Options'' dialog to set the coverage in which the shapefile data is created.


* '''Points / Arcs / Polygons''' – Under each of these  sections, the file browser button allows the user to select a point,  arc, and polygon file. One file of each type may be selected.
* '''Points / Arcs / Polygons''' – Under each of these  sections, the file browser button allows selecting a point,  arc, and polygon file. One file of each type may be selected.


* '''Attribute Mapping''' – This  button brings up the ''Map Shapefile Attributes'' dialog. In this dialog, the user  can select an attribute from each of the Database (from  the shapefile) and Coverage attributes (SMS supported  attributes) fields. If an attribute is selected from each, the Map button maps the attributes and the Unmap button unmaps the attributes. If an attribute is mapped,  the attributes will be assigned in SMS when the file is opened.
* '''Attribute Mapping''' – This  button brings up the ''Map Shapefile Attributes'' dialog. In this dialog, select an attribute from each of the Database (from  the shapefile) and Coverage attributes (SMS supported  attributes) fields. If an attribute is selected from each, the '''Map''' button maps the attributes and the '''Unmap''' button unmaps the attributes. If an attribute is mapped,  the attributes will be assigned in SMS when the file is opened.


SMS includes all of the tools necessary to import shapefiles and convert the  geometric and attribute information into feature objects.  This can be done by  directly opening the shapefile and converting to feature objects in the active  coverage or by loading the shapefile in the GIS module.
SMS includes all of the tools necessary to import shapefiles and convert the  geometric and attribute information into feature objects.  This can be done by  directly opening the shapefile and converting to feature objects in the active  coverage or by loading the shapefile in the GIS module.


==Export Map Data in Shape Format==
[[File:ExportShapefiles.png|thumb|250 px|The ''Export Shapefile'' dialog]]
Data created in SMS can be exported as a shapefile. To export feature objects in a map coverage to a shapefile (*.shp):
#Load or create feature objects in a map module coverage.
#Select ''File'' | '''Save As'''
#Select ''Save as type:'' and choose "Shapefiles (*.shp)"
#In the ''Export Shapefile'' dialog, select the feature object types to be saved.
#Click '''Ok'''


Shapefiles are created for the selected feature object types.
Feature objects on individual map coverages can be exported as a shapefile by right-clicking on the map coverage in the Project Explorer and selecting the '''Export''' command. In the ''Export Coverage'' dialog, save the file as one of the shapefile types in the ''Save as type'' field. These options are similar to those in the ''Export Shapefile'' dialog.
Open the saved XML file to import the data from the shapefile.


==Related Topics==
==Related Topics==
* [[GSDA:GSDA|Data Acquisition]]
* [[SMS:Importing Shapefiles|Importing Shapefiles]]
* [[SMS:Importing Shapefiles|Importing Shapefiles]]
* [[SMS:GIS Module|GIS Module]]
* [[SMS:GIS Module|GIS Module]]

Latest revision as of 22:09, 9 June 2022

One common method for creating feature objects is to import a shapefile. The concept of a shapefile was established by Environmental Systems Research Institute (ESRI) in their ArcView® program and it has become the defacto standard for sharing GIS vector data (points, lines, and polygons).

Shapefiles contain data exported from ARC/INFO® or ArcView® in binary format. When they are imported into SMS, the data is converted to feature objects, points, arcs, or polygons. Shapefiles are opened through File | Open. Only map data can be saved out from SMS as a shapefile.

A shapefile is actually comprised of three or more files. The primary file is the SHP and it contains the geometric information (coordinates and if necessary connectivity of the points, lines, polygons). The DBF file is a standard database file and stores the attributes of the feature objects. Finally there will be a SHX file which is an indexing file. There may be a few other files that accompany the shapefile and so always move them around together if copying or moving them to a new directory.

Only one "theme" or type of feature can exist in a shapefile. For example it's not currently possible to store points and polygons in the shapefile, or streams and basin boundaries and so it may be required to import multiple files to make up the drainage coverage in SMS.

When a shapefile is opened, the Import Shapefile Data dialog appears. It is necessary to know if the file is a Point, Arc, or Polygon shapefile. The options in the dialog are:

  • Coverage Options – Bring up the Coverage Options dialog to set the coverage in which the shapefile data is created.
  • Points / Arcs / Polygons – Under each of these sections, the file browser button allows selecting a point, arc, and polygon file. One file of each type may be selected.
  • Attribute Mapping – This button brings up the Map Shapefile Attributes dialog. In this dialog, select an attribute from each of the Database (from the shapefile) and Coverage attributes (SMS supported attributes) fields. If an attribute is selected from each, the Map button maps the attributes and the Unmap button unmaps the attributes. If an attribute is mapped, the attributes will be assigned in SMS when the file is opened.

SMS includes all of the tools necessary to import shapefiles and convert the geometric and attribute information into feature objects. This can be done by directly opening the shapefile and converting to feature objects in the active coverage or by loading the shapefile in the GIS module.

Export Map Data in Shape Format

The Export Shapefile dialog

Data created in SMS can be exported as a shapefile. To export feature objects in a map coverage to a shapefile (*.shp):

  1. Load or create feature objects in a map module coverage.
  2. Select File | Save As
  3. Select Save as type: and choose "Shapefiles (*.shp)"
  4. In the Export Shapefile dialog, select the feature object types to be saved.
  5. Click Ok

Shapefiles are created for the selected feature object types.

Feature objects on individual map coverages can be exported as a shapefile by right-clicking on the map coverage in the Project Explorer and selecting the Export command. In the Export Coverage dialog, save the file as one of the shapefile types in the Save as type field. These options are similar to those in the Export Shapefile dialog.

Open the saved XML file to import the data from the shapefile.

Related Topics