Map Types Used Topographical map (1:10 000, 1:200 000) Land Cadastre Map (1:1000-1-4000) Utility base map (1:500) Joint utility map (1:500) Detailed utility map (1:500) Town development plan (map) (1:1000-1:10000) Town restriction plan (map) (1:1000-1:10000) Orthophoto, satellite image
Vector and raster data representation Vectors Smaller data sets Unlimited resolution Complex data structure Editable Geometry queries(e.g. area) Hybrid model Rasters Huge data sets Limited resolution Simple data structure Hardly editable Information rich
Creation of digital maps Secondary data sources Digitizing Primary data sources Numeric data Georeference Scanning Table digitizing Observations, field books (semi)automatic vectorization Manual vectorization Numeric data input, constructing Digital raster map Digital vector map
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)
Topology 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 vs spagetti model FNODE_ TNODE_ LPOLY RPOLY LENGTH ID 1 5 1-1 287 1 1 2 2 1 82 2 2 5 5 1 143 3 8 9 5 7 223 4 9 10 6 7 43 5 3 6 4 5 195 6 3 4 2 4 51 7 4 7-1 4 204 8 7 10-1 6 185 9 11 11 3 5 101 10 8 10 7-1 264 11 5 8 5-1 102 12 1 4-1 2 248 13 2 3 2 5 213 14 6 9 6 5 59 15 6 7 4 6 89 16 5 8 12 1 1 3 4 13 2 1 2 7 2 3 4 14 5 6 8 tó 3 4 10 11 6 16 7 15 7 9 6 5 10 11 9 Graphic objects Reference ő point (tic) node polyline centroid (label) polygon annotation 7 - Centroid id 12 - Polyline id 5 - Node id
Aims find and correct topological errors Automatic solution, tolerance Drawing cleaning 1. 2. Drawing error duplicate objects short objects Explanation Objects that share the same start and end points Delete one of them 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. 6. 7. 8. crossing objects clustered nodes pseudo nodes dangling objects Objects cross each other with no node at crossing Break crossing objects and create node at crossing Any nodes within the specified tolerance distance Snap them to the centermost node Any node shared by only two objects Dissolve the node and join the two objects Objects with at least one endpoint that is not shared by another object. Erase the object 1013 1012 1011 1010 1 1014 4 1015 1016 1017 1018 2013 2012 2014 3 2 2015 2016 4 5 2011 5 6 8 7
Differences between CAD and GIS data structures CAD (DXF, DWG, DGN) Supporting engineering drawing Several element types One file, several layer (foil) Spaghetti data model Stores display attributes too Attributes are optional GIS (Shape, TAB, GeoBase) Querying, analyzing spatial data Point, polyline, polygon, (text) On layer, some files Topological data model Stores geometric data only Attributes are always considered 3D 2D, 2.5D Projection
Graphical and attribute data 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 Graphic data + identifier Relational database Attribute data + identifier x1,y1;x2,y2;x3,y3;x4,y4 12 12 4563/2 L4
Data Exchange Formats Industrial standards, attached to specific software CAD DXF GIS TIGER MIF/MID Shape E00 DGN DWG Independent standards National standards XML WKT ATKIS SDTS SVG GML KML DIGEST 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) Columns 1 ID Integer structure of database table Data projection Line 10.0 30.0 150.0 80.0 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).prj projection (optional)
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> ]>
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 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="600" height="300"> <g> <line style="stroke:red;" x1="10" y1="30" x2="150" y2="80" stroke-width="5" /> </g> </svg> FireFox, Google Chrom, Opera, etc. can display SVG files Internet Explorer doesn't follow standards :( KML format (Google Earth) GML format (OGC), CityGML Line.svg Embedded Javascript is allowed
KML format <?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Placemark> <name>simple placemark</name> <description>attached to the ground.</description> <LineString> <tessellate>1</tessellate> <coordinates> 10,30,0 150,80,0 </coordinates> </LineString> </Placemark> </Document> </kml> WGS84 coordinates!
GML (Geographic Markup Language) <?xml version="1.0" encoding="utf-8"?> <ogr:featurecollection xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://ogr.maptools.org/ xxx.xsd" xmlns:ogr="http://ogr.maptools.org/" xmlns:gml="http://www.opengis.net/gml"> <gml:boundedby> <gml:box> <gml:coord><gml:x>10</gml:x><gml:y>30</gml:y></gml:coord> <gml:coord><gml:x>150</gml:x><gml:y>80</gml:y></gml:coord> </gml:box> </gml:boundedby> <gml:featuremember> <ogr:xxx fid="f0"> <ogr:geometryproperty><gml:linestring><gml:coordinates>10,30 150,80 </gml:coordinates></gml:linestring></ogr:geometryproperty> <ogr:id>1</ogr:id> </ogr:xxx> </gml:featuremember> </ogr:featurecollection>
WKT (Well Known Text) LINESTRING(10 30,150 80) Mainly used in relational databases for export/import e.g. PostGIS, Oracle Spatial, SQL Server 2008, Spatialite 2D, 3D, 4D features POINT(10 20) POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2)) GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10)) WKB Well Known Binary, binary internal storage format: 010100002031BF0D00E16249E323953C41C2D6261D4F495641 EWKT spatial reference system included SRID=4269;POINT(-71.064544 42.28787)
Useful links ioc.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