Data Conversion 11/6/2015 – UT Dallas POEC 6382 Applied GIS Software Conversion Commands • From Interchg file format • To Interchange file format –

Download Report

Transcript Data Conversion 11/6/2015 – UT Dallas POEC 6382 Applied GIS Software Conversion Commands • From Interchg file format • To Interchange file format –

Data Conversion
1
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
Conversion Commands
• From Interchg file format • To Interchange file format
– import
– export
• From Shapefile
• To Shapefile
– shapearc
– arcshape
• From Census data
• To Census data
– tigerarc
– tigertool
– arctiger
• From another GIS
–
–
–
–
–
dlgarc
dxfarc
igdsarc
igesarc
etakarc
• To another GIS
–
–
–
–
(.dlg)
(.dxf)
(.dgn)
(.ige)
(
• From DBASE to INFO
– dbaseinfo
arcdlg
arcdxf
arcigds
arciges
• To DBASE from INFO
– infodbase
There are many others—go to ArcDoc under “Data Conversion”for details
2
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
Arc Interchange File Format
Interchange File Format (suffix .e00)
– permits easy transportation to another platform running Arc/INFO.
– An interchange file contains all coverage information and appropriate INFO file
information in a fixed-length, ASCII format.
– Can drag and drop an interchange file, as well as download it from the internet.
• EXPORT - converts a coverage, file or other supported data set to
interchange file format
– Arc: export cover cities cities (prefix only, suffix will be added)
– Will convert a coverage named cities to an export file, cities.e00
• IMPORT - recreate the coverage, file or other supported data set from an
exported interchange file.
– Arc: import cover cities cities
– converts an interchange file cities.e00 to a coverage named cities
• The utility IMPORT71 which comes with ArcView can also be used to
convert .e00 files to coverages, so you don’t have to have ArcInfo to use .e00
3
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
COVERAGE TO SHAPE
• ARCSHAPE - writes feature attributes or INFO records to a new
shape data file
– ARCSHAPE <in_cover> <in_feature_class> <out_shape_file>
• SHAPEARC - writes shapefile spatial and attribute information to an
ARC/INFO coverage.
– shapearc <in_shape_file> <out_cover> {out_subclass}
• Problems with polygons - Shape polygon features are converted into
REGIONS because “there is no way to insure that polygon shape
features do not overlap” (i.e., shape files do not have topology). If
polygon topology is required, provide an out_subclass name so that
your attributes will be stored in the region subclass table which will be
named: <out_cover>.pat{out_subclass}. Then the REGIONPOLY
command is used to recreate the polygons.
4
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
A Note on Regions
• A way to represent more complex features
– The islands of Hawai (multiple polygons) as one region
– House, garage, barn building footprints at one address as one region
– States of US as 50 regions, each with their counties as inside polygons (outer
boundary is then the same for states and its border counties)
– Overlapping areas, such as wildlife habitats overlapping with land use types
• Regions are handled as a special “feature class” (or subclass), just as arcs,
polygons, etc. are feature classes
• There are about 25 commands for creating and processing regions!
• Because shape files are not fully topological, ArcInfo does not know if
polygons overlap, therefore it creates regions when converting shapefiles
with polygons to coverages
• REGIONPOLY is the command which converts regions into polygons
5
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
REGIONPOLY
• REGIONPOLY
– converts a regions subclass into a polygon coverage and creates an
INFO table containing overlapping region information.
– creates the polygon coverage by performing a REGIONCLEAN on the
region coverage to eliminate unnecessary polygons. RESELECT is then
used to select only those polygons associated with the region subclass.
DROPFEATURES is used to drop region subclasses from the out_cover.
If the <in_cover> does not have label points, CREATELABELS is used
to add label points to the <out_cover>.
– REGIONPOLY adds some extra fields (subclass, subclass#, rings_ok,
rings_nok) to your .pat. To get rid of these use DROPITEM.
– REGIONPOLY <in_cover> <out_cover> <in_subclass> {out_table}
6
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
Steps for SHAPEARC with polygons
Example for shape file named TRACTS.shp
(a shape file with this name containing census tracts for Plano is in the p:\p6382\ex4 folder)
•
•
SHAPEARC <in_shape_file> <out_cover> {out_subclass}
arc: SHAPEARC tracts tracts class
arc: LC
(list of coverages should include TRACTS)
arc: DIR INFO
(note that there is no tracts.pat, but there is a tracts.patclass
CLEAN <in_cover> {out_cover} {dangle_length} {fuzzy_tolerance} { POLY | LINE}
(this will recreate the polygons)
arc: CLEAN tracts tractsC .01 .01 poly (always give cleaned version a new name)
arc: DIR INFO
(now have a .pat file)
arc: ITEMS tracts.pat (however, no attribute data)
• REGIONPOLY <in_cover> <out_cover> <in_subclass> {out_table}
arc: REGIONPOLY statesc state class class.tbl (class.tbl contains info about the old regions)
arc: ITEMS tracts.pat
(now have attribute data, but extra junk variables)
• DROPITEM <in_info_file> <out_info_file> {item … item}
(this is optional)
arc: DROPITEM state.pat state.pat subclass# rings_ok rings_nok
arc: ITEMS tracts.pat
(now have just the data items we wanted)
(Note: ArcToolbox and ArcCatalog conversions incorporate all of the above steps)
7
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
Conversion Commands - Tiger/LINE
• TIGERARC - converts from Census TIGER/Line files to
Arc/INFO format
• ARCTIGER - converts from Arc/INFO into TIGER/Line
format
• TIGERTOOL - runs the TIGERARC command and then
processes the output by combining area point features and
line features into one integrated polygon coverage.
8
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
CONVERSION FROM OTHER GIS
dlgarc
- Converts from USGS Digital Line Graph (DLG) format to
Arc/INFO format
arcdlg - Converts from Arc/INFO to DLG
dxfarc - Converts Autocad DXF (digital exchange format) to Arc/INFO
dxfinfo - Describes the contents of a DXF file
arcdxf - Converts from Arc/INFO to DXF format
igdsarc - Converts from Intergraph’s Interactive Graphics Design Software
(IGDS) and MicroStation Design format to Arc/INFO.
--these files have a .dgn extension
igdsinfo - Describes contents of IGDS file
arcigds - Converts from Arc/INFO to IGDS
igesarc - Converts from Initial Graphics Exchange Specification
(IGES) to Arc/INFO
arciges - Converts from Arc/INFO to IGES
etakarc - Converts from Etak MapBase file to Arc/Info
There are many others—go to ArcDoc under “Data Conversion”for details
9
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
Conversion from Other GIS (e.g .dxf)
LAYERS
• DXF format files, for example, may have up to 999 “layers” of vector data.
This is typical of CAD files.
– Use the command dxfinfo (for .dxf) or igdsinfo ( for .dgn) to get list of layers
• shapefiles and coverages typically contain only one type of data—for example,
streets, railroads, and hydrologic features would each be a separate coverage
– However, it is possible to store multiple line and point features in a single
coverage, using an item field (dxf-layer) to differentiate the layers.
• Generally, when converting CAD files (such as .dxf), you have two choices:
– Convert all layers to one coverage and use an item variable to differentiate them
(use the $REST option; the item dxf-layer will differentiate the layers)
– Convert each layer to its own coverage, by either
• Create one coverage as above and then reselect on dxf-layer to re-create separate ones
• Use dialog in dxfarc (or ArcToolbox wizard) to convert each layer to separate coverages
10
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
Conversion from Other GIS (e.g. .dxf)
(contd.)
ATTRIBUTE DATA
• Some converted coverages (for example, those from dxf and
dgn formats) have INFO files containing attributes for the
coverage that are not automatically joined to the coverage.
–
These INFO files can be seen with Arc: dir info command.
• The attributes are stored in
– <cover>.acode INFO file for feature class arc
– <cover>.pcode INFO file for feature class poly
– <cover>.xcode INFO file for feature class point.
• Use the JOINITEM command to join the INFO file to the
cover, using <cover>-id as the <relate_item>
• Note that TIGERTOOL and the conversion wizards in
ArcToolbox do the joinitem for you
11
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
AutoCAD .dxf Example
Key83.dxf, the file to be converted, is in p:\poec6382\ex4
&watch dxfarc.wat (useful for viewing output from dxfinfo below)
Display the dxf file—note the multiple layers
Arc: ap
Arcplot: mape dxf key83.dxf
Arcplot: dxf key83.dxf
Arcplot: quit
Display info about dxf file layers—again, note the mutiple layers
Arcplot: dxfinfo key83.dxf
(provides info about the dxf layers—
does not covert to INFO)
Convert
Arc: Dxfarc key83.dxf
Enter the 1st layer and options: $rest
(converts all layers)
View Results
arc: dir info
key83.acode (arc features)
key83.xcode (point features—text annotation in this case)
Note: no .aat or .pat file)
12
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
AutoCAD .dxf Example (contd)
Join Attribute data
arc: build key83 lines
Arc: dir info
Arc: items key83.aat
Arc: list key83.acode
(there is now an .aat file.)
(however, no attribute data in .aat file)
(this is where the attribute data is
--note the dxf-layer variable which identifies the layer
--use dxf-layer to split into separate coverages
arc: joinitem key83.aat key83.acode key83.aat key83-id (adds attribute data to .aat file)
Separate out the city layer
arc: reselect key83 key83city lines
Enter a logical expression

reselect dxf-layer = ‘CITY’

do you wish to re-enter ? n

do you wish to enter another expression? n
arc: clean key83city
arc: build key83city poly
arc: describe key83city
Display key83city in arc
• Arc: ap
• Arcplot: mape key83city
• Arcplot: polys key83city
13
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
INTERGRAPH .dgn Example
• Get information: IGDSINFO <in_igds_file>
Arc: igdsinfo base.dgn\
(Provides the layer names you will for the igdsarc command to process selected
layers.)
• Do conversion: IGDSARC <in_igds_file> <out_cover>
Arc: igdsarc base.dgn base
• IGDSARC will prompt you for the information necessary to perform the
IGDS conversion. You will be prompted for the layer names and entities of
each IGDS layer to be processed. The format of the interactive dialog used
by IGDSARC is as follows:
Enter layer names and options (type END or $REST when done):
==================================================
Enter the 1st layer and options: $REST
Do you wish to use the above layers and options (Y/N)? Y
14
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
INTERGRAPH .dgn Example (contd.)
• Check if coverage has been created:
Arc: lc
• Look at files created
Arc: dir info
(will see .aat and .acode info files)
• Describe the coverage -- see if topology needed.
• Build topology for lines or polygons, depending on cover
• Join the acode attributes to the .aat, or the xcode
attributes to the .pat
15
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software
Notes on ArcToolbox
Converting Shapefiles
• When converting shapefiles with polygons, ArcToolbox runs
shapearc, regionpoly and dropitem, thus creating “ready to
use” feature attribute table
Converting CAD files
• CAD files displayed in ArcCatalog have two icons:
– “triple box” (top) icon contains point, arc, polygon datasets
• Use this for conversions
– “single box” (lower) icon is drawing file, and will display all layers
• When converting, convert each dxf-layer separately
– .acode (for arcs), .pcode (for polys) and .xcode (for point and
annotation) files are created, and they are also automatically joined to
the feature attribute tables.
16
11/6/2015 – UT Dallas
POEC 6382 Applied GIS Software