270 likes | 610 Views
Differences between CAD and GIS data structures. CAD (DXF, DWG, DGN). GIS (Shape, TAB, GeoBase). Supportin engineering drawing. Querying, analyzing spatial data. Several element types. Point, polyline , polygon, (text). One file, several layer (foil). On layer, some files.
E N D
Differences between CAD and GIS data structures CAD (DXF, DWG, DGN) GIS (Shape, TAB, GeoBase) • Supportin engineering drawing • Querying, analyzing spatial data • 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 • Attributes are optional • Attributes are always considered • 3D • 2D, 2.5D • Projection
CAD Text • CAD objects • Line • Circle, arc, ellipse, elliptical arc • Polyline, polygon, spline • Text • 3D object (cube, sphere, cone, etc.) • Dimesioning objects • etc.
GIS GIS objects Point/node Polyline (arc) Polygon
Vector and raster data representation Hybrid model Vectors Rasters • Smaller data sets • Huge data sets • Unlimited resolution • Limited resolution • Complex data structure • Simple data structure
Layer and object data model Building Layers Building object Terace 12 House number 12 Trees Parcel object Parcel subparcel Pacel ID Water 1234/1 Buildings 1234/1 Parcels Layers, horizontal grouping Objects, vertical grouping
Graphical and attribute data 12 4563/2 L4 12 x1,y1;x2,y2;x3,y3;x4,y4 GIS 1:1 1 layer – 1 table 1 object – 1 record CAD n:m 1 drawing – many table 1 object – many record 1 record – many object Graphic database Relational database Attribute data + identifier Graphic data + identifier
Data Exchange Formats Industrial standards, attached to specific software CAD GIS MIF/MID Shape DXF INFOCAM sequential E00 … DGN DWG Independent standards National standards XML ATKIS SDTS … … DIGEST … SVG GML SDTS – Spatial Data Transfer Standard DIGEST – DIgital Geographic information Exchange STandard
0 SECTION 2 HEADER … 0 ENDSEC 0 SECTION 2 TABLES … ENDSEC 0 SECTION 2 BLOCKS … ENDSEC 0 SECTION 2 ENTITIES … ENDSEC EOF DXF format 0 TABLE 2 LAYER 70 1 0 LAYER 2 0 layer name 70 0 visible 62 7 color 6 CONTINUOUS linetype 0 ENDTAB 0 LINE 5 2B 8 0 layer 10 10.0 x1 20 30.0 y1 30 0.0 z1 11 150.0 x2 21 80.0 y2 31 0.0 z2
MIF/MID format Version 300 Charset "WindowsLatin2" Delimiter "," CoordSys NonEarth Units "m" Bounds (-1390, -470) (1550, 580) projection Columns 1 ID Integer structure of database table Data Line 9.9999994 29.9999998 150.0000006 80.0000002 Pen (1,2,16711680)
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)
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> <?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>]> • dtd – document template definition • schema – schema definition • xml parser (e.g. xerces)
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>
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>
DAT format • MSZ 7772 Hungarian standard 1996 • Rigid table structures and objects • For land cadastre data 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** ATKIS in Germany SDTS in the US
Useful links ioc.unesco.org/oceanteacher/resourcekit/M3/Formats/ Integrated/DXF/ASCIIDXFFileFormat.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
Creation of digital maps Secondary data sources Primary data sources Digitizing Numeric data Geo- reference Scanning Table digitizing Observations fieldbooks Automatic vectorization Manual vectorization Numeric data input, constructing Digital raster map Digital vector map
Pixel N neighborhoods, even – edge neighbors 3 2 1 4 P 0 5 6 7 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) Raster to vector conversion (R2V) Steps of vectorization Semi-automatic method Raster snap Optical Character Recognition (OCR)
Topology 13 1 1 2 7 2 Graphic objects 2 3 4 1 14 Reference ő point (tic) 3 5 node 6 8 polyline 5 centroid (label) tó 4 3 polygon 12 annotation 11 10 6 16 7 - Centroid id 7 4 15 8 - Polyline id 12 7 9 - Node id 5 6 5 10 11 9 • 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
Drawing cleaning Drawing error Explanation 1. Objects that share the same start and end points duplicate objects Delete one of them 2. Objects shorter than the spaoecified tolerance short objects 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. Objects cross each other with no node at crossing crossing objects 6. Any nodes within the specified tolerance distance clustered nodes Snap them to the centermost node 7. Any node shared by only two objects pseudo nodes Dissolve the node and join the two objects 8. Objects with at least one endpoint that is not shared dangling objects by another object. Erase the object Aims – find and correct topological errors Automatic solution, tolerance Break crossing objects and create node at crossing