differences between cad and gis data structures cad (dxf, dwg, dgn)gis (shape, tab, geobase) several...

19
Differences between CAD and GIS data structures CAD (DXF, DWG, DGN) GIS (Shape, TAB, GeoBase) •Several element types •Point, polyline, polygon, (text) One file, several layer (foil) •On layer, some files •Spaghetti data model •Topologic data model •Stores display attributes too •Stores geometric data only •Supportin engineering drawing •Querying, analyzing spatial data •Attributes are optional •Attributes are always considered •3D •2D, 2.5D •Projection

Upload: maggie-parkins

Post on 14-Dec-2015

231 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Differences between CAD and GIS data structures

CAD (DXF, DWG, DGN) GIS (Shape, TAB, GeoBase)

•Several element types •Point, polyline, polygon, (text)

•One file, several layer (foil) •On layer, some files

•Spaghetti data model •Topologic data model

•Stores display attributes too •Stores geometric data only

•Supportin engineering drawing •Querying, analyzing spatial data

•Attributes are optional •Attributes are always considered

•3D •2D, 2.5D

•Projection

Page 2: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

CAD

CAD objects•Line•Circle, arc, ellipse, elliptical arc•Polyline, polygon, spline•Text•3D object (cube, sphere, cone, etc.)•Dimesioning objects•etc.

Page 3: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

GISGIS objects

Point/node

Polyline (arc)

Polygon

Page 4: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Vectors Rasters•Smaller data sets•Unlimited resolution•Complex data structure

•Huge data sets•Limited resolution•Simple data structure

Vector and raster data representation

Hybrid model

Page 5: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Layer and object data model

Layers, horizontal grouping Objects, vertical grouping

Parcel object

1234/1

1234/1

Parcel subparcel Pacel ID

Building object

1212

Building

Terace

Housenumber

Parcels

Buildings

Water

Trees

Layers

Page 6: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Graphic data + identifier Attribute data + identifier

12x1,y1;x2,y2;x3,y3;x4,y4 12 4563/2 L4

Relational databaseGraphic database

Graphical and attribute data

GIS 1:11 layer – 1 table1 object – 1 record

CAD n:m1 drawing – many table1 object – many record1 record – many object

Page 7: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Data Exchange Formats

DXFMIF/MID

ATKIS

E00

Shape

INFOCAM sequential

DGN

DWG

SDTSXML

SVG GML

Industrial standards, attached to specific software

National standardsIndependent standards

CAD GIS

SDTS – Spatial Data Transfer Standard

DIGEST

DIGEST – DIgital Geographic information Exchange STandard

Page 8: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

DXF format

0SECTION 2HEADER… 0ENDSEC 0SECTION 2TABLES…ENDSEC 0SECTION 2BLOCKS…ENDSEC 0SECTION 2ENTITIES…ENDSECEOF

0LINE 52B 80 layer 1010.0 x1 2030.0 y1 300.0 z1 11150.0 x2 2180.0 y2 310.0 z2

0TABLE 2LAYER 70 1 0LAYER 20 layer name 70 0 visible 62 7 color 6CONTINUOUS linetype 0ENDTAB

Page 9: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

MIF/MID format

Version 300Charset "WindowsLatin2"Delimiter ","CoordSys NonEarth Units "m" Bounds (-1390, -470) (1550, 580) projectionColumns 1 ID Integer structure of database tableData

Line 9.9999994 29.9999998 150.0000006 80.0000002 Pen (1,2,16711680)

Page 10: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Shape format

Binary format

•.shp – co-ordinates of elements, all elements must have the same type, point, polyline or polygon

•.dbf – dBase database table

•.shx – minimal boundary rectangle (MBR)

Page 11: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

XML format<?xml version="1.0"?> <matrix>

<comment>This is a matrix</comment><r> <c>1.2</c> <c>3.5</c> <c>-1.2</c> </r><r> <c>2.4</c> <c>1.9</c> <c>11.8</c> </r><r> <c type=int>4</c><c>6.5</c> <c>-0.6</c> </r>

</matrix>

•dtd – document template definition

•schema – schema definition

•xml parser (e.g. xerces)

