5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

16
07/19/22 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion

Transcript of 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

Page 1: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software1

Data Conversion

Page 2: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software2

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 – arctiger– tigertool

• From another GIS • To another GIS– dlgarc (.dlg) – arcdlg– dxfarc (.dxf) – arcdxf– igdsarc (.dgn) – arcigds– igesarc (.ige) – arciges– etakarc (

• From DBASE to INFO • To DBASE from INFO– dbaseinfo – infodbase

There are many others—go to ArcDoc under “Data Conversion”for details

Page 3: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software3

Arc Interchange File FormatInterchange 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

Page 4: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software4

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.

Page 5: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software5

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

Page 6: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software6

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}

Page 7: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software7

Steps for SHAPEARC with polygonsExample 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)

Page 8: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software8

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.

Page 9: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software9

CONVERSION FROM OTHER GISdlgarc - Converts from USGS Digital Line Graph (DLG) format to

Arc/INFO formatarcdlg - Converts from Arc/INFO to DLGdxfarc - Converts Autocad DXF (digital exchange format) to Arc/INFOdxfinfo - Describes the contents of a DXF filearcdxf - Converts from Arc/INFO to DXF formatigdsarc - 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 filearcigds - Converts from Arc/INFO to IGDSigesarc - Converts from Initial Graphics Exchange Specification

(IGES) to Arc/INFOarciges - Converts from Arc/INFO to IGESetakarc - Converts from Etak MapBase file to Arc/Info

There are many others—go to ArcDoc under “Data Conversion”for details

Page 10: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software10

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

Page 11: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software11

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

Page 12: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software12

AutoCAD .dxf ExampleKey83.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: apArcplot: mape dxf key83.dxfArcplot: dxf key83.dxfArcplot: quit

Display info about dxf file layers—again, note the mutiple layersArcplot: dxfinfo key83.dxf (provides info about the dxf layers—

does not covert to INFO)Convert

Arc: Dxfarc key83.dxfEnter the 1st layer and options: $rest (converts all layers)

View Resultsarc: dir info

key83.acode (arc features)key83.xcode (point features—text annotation in this case)

Note: no .aat or .pat file)

Page 13: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software13

AutoCAD .dxf Example (contd)Join Attribute data

arc: build key83 linesArc: dir info (there is now an .aat file.)Arc: items key83.aat (however, no attribute data in .aat file)Arc: list key83.acode (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 layerarc: 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? narc: clean key83cityarc: build key83city polyarc: describe key83city

Display key83city in arc• Arc: ap• Arcplot: mape key83city• Arcplot: polys key83city

Page 14: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software14

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

Page 15: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software15

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

Page 16: 5/11/2015 – UT Dallas POEC 6382 Applied GIS Software 1 Data Conversion.

04/18/23 – UT Dallas POEC 6382 Applied GIS Software16

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.