6 spatial data and xml - tu braunschweig6.1 standards 6.2 xml 6.3 gml 6.4 xslt 6 spatial data and...

97
6.1 Standards 6.2 XML 6.3 GML 6.4 XSLT 6 Spatial Data and XML 6.4 XSLT 6.5 SVG 6.6 Summary Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 449

Upload: others

Post on 11-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

6.1 Standards

6.2 XML

6.3 GML

6.4 XSLT

6 Spatial Data and XML

6.4 XSLT

6.5 SVG

6.6 Summary

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 449

• Collection of spatial data is particularly expensive

• Spatial data is durable, must be updated nevertheless

• Geoservices are increasingly offeredby the internet

• Spatial data should be capable of being

6 Spatial Data and XML

• Spatial data should be capable of being integrated and easily interchangeable

• Unified visualization of spatial data isdesirable

• Preferably do not use individual formatsbut common standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 450

http://picture.yatego.com/

• De facto standards emerge over time through frequent use

• De facto standards are standardized by institutions

• In the area of standards for spatial data the following institutions are important

6.1 Standards

institutions are important– International Organization for Standardization (ISO)

– Open Geospatial Consortium (OGC)

– Working Committee of the Surveying Authorities of the States of the Federal Republic of Germany (Arbeitsgemeinschaft der Vermessungsverwaltungen der Länder der Bundesrepublik Deutschland (AdV))

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 451

• International Organization forStandardization (ISO)

– International association ofstandardization bodies from approx. 150 countries

– Develops international standards in many technical

6.1 Standards

– Develops international standards in many technical areas

– Serves the exchange of goods and services and the mutual cooperation

– In the area of spatial information 5 working groups (in ISO/TC 211)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 452

• National standardization bodies and ISO

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 453

http://www.geoinformation.net/

• ISO/TC 211 geographic information/geomatics

– Approx. 60 members

– Edits the standard series ISO 19100

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 454

http://www.geoinformation.net/

• ISO 19107 Spatial Schema

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 455

http://www.geoinformation.net/

• Geometry classes in the spatial schema

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 456

http://www.geoinformation.net/

• Open Geospatial Consortium (OGC)– International consortium of approx. 350 members (industry, administration, research)

– Develops fundamentals for standardized access methods for spatial information

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 457

http://www.geoinformation.net/

– Products of the OGC are specifications• Basic models, abstract specifications, implementation specifications

– Overview of abstract specifications

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 458

http://www.geoinformation.net/

– Particularly important: Simple Features

• Standard for modeling the geometry of spatial objects

• 0-, 1-, 2-dimensional, straight lines, no topology

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 459

• SQL/MM spatialvs.Simple Featuresgeometry

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 460

• Cooperation between ISO/TC 211 and OGC

6.1 Standards

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 461

http://www.geoinformation.net/

• Example: OpenGIS Catalog Service Implementation Specification

• Supports publishing and searching of geospatial metadata

6.1 Standards

metadata

– Approx. 200printed pages

– Includes syntaxof the catalogquery language

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 462

http://www.opengeospatial.org/standards/cat

• Working Committee of theSurveying Authorities of theStates of the Federal Republicof Germany (Arbeitsgemeinschaft der Vermessungsverwaltungen der Länder der Bundesrepublik Deutschland (AdV))

6.1 Standards

Bundesrepublik Deutschland (AdV))– Coordination of the German cadastral surveying– Development of recommendations for

• Authoritative topographic cartographic information system (amtliches topographisch-kartographisches Informationssystem (ATKIS))

• Authoritative real estate cadastre information system (amtliches Liegenschafts-Kataster-Informationssystem (ALKIS))

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 463

– Representation of the official German surveying in international institutions (see section 2.5 AAA-Project)

– Provide ISO/OGC-compliant components for spatial data infrastructure

6.1 Standards

data infrastructure

– Example: AFIS-ALKIS-ATKIS specialized technical schema with 226 object types, including

• Buildings, including

• Groups of object types: information concerning buildings, including

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 464

• Object class: AX_Gebaeude with definition:

• A permanent building, whose documentation is required because of its importance as a property and which serves the purpose of the basic information of real estate cadastre

• With 20 attributes, including:

6.1 Standards

• Function of building with approx. 200 values, including:

• 2000 (business/industry), 2056 (pharmacy), 2081 (restaurant), 3071 (police)

– Provide the technical schemas (and all object copies) in ISO/OGC-compliant formats

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 465

• Example: a single building<AX_Gebaeude gml:id="DEHHSERV00001FN1">...<position><gml:Polygon><gml:exterior><gml:Ring>...<gml:pos>3567807.047 5930017.550</gml:pos><gml:pos>3567810.850 5930024.755</gml:pos>

...

6.1 Standards

<gml:pos>3567810.850 5930024.755</gml:pos>...

<gml:pos>3567807.047 5930017.550</gml:pos>...

</gml:Ring></gml:exterior>

</gml:Polygon></position><gebaeudefunktion>2000</gebaeudefunktion><weitereGebaeudefunktion>1170</weitereGebaeudefunktion><bauweise>2100</bauweise><anzahlDerOberirdischenGeschosse>1</anzahlDerOberirdischenGeschosse><anzahlDerUnterirdischenGeschosse>1</anzahlDerUnterirdischenGeschosse><dachform>3100</dachform>

</AX_Gebaeude>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 466

• Extensible Markup Language

• Representation of hierarchicallystructured data in the formatof text files

6.2 XML

of text files

• Metalanguage for the descriptionand generation of markup languages

• "Special context-free grammar for defining specific context-free grammars"

• "Standard for exchanging data on the web"

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 467

• Markup language: language (words over an alphabet) with special symbols (tags) in the character strings

• HTML example:

6.2 XML

• HTML example:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 468

[EE04]

<ul><li><p>Geotopographische

Basisinformationenin digitaler Form

</li><li> <p> Geod&auml; tische

Referenznetze</li>

</ul>

• A (concrete) class of XML-based applications is also called document class

• An extension of such a class is called a document (or an application)