<?xml version=„1.0”?><!DOCTYPE matrix [<!ELEMENT matrix (r+, comment?)><!ELEMENT r(c+)><!ELEMENT c (#CDATA)><!ELEMENT comment (#CDATA)><!ATTLIST c type (int|real) #IMPLIED>]>

Page 12: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

SVG format

<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN„"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"><svg width="600" height="300"><g><line style="stroke:black;" x1="10" y1="30" x2="150" y2="80"/></g></svg>

Page 13: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

KML format

<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark>

<name>Simple placemark</name><description>Attached to the ground.</description><Point>

<coordinates>-122.0822035425683,37.42228990140251,0</coordinates>

</Point></Placemark> </kml>

Page 14: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

DAT format

DAT sampleT_PONT*1*242176.480*646926.000**7**2*242166.050*646901.500**7**3*242166.050*646933.190**7**…T_HATARVONAL*1*1*4*3*0**1*2*3*1*0**1*3*1*2*0**

•MSZ 7772 Hungarian standard 1996

•Rigid table structures and objects

•For land cadastre data

ATKIS in GermanySDTS in the US

Page 15: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Useful linksioc.unesco.org/oceanteacher/resourcekit/M3/Formats/ Integrated/DXF/ASCII DXF File Format.htm

http://www.opendwg.org

http://www.bentley.com/opendgn/

http://www.directionsmag.com/mapinfo-l/mif/AppJ.pdf

http://www.w3.org/TR/2000/REC-xml-20001006

http://www.classes.cs.uchicago.edu/archive/2003/fall/23700/docs/handout-03.pdf

http://www.svgopen.org/abstracts/de_vries__gml_and_svg.html

http://www.w3.org/TR/SVG/

http://www.agt.bme.hu/tutor_h/presentationhu/0h.svg

Page 16: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Digitizing Numeric data

Tabledigitizing

Scanning Observationsfieldbooks

Numeric data input,constructing

Automaticvectorization

Manualvectorization

Digital vector map Digital raster map

Secondary data sources Primary data sources

Geo-reference

Creation of digital maps

Page 17: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

Raster to vector conversion (R2V)

3 2 1

4 P 0

5 6 7

Pixel N neighborhoods, even – edge neighbors

Steps of vectorization

Found the border,One of the n neighbors has background color

Multiple pixels, more than ones in the border

Object thinning, until multiple pixels left only(maximum 2 pixels wide)

Semi-automatic method

Raster snap

Optical Character Recognition (OCR)

Page 18: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

•Continuity and neighboring information for map objects

•They are invariant from the chosen co-ordinate system

•They make analyzis functions faster, e.g. shortest path

Topology

FNODE_ TNODE_ LPOLY RPOLY LENGTH ID1 5 1 -1 287 11 2 2 1 82 22 5 5 1 143 38 9 5 7 223 49 10 6 7 43 53 6 4 5 195 63 4 2 4 51 74 7 -1 4 204 87 10 -1 6 185 9

11 11 3 5 101 108 10 7 -1 264 115 8 5 -1 102 121 4 -1 2 248 132 3 2 5 213 146 9 6 5 59 156 7 4 6 89 16

1

5

2

4

76

3

Graphic objects

Referenceő point (tic)

polyline centroid (label)polygon

annotation

node

12

3

4

5

6

7

8

9

10

11

12

13

14

15

16- Centroid id

12 - Polyline id7

5

12 3 4

5

67

8

9

10

- Node id

11

Page 19: Differences between CAD and GIS data structures CAD (DXF, DWG, DGN)GIS (Shape, TAB, GeoBase) Several element typesPoint, polyline, polygon, (text) One

1 0 1 3 1 0 1 2 1 0 1 1 1 0 1 0

1 0 1 61 0 1 5

1 0 1 4

1 0 1 7 1 0 1 8

2 0 1 1

2 0 1 1

2 0 1 3 2 0 1 2

2 0 1 62 0 1 5

2 0 1 4

3

1 4

6

8

2

5

7

5

4

Aims – find and correct topological errors

Automatic solution, tolerance

Drawing cleaningDrawing cleaning

Drawing error Explanation

1. duplicate objects

Objects that share the same start and end pointsDelete one of them

2. short objects

Objects shorter than the spaoecified tolerance Erase them

3. undershoots Objects that come within the specified tolerance radius of each other, but do not meet

4. overshoots Object overpath another object shorter than the Specified tolerance Break crossing objects and erase overshoot part

5. crossing objects

Objects cross each other with no node at crossing

6. clustered nodes

Any nodes within the specified tolerance distance Snap them to the centermost node

7. pseudo nodes

Any node shared by only two objects Dissolve the node and join the two objects

8. dangling objects

Objects with at least one endpoint that is not shared by another object. Erase the object

Break crossing objects and create node at crossing