Using XML Languages for Modeling and Web-Visualization of Geographical Legacy Data B. Mathiak, A. Kupfer, K. Neumann TU Braunschweig, Information Systems Group Outline: Motivation A GML Schema for Landscape Data SVG – Scalable Vector Graphics XSLT: Transforming GML Objects into SVG Elements Conclusion
Geoinfo 2004 Brigitte Mathiak 2 Motivation Idea Case Study mapping geographical objects to graphical objects, in a way similar to cartographic applications GML SVG XSLT real-sized sets of geographic data, available from German Authorities for Land Surveying; obtaining maps similar to official maps
Geoinfo 2004 Brigitte Mathiak 3 … Motivation GML XSLT SVG Geography Markup Language: open standard developed by Open Geospatial Consortium, provides framework (geometry and feature schema) eXtensible Stylesheet Language for Transformation: tool for converting XML documents and thus: tool for converting GML documents Scalable Vector Graphics: language for describing two dimensional vector graphics
Geoinfo 2004 Brigitte Mathiak 4 A GML Schema for Landscape Data GML focuses on geographical features –descriptions of geographical objects within a frame of reference –geometry schema: 5 geometrical types with strictly defined geometrical properties all derived from abstract GML geometry type –feature schema: abstract GML feature type provided flexible basis for user defined feature types Digital Landscape Model of German Authorities for Land Surveying –a data format to store geographical objects –defines how individual objects of a landscape are to be constructed –the data structure is table oriented
Geoinfo 2004 Brigitte Mathiak 5 Transforming landscape data to GML file namelines containing GML element objecttype.txt , 3101 (decodes to street)DLMMemberType name.txt , Bachstr.gml:name coordinates.txt , , , , gml:coord in a gml:centerLineOf element , , , , all lines from DLM have a corresponding GML element codes like the 3101 in objekttype.txt are decoded for human readability the coordinates have to be assembled by a sophisticated algorithm internal references from objects like bridges are modeled by XLink (not in the example)
Geoinfo 2004 Brigitte Mathiak 6 GML Bachstr open for traffic 2 road traffic communal
Geoinfo 2004 Brigitte Mathiak 7 SVG – Scalable Vector Graphics SVG describes two dimensional vector graphics in XML terminology Path one of the most important SVG instructions, Statement generates any kind of line or polygon Example <path fill="none" stroke-width="3" stroke="green" d="M l M q M q M q M q " id="PlantSymbol"/>
Geoinfo 2004 Brigitte Mathiak 8 SVG – Filling Patterns Example swamp area <pattern id="Swamp" x="0" y="0" width="65" height="60" patternUnits="userSpaceOnUse">.areaSwamp {fill: url(#Swamp)} <path class="areaSwamp" d="M L Z"/>
Geoinfo 2004 Brigitte Mathiak 9 SVG - How to produce map-like Graphics numerous style definitions needed for transformation of all GML-encoded object types –concentration on some 50 object types –resulting in about 70 style classes and 30 signatures style classes created as close to original map design as possible SVG draws in a covering mode –order of graphical objects in the document is important graphical objects organized in 11 layers (from always overdraw to always on top) similar to different layers used in cartographic map construction
Geoinfo 2004 Brigitte Mathiak 10 XSLT: Transforming GML Objects into SVG Elements XSLT Implementation Templates for Example XML based language for converting XML documents; uses pattern matching; patterns given in terms of XSLT templates each visualized object type needs at least one specialized template rivers, lakes, forests, housing areas, streets etc. template for transforming streets
Geoinfo 2004 Brigitte Mathiak 11 XSLT: Transforming … Streets <xsl:template match="/dlm:DLMModel/dlm:dlmMember/dlm:Street [contains(dlm:attributes/dlm:dedication,'communal') or contains(dlm:attributes/dlm:dedication,'misc.')]"> <xsl:with-param name="styleclass" select="'lineMinorStreetCommunalForeground'"/>
Geoinfo 2004 Brigitte Mathiak 12 XSLT – Bachstr. Example The template applied to Bachstr.: <path class="lineMinorStreetCommunalForeground" d="M L "/>.lineMinorStreetCommunalForeground {fill: none; stroke-width: 8.5px; stroke: snow; stroke-linejoin: round} Not Presented conversion of Gauß-Krüger-coordinates in Here SVG coordinates; error handling; further details
Geoinfo 2004 Brigitte Mathiak 13 Conclusion - A Generated Map
Geoinfo 2004 Brigitte Mathiak Conclusion Case Study Data Source Result modeling and visualizing real-sized sets of geographic data with XML based languages GML, XSLT, SVG using freely available software only German Authorities for Land Surveying maps similar to official maps
Thank you!