• The structure of

6.2 XML

• The structure ofdocument classescan be specified bymeans of a document typedefinition (DTD)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 469

http://www.swisseduc.ch/informatik/

• Main components of the DTDs are – Elements

– Attributes

– Entities

• Elements are the basic modules of XML

6.2 XML

• Elements are the basic modules of XML documents – Consist of a start and an end tag

– May be empty

– May be nested (hierarchical structure of XML documents)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 470

• Example: a DTD of a city

6.2 XML

<!ELEMENT city(name, inhabitants?, area)>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 471

<!ELEMENT city(name, inhabitants?, area)><!ELEMENT name (#PCDATA)><!ELEMENT inhabitants(#PCDATA)><!ELEMENT area(polygon+)><!ELEMENT polygon (point, point, point,

point, point*)><!ELEMENT point(x, y)><!ELEMENT x (#PCDATA)><!ELEMENT y (#PCDATA)>

– A well-formed instance:

6.2 XML

<?xml version="1.0" standalone="yes"?><!DOCTYPE city SYSTEM "city.dtd"><city><name>Braunschweig</name>

<inhabitants>248000</inhabitants><area><polygon>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 472

<polygon><point><x>10323</x><y>2294</y></point><point><x>10708</x><y>2429</y></point><point><x>11148</x><y>2594</y></point>

...<point><x>10353</x><y>2484</y></point>

</polygon></area>

</city>

– Another well-formed instance:

6.2 XML

<?xml version="1.0" standalone="yes"?><!DOCTYPE city SYSTEM "city.dtd"><city><name>Ausschnitt</name><inhabitants>aus</inhabitants><area><polygon>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 473

<polygon><point><x>welchem</x><y>Text</y></point><point><x>Du</x><y>gleichst</y></point><point><x>dem</x><y>Geist</y></point>

...<point><x>nicht</x><y>mir</y></point>

</polygon></area>

</city>

• Attributes specify additional properties of elements

6.2 XML

– Example:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 474

[EE04]

<text font-family= "Arial" font-weight= "bold" font-size= "350"stroke= "#FFFFFF" fill= "#FFFFFF" x= "-130.0" y="115.0"> U

</text>

• Entities

– Placeholder for content

– Will be declared once and can be used repeatedly

– At each place of use the parser replaces reference by

6.2 XML

At each place of use the parser replaces reference by appropriate value

– Example:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 475

<!ENTITY baumgrün "#00ff00"><!ENTITY grenzviolett "#9900ff"><path id="SN4100_einzelsignaturNadelholz"d="M 130 0 L -50 0 0 -180 50 0"fill="none" stroke-miterlimit="20"stroke-linejoin="miter"stroke-width="12" stroke="&baumgrün;"/>

• A central XML concept is integration of data and meta-data (XML documents include complete self-descriptions)

• Therefore, removal of DTDs is obvious (for

6.2 XML

• Therefore, removal of DTDs is obvious (for reuse)

• Large-scale projects may have several DTDs (possible name conflicts)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 476

• For combining XML documents multiple concepts exist

– Namespaces

– XPath

6.2 XML

– XPointer

– XLink

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 477

http://www.jeckle.de/

• Namespaces

– Are declared as attribute (of an element) and apply to all sub-trees of that element

– Include a Uniform Resource Identifier (URI) as address

6.2 XML

address

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 478

[EE04]

<AX_Bestandsdatenauszugxmlns:gml="http://www.opengis.net/gml"...>...<gml:featureMember>......</gml:featureMember>...

</AX_Bestandsdatenauszug>

• XML Path Language (XPath)

– Addressing within XML documents

– Basis of XSL Transformations (XSLT) and XPointer

– Navigation in XML documents (trees) with address paths

6.2 XML

• Address paths

– Absolute (begin with '/' for root node) or

– Relative (to the current context node)

– Contain axis information, node tests, predicates

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 479

[EE04]

• XML Pointer Language (XPointer)– Addressing parts of XML documents

– Extension of XPath

– Simple references refer to XML elements which are identified by an ID

6.2 XML

identified by an ID

– Complex references with specifications of blocks (start-point, end-point, range)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 480

<g id="SN3316SymbolKirche"><path fill="none" stroke= "#000000" ... d="M0.0 -500.0 L 0.0 500.0"/><path fill="none" stroke= "#000000" ... d="M-275.0 -200.0 L 275.0 -200.0"/>

</g><use transform="translate(120515.9,152201.3) rotate(136)"

xlink:href="#SN3316SymbolKirche"/>

• XML Linking Language (XLink)– Syntax for defining links within XML documents

– XLinks are linking XML elements with other XML elements

– Declaration by xlink:href="URI"

6.2 XML

– Declaration by xlink:href="URI" – URI information may contain XPointer expressions

– There are simple (xlink: type = "simple") and extended (xlink: type = "extended") XLinks

– Extended XLinks are linking more than two sources

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 481

http://graphics.cs.uni-

sbxlink:href="URI".de/

• Structure of XML documents can be defined by DTDs

• However, expressiveness of DTDs is restricted

– No specific data <!ELEMENT city(name, inhabitants?, area)>

6.2 XML

– No specific datatypes (only CDATA)

– Only few structuringoptions bysub-elements

– Integrity constraintshardly definable

<!ELEMENT city(name, inhabitants?, area)><!ELEMENT name (#PCDATA)><!ELEMENT inhabitants(#PCDATA)><!ELEMENT area(polygon+)><!ELEMENT polygon

(point, point, point, point, point*)>

<!ELEMENT point(x, y)><!ELEMENT x (#PCDATA)><!ELEMENT y (#PCDATA)>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 482

• XML-Schema

– Language for modeling structured information

– Describes by schema language

• Data types

6.2 XML-Schema

<simpleType name="PriorityType"><restriction base="positiveInteger">• Documents

• Document Groups

– Alternative to DTDs

– Element contents can be typed and reused

– Allows limitations of value ranges and specifications of cardinalities

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 483

<restriction base="positiveInteger"><minInclusive value="100"/><maxInclusive value="999"/>

</restriction></simpleType>

• Numerous data types are provided, including

– xsd:string, xsd:boolean, xsd:decimal, xsd:float, xsd:time, xsd:date, xsd:integer (xsd: namespace of XML-Schema)

• Construction of data types with

6.2 XML-Schema

– Base type with restrictions

• Length specifications, patterns, ranges, enumerations

• List types andunion types

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 484

<!-- names of some ALKIS object classes --><!-- may only contain certain characters --><xsd:simpleType name="ObjektartName">

<xsd:restriction base="xsd:string"><xsd:pattern value="A[XP]_[a-zA-Z0-9_]+"/>

</xsd:restriction></xsd:simpleType>

• Complex element declarations are possible

6.2 XML-Schema

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 485

[EE04]

• Example of a complex element declaration

6.2 XML-Schema

<element name="Signaturen">

<complexType>

<sequence>

<element name="Signatur" minOccurs="1" maxOccurs="unbounded">

<complexType>

<choice>

<element name="FlaechenSignatur" type="loc:SigFlaeche"/>

<element name="LinienSignatur" type="loc:SigLinie"/>

<element name="Signaturen"><complexType><sequence><element name="Signatur" minOccurs="1" maxOccurs="unbounded"><complexType><choice><element name="FlaechenSignatur" type="loc:SigFlaeche"/><element name="LinienSignatur" type="loc:SigLinie"/>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 486

<element name="LinienSignatur" type="loc:SigLinie"/>

<element name="SymbolSignatur" type="loc:SigSymbol"/>

<element name="SchriftSignatur" type="loc:SigSchrift"/>

</choice>

<attribute name="Nr" type="loc:SigNrType" use="required"/>

<attribute name="Typ" type="loc:SigTypType" use="required"/>

<attribute name="Darstellungsprioritaet" type="loc:PrioType"use="required"/>

<unique name="uniqueSigNr"><selector xpath="."/><field xpath="@Nr"/></unique>

</complexType>

</element>

</sequence>

</complexType>

</element>

<element name="LinienSignatur" type="loc:SigLinie"/><element name="SymbolSignatur" type="loc:SigSymbol"/><element name="SchriftSignatur" type="loc:SigSchrift"/>

</choice><attribute name="Nr" type="loc:SigNrType" use="required"/><attribute name="Typ" type="loc:SigTypType" use="required"/><attribute name="Darstellungsprioritaet" type="loc:PrioType"use="required"/><unique name="uniqueSigNr"><selector xpath="."/><field xpath="@Nr"/></unique>

</complexType></element>

</sequence></complexType>

</element>

• Example of an element instance

6.2 XML-Schema

<Signaturen>...<Signatur Nr="4286" Typ="Schrift" Darstellungsprioritaet="380"><SchriftSignatur><Bezeichnung>Schriftformat F K 28 blau</Bezeichnung><SchriftStyle><Schriftart>Arial</Schriftart>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 487

<Schriftart>Arial</Schriftart><Schriftstil>Fett, Kursiv</Schriftstil><Schriftgrad>28 pt</Schriftgrad><Schriftfarbe><Farbgrundton>Blau</Farbgrundton>

<Cyan>100</Cyan> <Magenta>0</Magenta><Yellow>0</Yellow><Black>20</Black>

</Schriftfarbe></SchriftStyle><Effekt>Grossbuchstaben</Effekt>

</SchriftSignatur></Signatur>...

</Signaturen>

• Definition of keys and foreign keys

6.2 XML-Schema

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 488

[EE04]

• Geography Markup Language

• Markup Language generated by the use of XML (and XML-Schema); XML application

• To exchange spatial objects (in the OGC context: "features")

6.3 GML

"features")

• Defined by the Open Geospatial Consortium with the ISO TC 211

• Defines numerous constructs for modelling own spatial applications, including – Objects (features) and geometries

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 489

• The current GML specification of the OGC (version 3.0)consists ofapprox. 550 pages

6.3 GML

550 pages

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 490

http://www.opengeospatial.org/

• The basic elements and data types are defined in 33 XML-Schema documents (base schemas)

• A concrete application has to be derived from the given schemas

6.3 GML

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 491

[SX08]

• The central class is the abstract feature type

• “All specific feature types defined in application schemas must be derived from AbstractFeatureType”

6.3 GML

<complexType name="AbstractFeatureType" abstract="true"><complexContent>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 492

<complexType name="AbstractFeatureType" abstract="true"><complexContent><extension base="gml:AbstractGMLType"><sequence><element ref="gml:boundedBy" minOccurs="0"/><element ref="gml:location" minOccurs="0"/><!-- additional properties must be specified in an application schema -->

</sequence><attribute name="fid" type="string"></attribute>

</extension></complexContent>

</complexType>

• Among others the geometries of the “Simple Features” are provided

– Typically 2-dimensional geometries with straight lines

– Including points, lines, polygons

6.3 GML

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 493

• Definition of the polygon type

6.3 GML

<complexType name="PolygonType"><complexContent><extension base="gml:AbstractGeometryType"><sequence><element name="outerBoundaryIs"><complexType><sequence><element ref="gml:LinearRing"/></sequence>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 494

<sequence><element ref="gml:LinearRing"/></sequence></complexType>

</element><element name="innerBoundaryIs" minOccurs="0" maxOccurs="unbounded"><complexType><sequence><element ref="gml:LinearRing"/></sequence>

</complexType></element>

</sequence></extension>

</complexContent></complexType>

• Definition of an own feature type

6.3 GML

<complexType name="lakeTyp"><complexContent><extension base="gml:AbstractFeatureType"><sequence>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 495

<sequence><element name="lakeName" type="string"/><element name="maxDepth" type="integer"/><element name="area" type="decimal"/>

</sequence></extension>

</complexContent></complexType>

• AFIS ALKIS ATKIS schema of the AdVis a (very large) example of a GML-compliant modeling of a spatial application

• Consists of a base schema (contains common base classes for spatial objects)

6.3 GML

http://www.adv-online.de/

base classes for spatial objects)

• And of technical schemas (containing all object classes needed for representing the information occurring in cadastral surveying)

• For ALKIS there exist more than 220 object types including numerous types of relationships

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 496

• Here only a very small example is presented: the schema of a single object class "AX_Gebaeude" (simplified)

6.3 GML

<element name="AX_Gebaeude"/><complexType name="AX_GebaeudeType">

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 497

<complexType name="AX_GebaeudeType"><complexContent><extension base="adv:AG_ObjektType"><sequence><element name="gebaeudefunktion"

type="adv:AX_GebaeudefunktionType"/><element maxOccurs="unbounded" minOccurs="0"

name="weitereGebaeudefunktion"type="adv:AX_Weitere_GebaeudefunktionType"/>

<element maxOccurs="unbounded" minOccurs="0"name="name" type="string"/>

<element maxOccurs="unbounded" minOccurs="0" name="nutzung"type="adv:AX_Nutzung_GebaeudePropertyType"/>

6.3 GML

<element minOccurs="0" name="bauweise"type="adv:AX_Bauweise_GebaeudeType"/>

<element minOccurs="0" name="anzahlDerOberirdischenGeschosse" type="integer"/>

<element minOccurs="0" name="anzahlDerUnterirdischenGeschosse"type="integer"/>

<element minOccurs="0" name="hochhaus" type="boolean"/><element minOccurs="0" name="objekthoehe" type="gml:LengthType"/>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 498

<element minOccurs="0" name="objekthoehe" type="gml:LengthType"/><element minOccurs="0" name="dachform"

type="adv:AX_DachformType"/><element minOccurs="0" name="zustand"

type="adv: AX_Zustand_GebaeudeType"/><element minOccurs="0" name="geschossflaeche" type="gml:AreaType"/><element minOccurs="0" name="grundflaeche" type="gml:AreaType"/><element minOccurs="0" name="umbauterRaum" type="gml:VolumeType"/><element maxOccurs="unbounded" minOccurs="0"

name="baujahr" type="integer"/><element minOccurs="0" name="lageZurErdoberflaeche"

type="adv:AX_LageZurErdoberflaeche_GebaeudeType"/>

<element minOccurs="0" name="dachart" type="string"/><element minOccurs="0" name="dachgeschossausbau"

type="adv:AX_Dachgeschossausbau_GebaeudeType"/><element minOccurs="0" name="gebaeudekennzeichen" type="string"/><element maxOccurs="unbounded" minOccurs="0"

name="zeigtAuf" type="gml:ReferenceType"></element><element maxOccurs="unbounded" minOccurs="0"

6.3 GML

<element maxOccurs="unbounded" minOccurs="0"name="gehoert" type="gml:ReferenceType">

</element><element minOccurs="0" name="gehoertZu“ type="gml:ReferenceType"></element><element maxOccurs="unbounded" minOccurs="0"

name="haengtZusammenMit" type="gml:ReferenceType"></element>

</sequence></extension>

</complexContent></complexType>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 499

<AX_Gebaeude gml:id="DEHHSERV00001FN1">...<position><gml:Polygon><gml:exterior><gml:Ring><gml:pos>3567807.047 5930017.550</gml:pos>

– An instance of "AX_Gebaeude" (simplified)

6.3 GML

"position":

inherited<gml:pos>3567807.047 5930017.550</gml:pos><gml:pos>3567810.850 5930024.755</gml:pos>

...<gml:pos>3567807.047 5930017.550</gml:pos>

</gml:Ring></gml:exterior>

</gml:Polygon></position><gebaeudefunktion>2000</gebaeudefunktion><weitereGebaeudefunktion>1170</weitereGebaeudefunktion><bauweise>2100</bauweise><anzahlDerOberirdischenGeschosse>1</anzahlDerOberirdischenGeschosse><dachform>3100</dachform>

</AX_Gebaeude>Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 500

inherited

of class

AG_ObjektType

• GML serves (also) for the exchange of spatial objects

• Therefor the Web Feature Service (WFS) was defined

6.3 GML

defined

– Web-based access to data "of a distributed GIS"

– Only vector data are exchanged

– Requests are sent as a HTTP request from a client to the WFS

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 501

– WFS offers the following operations • GetCapabilities

• GetFeature

• DescribeFeatureType

• Transaction

6.3 GML

• LockFeature

• GetCapabilities– Describes which WFSservices are available

– Gives the names of theavailable feature types

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 502

http://www.htw-dresden.de/

• DescribeFeatureType

– Describes the schema of a feature type

• GetFeature

– Delivers an instance of a feature

6.3 GML

– Delivers an instance of a feature

– Supports spatial and non-spatial selections

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 503

<wfs:Query typeName="AX_Gebaeude"><ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>weitereGebaeudefunktion</ogc:PropertyName><ogc:Literal>1170</ogc:Literal>

</ogc:PropertyIsEqualTo></ogc:Filter>

</wfs:Query>

• Extensible Stylesheet Language for Transformation

• Programming language totransform XML documents

6.4 XSLT

transform XML documents

• Computational complete

• Based on tree structure of XML documents

• Used to define transformation rules

• Is a declarative and functional programming language

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 504

• XSLT programs (XSLT stylesheets) are XML documents themselves

• Stylesheets are read by XSLT processors; based on the stylesheets' rules the XSLT processors then transforms input documents into output

6.4 XSLT

then transforms input documents into output documents

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 505

• A transformation consists of transformation rules (templates) with the following structure – An XPath-based pattern

– Instructions for constructing the target tree

• Patterns select nodes of the source tree

6.4 XSLT

• Patterns select nodes of the source tree

• From these nodes the instructions generate parts of the target tree

• Frame of a transformation (XSLT stylesheet):

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 506

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform version="1.0"><xsl:output method="xml" /><!– rules --></xsl:stylesheet>

• Main construct is the template

6.4 XSLT

<xsl:template match="...">...instructions...

</ xsl: template>

– If several transformation rules are applicable, the most specific one is applied

– Within a template numerous instructions may occur

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 507

http://data2type.de/xml/

• <xsl:apply-templates select = ... mode = ...> ... parameters may occur... </xsl:apply-templates>– Explicit call of templates

– In the select attribute specification of an XPath

6.4 XSLT

– In the select attribute specification of an XPath expression

– With it selection of the nodes to be processed

– If no select element is present, all direct child nodes are processed

– With the mode parameters further node selection can be performed

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 508

• <xsl:value-of select = .../>

– Generates a string at the current position in the output tree

– String can be the value of a node or of a defined variable

6.4 XSLT

variable

– Select attribute selects node, variable, or parameter whose value is to be used

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 509

• <xsl:for-each select = ...> ...instructions... </xsl:for-each>

– Iteration instructions within a template definition

– All instructions within this statement are applied to all specified nodes

6.4 XSLT

all specified nodes

– Select attribute selects nodes

• <xsl:text>– Generates static text in the result tree

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 510

• <xsl:choose>– Frame for sequence of queries

– <xsl:when test = ...>

...instructions... </xsl:when>

– Queries are finished with <xsl:otherwise>

6.4 XSLT

– Queries are finished with <xsl:otherwise>

– Those query is selected whose condition as first yields true

• <xsl:if test = ...> ...instructions... </xsl:if>– Conditional execution of instructions

– Test attribute contains condition

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 511

• For illustration: excerpt from "xslt.xsd" to describe "choose"

6.4 XSLT

<complexType name="choose" content="elementOnly"><element name="when" type="xsl:conditional-template"

maxOccurs="unbounded"/><element name="otherwise" type="xsl:template-with-space"

minOccurs="0"/>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 512

minOccurs="0"/></complexType>

<complexType name="conditional-template" base="xsl:template-with-space"derivedBy="extension">

<attribute name="test" type="xsl:expr"/></complexType>

<complexType name="template-with-space" base="xsl:template"derivedBy="extension">

<attribute ref="xml:space"/></complexType>

• Example for the use of XSLT

– Transformation of XML-compliant extracts of the digital landscape model (DLM25) into TK25-like graphics (see section 3.2)

– Here: derivation rule for local roads

6.4 XSLT Example

– Here: derivation rule for local roads(are drawn as white lines with a narrow purple boundary)

– Template scans data for local roads and generates drawing commands

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 513

• A (fairly short) road in the given landscape dataset

6.4 XSLT Example

<AtkisMember><Strasse><gml:name>Badstrasse</gml:name><AtkisOID>86118065</AtkisOID><gml:centerLineOf><gml:coord>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 514

<gml:coord><gml:X>4437952.980</gml:X><gml:Y>5331812.550</gml:Y>

</gml:coord><gml:coord><gml:X>4437960.070</gml:X><gml:Y>5331818.450</gml:Y>

</gml:coord><gml:coord><gml:X>4437967.200</gml:X><gml:Y>5331825.410</gml:Y>

</gml:coord></gml:centerLineOf>

6.4 XSLT Example

<Attribute><Zustand>in Betrieb</Zustand><AnzahlDerFahrstreifen

Bedeutung="tatsaechlicheAnzahl"> 2 </AnzahlDerFahrstreifen><Funktion>Strassenverkehr</Funktion><VerkehrsbedeutungInneroertlich>

Anliegerverkehr</VerkehrsbedeutungInneroertlich>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 515

</VerkehrsbedeutungInneroertlich><BreiteDerFahrbahn>Keine Zuweisung </BreiteDerFahrbahn><Widmung>Gemeindestrasse</Widmung><InternationaleBedeutung>

Attribut trifft nicht zu </InternationaleBedeutung><VerkehrsbedeutungUeberoertlich>

Attribut trifft nicht zu </VerkehrsbedeutungUeberuertlich>

</Attribute></Strasse>

</AtkisMember>

• Search for local roads

6.4 XSLT Example

<xsl:templatematch="/dlm:AtkisModell/dlm:AtkisMember/dlm:Strasse">

<xsl:if test="contains(dlm:Attribute/dlm:Widmung,’Gemeindestrasse’)or contains(dlm:Attribute/dlm:Widmung,’Sonstiges’)">

<xsl:call-template name="DrawPath"><xsl:with-param name="styleclass"

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 516

<xsl:with-param name="styleclass"select="linieNebenstrasseNahverkehrVordergrund">

</xsl:call-template></xsl:if>

</xsl:template> <AtkisMember><Strasse><gml:name>Badstrasse</gml:name><AtkisOID>86118065</AtkisOID><gml:centerLineOf><gml:coord><gml:X>4437952.980</gml:X><gml:Y>5331812.550</gml:Y>

</gml:coord>

• Generating line signatures

6.4 XSLT Example

<xsl:template name="DrawPath"><xsl:param name="styleclass"/><svg:path><xsl:attribute name="class"><xsl:value-of select="$styleclass"/></xsl:attribute><xsl:attribute name="d"><xsl:for-each select="gml:centerLineOf/gml:coord"><xsl:choose>

<xsl:when test="position() = 1">

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 517

<xsl:when test="position() = 1"><xsl:text>M </xsl:text><xsl:call-template name="getX"/><xsl:text> </xsl:text><xsl:call-template name="getY"/><xsl:text> L </xsl:text>

</xsl:when><xsl:otherwise>

<xsl:call-template name="getX"/><xsl:text> </xsl:text><xsl:call-template name="getY"/><xsl:if test="position() != last()"><xsl:text> </xsl:text></xsl:if>

</xsl:otherwise></xsl:choose>

</xsl:for-each></xsl:attribute>

</svg:path> </xsl:template>

• Templates "getX" and "getY" read x and y coordinates, transform the coordinates into map coordinates, and write it to the current position in the output tree

• Style class

6.4 XSLT Example

• Style class “linieNebenstrasseNahverkehrVordergrund”:

• Line which is generated in the example (SVG statement):

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 518

.linieNebenstrasseNahverkehrVordergrund{ fill: none; stroke-width: 8.5px; stroke: snow; stroke-linejoin: round}

<path class="linieNebenstrasseNahverkehrVordergrund"d="M 8245.97 -2142.98 L 8253.65 -2146.15 8259.83 -2151.12"/>

• Scalable Vector Graphics (SVG)

• XML-based language for describing two-dimensional, freely scalable vector graphics

6.5 SVG

freely scalable vector graphics

• Standard of the W3C

• Beside static graphics also interactions, animation, and filter applications are provided

• SVG files are relatively small and are editable with any text editor

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 519

• SVG documents are structured like XML documents – Prolog with XML declaration and document type declaration

– Root element, including

6.5 SVG

– Root element, including • Declaration of namespaces and

• Definition area (also for non-SVG code)

– Attributes "width" and "height" specify the width and the height of the entire graphic

– Optional attribute "viewBox" defines reference frame, specified are its left lower point and its width

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 520

– Example, declares a frame for a real estate map in the context of an A3 landscape format and a scale of 1:1000

6.5 SVG

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"

"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width= "42.0cm" height= "29.7cm

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 521

"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width= "42.0cm" height= "29.7cm

viewBox= "99269.744 150779.44 42000.0 29700.0"xmlns:xlink= "http://www.w3.org/1999/xlink">

<defs><style type="text/css">.SN2028LinieFlurstueck{fill: none; stroke-width: 35; stroke-linecap: butt;

stroke-linejoin: miter; stroke: #000000;}...

</style>...

</defs>...

</svg>

• Several SVG elements and attributes, including

– Line between 2 points (line)

– Line connecting several points (polyline)

– Rectangle (rect)

6.5 SVG

Rectangle (rect)

– Circle

– Ellipse

– Polygon

– Path

– Text

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 522

<svg width="70" height="40"><rect x="5" y="5"width="50" height="25"style="stroke: blue; fill: none;">

</svg>

• All attributes of rectangle

6.5 SVG

<!ATTLIST %SVG.rect.qname;%SVG.Core.attrib;%SVG.Conditional.attrib;%SVG.Style.attrib;%SVG.Paint.attrib;%SVG.Color.attrib;%SVG.Opacity.attrib;

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 523

%SVG.Opacity.attrib;%SVG.Graphics.attrib;%SVG.Clip.attrib;%SVG.Mask.attrib;%SVG.Filter.attrib;%SVG.GraphicalEvents.attrib;%SVG.Cursor.attrib;%SVG.External.attrib;x %Coordinate.datatype; #IMPLIEDy %Coordinate.datatype; #IMPLIEDwidth %Length.datatype; #REQUIREDheight %Length.datatype; #REQUIREDrx %Length.datatype; #IMPLIEDry %Length.datatype; #IMPLIEDtransform %TransformList.datatype; #IMPLIED>

• Circle example (with instruction for grouping and transformation)

6.5 SVG

<g style="fill-opacity:0.7;stroke:black;stroke-width:0.1cm;">

<circle cx="6cm" cy="2cm" r="100"

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 524

http://luxor-xul.sourceforge.net/

<circle cx="6cm" cy="2cm" r="100"style="fill:red;"transform="translate(0,50)"/>

<circle cx="6cm" cy="2cm" r="100"style="fill:blue;"transform="translate(70,150)"/>

<circle cx="6cm" cy="2cm" r="100"style="fill:green;"transform="translate(-70,150)"/>

</g>

• Path instruction for complex shapes, lines and areas – Element’s attributes include the attribute “d” for specifying the points of the path

– Attribute “d” contains further commands for the

6.5 SVG

– Attribute “d” contains further commands for the interpretation of the points

– E.g. a point may be the begin or the end of a curve or of a line

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 525

<path id="SN4100_einzelsignaturNadelholz"d="M 130 0 L -50 0 0 -180 50 0"fill="none" stroke-miterlimit="20"stroke-linejoin="miter"stroke-width="12" stroke="&baumgrün;"/>

• Commands of the path instruction

6.5 SVG

command description example

M (MoveTo) specifies the starting point of a path M20 50

Z (ClosePath) generates a closed shape Z

L (LineTo) draws a line from the current point to the

specified point

L50 100

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 526

specified point

H (Horizontal

LineTo)

draws a horizontal line from the current

point

H75

V (Vertical LineTo) draws a vertical line from the current point V40

C (CurveTo) draws a Bézier curve from the current

point

C30 0 50 20

60 15

Q (Quadratic

Bézier CurveTo)

draws a quadratic Bézier curve from the

current point

Q40 0 60 20

A (Elliptical Arc) draws an elliptic arc from the current point A25 25 -30 0 1

50 -25

• Path example (with quadratic Bezier curve)

6.5 SVG

<path fill="none" stroke-width="3"stroke="green"d="M 20 20 l 0 -13M 16 20 q 0 -10 -5 -10M 12 20 q 0 -6 -4 -6

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 527

M 12 20 q 0 -6 -4 -6M 24 20 q 0 -10 5 -10M 28 20 q 0 -6 4 -6"id="Pflanzensymbol"/>

• Path example (with grouping command and filled areas)

6.5 SVG

<g id="SN3338SymbolApotheke"><!-- Priority 350 --><path d="M -250.0 250.0 L -250.0 -250.0 250.0 -250.0

250.0 250.0 Z“ fill= "#FFFFFF"/>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 528

250.0 250.0 Z“ fill= "#FFFFFF"/><path d="M -200.0 145.0 L -118.0 88.0 -94.0 97.0 -94.0

72.0 -148.0 72.0 -148.0 -27.0 -94.0 -27.0 -94.0 -152.0 33.0 -200.0 161.0 -134.0161.0 80.0 200.0 115.0 132.0 200.0 62.0 150.0 62.0 72.0 0.0 72.0 0.0 150.0 -73.0 200.0 Z“ fill= "#FF0000"/>

<path d="M 0.0 -27.0 L 0.0 -119.0 62.0 -95.0 62.0 -27.0 Z"fill= "#FFFFFF"/>

</g>

• Text instruction for text placement– Beside being a graphic element, in SVG text is also available as a text element

6.5 SVG

element– Several attributes, including “x” and “y” for positioning

– Texts can be translated and turned

– Orientation, alignment, font stretch may be specified among others

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 529

[SX08]

• Text example

6.5 SVG

<defs><style type="text/css"><![CDATA[ text {font-family:verdana,sans-serif;

font-size:40px; font-weight:bold;}]]></style>

</defs>

http://svg.tutorial.aptico.de/

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 530

</defs>

<circle cx="150" cy="100" r="90“style="fill:none; stroke:black;" />

<!-- multiple values for x and y--><text class="big" x="110,135,160" y="70,110,150"> SVG</text>

<!-- usage of dx and dy--><text class="big" x="110,135,160" y="70,110,150“

dx="-10,-10,-10" style="fill:red;"> SVG</text>

• Grouping instruction “g” to group elements

– Attributes of grouped elements can be specified altogether, e.g. style attributes

6.5 SVG

<g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;"><circle cx="6cm" cy="2cm" r="100" style="fill:red;"

– Groups can be named

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 531

<g id="SN3338SymbolApotheke"><path d="M -250.0 250.0 L -250.0 ... Z" fill= "#FFFFFF"/><path d="M -200.0 145.0 L -118.0 ... Z" fill= "#FF0000"/><path d="M 0.0 -27.0 L 0.0 ... Z" fill= "#FFFFFF"/></g>

<circle cx="6cm" cy="2cm" r="100" style="fill:red;" transform="translate(0,50)"/>

<circle cx="6cm" cy="2cm" r="100" style="fill:blue;" transform="translate(70,150)"/>

<circle cx="6cm" cy="2cm" r="100" style="fill:green;" transform="translate(-70,150)"/></g>

– Also different elements may be grouped

6.5 SVG

<g id="SN3309SymbolParkhausParkdeck"><path d="M-250.0 310.0 L -250.0 -190.0 0.0

-310.0 250.0 -190.0 250.0 310.0 Z"fill= "#00FFFF"/>

<text font-family= "Arial" font-weight= "bold"font-size= "420" stroke= "#FFFFFF"fill= "#FFFFFF" x= "-130.0" y="150.0">

• With the "use" element aninstance of a named element(e.g. of a group) is created

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 532

fill= "#FFFFFF" x= "-130.0" y="150.0">P

</text></g>

<use transform="translate(135463.0,173871.7)"xlink:href="#SN3309SymbolParkhausParkdeck"/>

• SVG can be combined with the language Cascading Style Sheets (CSS)

• CSS is a declarative "style sheet language" for structured documents– Known essentially from the html environment

6.5 SVG

– Known essentially from the html environment

– Despite the similarity of their names “Extensible Stylesheet Language for Transformation” (XSLT) and “Cascading Style Sheets” (CSS) are quite different

• XSLT is a XML based language for transforming XML documents into (XML) documents

• CSS is a non XML based language for specifying format instructions for document browsers

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 533

• A CSS style sheet consists of rules with the following structure– Selector {property: value; ... property: value;}

– Selector specifies an element; values are assigned to the elements properties

6.5 SVG

the elements properties

– Selection criteria are• Properties of the elements (type, class, id, attribute values)

• Structural properties

– Selection criteria can be combined

– Usually a simple selection with element names and user defined style classes is sufficient

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 534

– With user defined style classes an element can be represented in several styles; e.g. a local road as a broader violet line and as a narrower white line

• Example for selecting with element name

6.5 SVG

text {font-family:verdana,sans-serif;

• Examples for user defined style classes

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 535

.linieNebenstrasseNahverkehrVordergrund{fill: none; stroke-width: 8.5px; stroke: snow; stroke-linejoin: round}

.linieNebenstrasseNahverkehrHintergrund{fill: none; stroke-width: 12.75px; stroke: darkmagenta;

stroke-linejoin: round}

text {font-family:verdana,sans-serif; font-size:40px; font-weight:bold;}

• Overall the structure of a typical SVG document representing a map is as follows– Prolog with XML declaration anddocument type definition

– Root element with• Declaration of name spaces

6.5 SVG

• Declaration of name spaces• Domain with

Style classesNamed elements

• Elements for the actual drawing ofthe map with usage of user definedstyle classes and user defined elements

• Style classes and named elements represent the converted signatures of the respective map series

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 536

• Example (drastically shortened)

6.5 SVG Example

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN""http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width= "42.0cm" height= "29.7cm"viewBox= "99269.744 150779.44 42000.0 29700.0"

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 537

viewBox= "99269.744 150779.44 42000.0 29700.0"xmlns:xlink= "http://www.w3.org/1999/xlink">

<defs><style type="text/css">

.SN1301FlaecheWohnenallgemein {fill: #999999;}

.SN1309FlaecheGemeinwesenallgemein {fill: #FF7F7F;}

.SN1409FlaecheAckerland {fill: #FFF7BF;}

.SN2028LinieFlurstueck {fill: none; stroke-width: 35; stroke-linecap: butt;stroke-linejoin: miter; stroke: #000000;}

...</style>

6.5 SVG Example

<g id="SN3020SymbolGrenzpunktmitAbmarkungMarke">

<circle cx="0" cy="0" r="75" fill= "#FFFFFF" stroke-width= "18"

stroke-linecap= "round" stroke-linejoin= "round" stroke= "#000000"/>

</g>

<g id="SN3309SymbolParkhausParkdeck">

<path d="M-250.0 310.0 L -250.0 -190.0 0.0 -310.0 250.0 -190.0 250.0 310.0 Z" fill= "#00FFFF"/>

<text font-family= "Arial" font-weight= "bold" font-size= "420" stroke= "#FFFFFF"

fill= "#FFFFFF" x= "-130.0" y="150.0">P</text>

<g id="SN3020SymbolGrenzpunktmitAbmarkungMarke"><circle cx="0" cy="0" r="75" fill= "#FFFFFF" stroke-width= "18"

stroke-linecap= "round" stroke-linejoin= "round" stroke= "#000000"/></g>

<g id="SN3309SymbolParkhausParkdeck"><path d="M-250.0 310.0 L -250.0 -190.0 0.0 -310.0 250.0 -190.0 250.0 310.0 Z"

fill= "#00FFFF"/><text font-family= "Arial" font-weight= "bold" font-size= "420" stroke= "#FFFFFF"

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 538

fill= "#FFFFFF" x= "-130.0" y="150.0">P</text>

</g>

<g id="SN3316SymbolKirche">

<path fill="none" stroke= "#000000" stroke-width= "70" stroke-linecap= "butt"

d="M0.0 -500.0 L 0.0 500.0"/>

<path fill="none" stroke= "#000000" stroke-width= "70" stroke-linecap= "butt"

d="M-275.0 -200.0 L 275.0 -200.0"/>

</g>

...

</defs>

fill= "#00FFFF"/><text font-family= "Arial" font-weight= "bold" font-size= "420" stroke= "#FFFFFF"

fill= "#FFFFFF" x= "-130.0" y="150.0">P</text></g>

<g id="SN3316SymbolKirche"><path fill="none" stroke= "#000000" stroke-width= "70" stroke-linecap= "butt"

d="M0.0 -500.0 L 0.0 500.0"/><path fill="none" stroke= "#000000" stroke-width= "70" stroke-linecap= "butt"

d="M-275.0 -200.0 L 275.0 -200.0"/></g>...</defs>

6.5 SVG Example

<path class="SN1409FlaecheAckerland"d="M 163075.2 162043.4 193983.3 169300.5 196449.4 173480.0

201844.9 171788.3 200268.2 167276.0 196772.8 167241.7 193983.3169300.5 193983.3 169300.5 163075.2 162043.4 180931.8 156813.0198895.6 151572.3 205497.2 173730.9 190894.4 178027.0 169761.8 184244.2 161165.2 186773.1 154540.8 164531.3 163075.2 162043.4 "/>

<path class="SN1301FlaecheWohnenallgemein"d="M 123960.0 147432.9 123875.2 147163.4 122999.8 147406.8

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 539

d="M 123960.0 147432.9 123875.2 147163.4 122999.8 147406.8122680.8 146334.3 122686.9 146332.5 122616.2 146075.2 122926.8145975.6 123002.2 146237.2 123310.1 146144.1 123237.3 145886.1123471.4 145816.4 123542.1 146074.0 124228.2 145866.6 124631.9 147223.8 123960.0 147432.9 "/>

<path class="SN1301FlaecheWohnenallgemein"d="M 111499.7 163673.7 111580.0 163524.5 111707.0 163590.7

111631.4 163745.8 111905.0 163895.8 111655.2 164349.4 111873.9164464.9 111710.9 164754.3 111500.5 164630.4 111191.9 165190.8110611.5 166280.3 109119.7 165473.0 109718.5 164381.2 110533.8 164829.2 111254.6 163539.4 111499.7 163673.7 "/>

6.5 SVG Example

<text class="SN4070SchriftSchriftformatN7380" x="101771.7" y="152661.6"transform="rotate(298, 101771.7, 152661.6)" style="text-anchor:middle">7</text>

<path class="SN2028LinieFlurstueck"d="M 97500.0 134345.8 95762.3 131470.5 92887.4 126769.8 90013.4

121943.5 89040.0 120309.0 88213.4 119028.2 87314.6 117817.586282.6 116686.2 85167.5 115675.6 83887.6 114900.7 82581.0114250.4 81131.0 113720.8 79689.9 113374.2 78183.7 113099.9

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 540

114250.4 81131.0 113720.8 79689.9 113374.2 78183.7 113099.965450.8 111336.0 61192.8 110781.8 61420.6 109817.6 61513.5109503.0 78351.9 111810.4 80055.0 112168.3 81678.6 112597.783280.9 113148.8 84486.0 113778.0 86267.9 114767.4 88137.0116437.9 90324.1 120113.6 97702.1 132411.4 98275.1 133309.098637.4 133876.7 102813.9 140923.9 102996.0 141231.1 103646.0 142327.2 103810.2 142604.2 104510.2 143777.2 106326.4 146820.5106914.1 147108.1 105217.3 147925.1 105352.9 147327.1 105247.1147169.2 105188.5 146773.1 103512.5 144002.9 103400.2 144083.4102172.1 142076.9 97500.0 134345.8"/>

<text class="SN4111SchriftSchriftformatK10700" x="89451.7" y="78291.6">44/1</text>

6.5 SVG Example

<use transform="translate(44745.6,213153.9)"xlink:href="#SN3020SymbolGrenzpunktmitAbmarkungMarke"/>

<use transform="translate(42021.4,192419.5)"xlink:href="#SN3020SymbolGrenzpunktmitAbmarkungMarke"/>

...

</svg>

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 541

</svg>

• Standards

– International Organization for Standardization (ISO)

– ISO/TC 211 Geographic information/Geomatics

– Open Geospatial Consortium (OGC)

6.6 Summary

Open Geospatial Consortium (OGC)

– Cooperation of ISO/TC 211 with OGC

– Working Committee of the Surveying Authorities of the States of the Federal Republic of Germany (AdV)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 542

• XML– Standard for exchanging data on the web

– Elements, attributes, entities

– Name spaces, XPath, XPointer, Xlink

– XML Schema

6.6 Summary

– XML Schema

– Data types, elements

• GML– Abstract feature type

– Definition of an own feature type

– AFIS ALKIS ATKIS schema of the AdV

– Web Feature Service

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 543

• XSLT– Templates– Instructions within templates– Example for applying XSLT (transformation of extracts of the DLM25)

• SVG

6.6 Summary

• SVG– Rectangle– Circle – Path– Text– Grouping – CSS– Example "SVG map"

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 544

6.6 Summary

GIS

objects

collect

manageanalyse

display

SVG

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig 545

objects

thematicgeometry

vector XSLT

SVG

GML

XML