SlideShare ist ein Scribd-Unternehmen logo
1 von 75
Scalable Vector Graphics  -  SVG Prof. Dr.-Ing. Franz-Josef Behr Tim Berners-Lee cited by Opera, http://www.opera.com/features/svg/index.dml
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],Introduction Document Geoemtry Résumée Examples
Context SVG  XLink XSL Client-Side- Technologies Internet-Mapping / GIS CIV Data exchange formats GML WMS / WFS Server-Side- Technologies Data base systems Java Internet Technology CSS DOM Dokument Geoemtrie Résumée Examples Introduction
Delivering SVG Documents in the Internet Internet http Webserver http CGI protocol Document root Static SVG Documents Server side Programs Dynamic Generation of SVG documents Introduction Dokument Geoemtrie Résumée Examples Client "User Agent" SVG Viewer
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],Dokument Geoemtrie Résumée Examples Introduction
The famous Vienna Example http://www.karto.ethz.ch/neumann/cartography/vienna/ Dokument Geoemtrie Résumée Examples Introduction
Campus Singapore Polytechnic (Master Thesis 2004)
Campus Dresden University http://www.carto.net/papers/svg/campus_dresden/ Einleitung Dokument Geoemtrie Résumée Beispiele Introduction
Tuerlersee: Interactivity http://www.carto.net/papers/svg/tuerlersee/ Einleitung Dokument Geoemtrie Résumée Beispiele
Hill shading Einleitung Dokument Geoemtrie Résumée Beispiele http://www.carto.net/papers/svg/tuerlersee/
Tuerlersee: Height profile Einleitung Dokument Geoemtrie Résumée Beispiele http://www.carto.net/papers/svg/tuerlersee/
Dynamic   process  of  the  Gruben glacier,  Switzerland http://www.carto.net/papers/svg/gruben_glacier/ Introduction Dokument Geoemtrie Résumée Beispiele
Mouse over-Effects ,[object Object],http://www.gis-news.de/svg/samples/bio/bio.htm Introduction Dokument Geoemtrie Résumée Examples
Integration of Raster data ,[object Object],[object Object],Zoom in 4x Introduction Document Geoemtry Résumée Examples
SVG-Document Structure ,[object Object],[object Object],[object Object],[object Object],Document Geoemtrie Résumée Introduction  Beispiele Examples
Coordinate systems in SVG, Canvas and Viewport +x +y Canvas View- port Dokument Geoemtry Résumée Introduction  Beispiele Examples
SVG-Fragment as part of a XML document <?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?> <parent xmlns=&quot;http://example.org&quot; xmlns:svg=&quot;http://www.w3.org/2000/svg&quot;> <!-- parent contents here --> <svg:svg width=&quot;4cm&quot; height=&quot;8cm&quot;> <svg:ellipse cx=&quot;2cm&quot; cy=&quot;4cm&quot; rx=&quot;2cm&quot; ry=&quot;1cm&quot; /> </svg:svg> <!-- ... --> </parent> Source:  http://www.w3.org/TR/SVG11/struct.html#NewDocumentOverview Document Geoemtry Résumée Introduction  Beispiele Examples
Implementation of your own SVG map Geoemtry Résumée Introduction  Beispiele Examples Document <?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;  &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;> <svg id=&quot;map&quot; width=&quot;600px&quot; height=&quot;400px&quot;  viewBox=&quot;0 0 240 160&quot; preserveAspectRatio=&quot;xMidYMid meet&quot;> ... </svg>
Create a  SVG-Document I ,[object Object],[object Object],<?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?> ,[object Object],<!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;  http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd > <svg id=&quot;map&quot; width=&quot;600px&quot; height=&quot;400px&quot; viewBox=&quot;0cm 0cm 240cm 160cm&quot; preserveAspectRatio=&quot;xMidYMid meet&quot;> </svg> ,[object Object],Document Geoemtry Résumée Introduction  Beispiele Examples
Create a  SVG-Document II ,[object Object],<svg ...> <title>Map Example</title> <desc> Map which shows use of different SVG-elements and functionalitites. </desc> ,[object Object],[object Object],Document Geoemtry Résumée Introduction  Beispiele Examples
<title>, <desc> ,[object Object],[object Object],[object Object],[object Object],http://www.w3.org/TR/SVG11/struct.html#DescriptionAndTitleElements Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... <?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;    &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;> <svg id=&quot;map&quot; width=&quot;600px&quot; height=&quot;400px&quot; viewBox=&quot;0 0 240 160&quot; preserveAspectRatio=&quot;xMidYMid meet&quot;> <title>Map Example</title> <desc>   Map which shows use of different SVG-elements and functionalitites. </desc> </svg> Insert 2 Document Geoemtry Résumée Introduction  Beispiele Examples
Stylesheets ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Introduction  Document Geoemtry Résumée Beispiele Examples Insert 1c The styling will be applied  later   on after inserting a text element.
SVG DTD <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;   &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;> System Identifier f o r SVG 1.1 Public Identifier for SVG 1.1: Name of the DTD Dovument Geoemtry Résumée Introduction  Beispiele Examples
Entities ,[object Object],[object Object],[object Object],<!ENTITY mapTitle &quot;SVG Map&quot;> < text x=&quot;15&quot; y=&quot;135 &quot;>&mapTitle; </text> Document Geoemtry Résumée The entity maptitle is defined. Introduction  Beispiele Examples
Our Example... <?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot;    &quot; http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd &quot; [   <!ENTITY mapTitle &quot;SVG Map&quot;>   <!ENTITY animDuration &quot;10s&quot;> ]> Document Geoemtry Résumée Introduction  Beispiele Examples
Geometrical Shapes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Document Geoemtry Résumée Introduction  Beispiele Examples
Geometri cal E lement s ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Document Geoemtry Résumée Introduction  Beispiele Examples
Rectangle <rect x=&quot;10&quot; y=&quot;20&quot; width=&quot;150&quot; height=&quot;120&quot;/> <rect  ...   fill=&quot;#eeeeff&quot; stroke=&quot;red&quot; stroke-width=&quot;1&quot; /> Coordinates left upper corner width height Fill color Border color Line width of border Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... ... <desc>   Map which shows use of different SVG-elements and functionalitites. </desc> <rect x=&quot;10&quot; y=&quot;20&quot; width=&quot;150&quot; height=&quot;120&quot; fill=&quot;#eeeeff&quot; stroke=&quot;red&quot; stroke-width=&quot;1&quot;/> </svg> Document Geoemtry Résumée Introduction  Beispiele Examples
Rounded rect ,[object Object],<svg width=&quot;440&quot; height=&quot;300&quot;> <rect x=&quot;10&quot; y=&quot;10&quot; width=&quot;60&quot; height=&quot;30&quot; rx=&quot;20&quot; ry=&quot;50&quot; style=&quot;stroke:blue;fill:none&quot;/> </svg> Document Geoemtry Résumée Introduction  Beispiele Examples
Polyline ,[object Object],<polyline fill=&quot;none&quot; stroke=&quot;blue&quot; stroke-width=&quot;10&quot;  points=&quot;50,375 150,375 150,325 250,325 250,375 ... 950,375 950,25 1050,25 1050,375 1150,375&quot; />
polygon ,[object Object],<polygon points=&quot;223.5,123.034 276,213.966 171,213.966&quot; style=&quot;fill:rgb(126,14,83); stroke:rgb(0,0,128); stroke-width:1&quot;/>
Line <line x1=&quot;10&quot; y1=&quot;120&quot; x2=&quot;50&quot; y2=&quot;80&quot;/> Coordinates starting point Coordinates end point Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... ,[object Object],<g id=&quot;streets&quot; stroke=&quot;yellow&quot; stroke-width=&quot;0.9&quot;> <line x1=&quot;10&quot; y1=&quot;120&quot; x2=&quot;50&quot; y2=&quot;80&quot;/>   <line x1=&quot;50&quot; y1=&quot;80&quot;  x2=&quot;150&quot; y2=&quot;80&quot;/>   <line x1=&quot;60&quot;  y1=&quot;40&quot;  x2=&quot;60&quot; y2=&quot;80&quot;/>   <line x1=&quot;100&quot; y1=&quot;40&quot;  x2=&quot;100&quot; y2=&quot;80&quot;/>   <line x1=&quot;140&quot; y1=&quot;40&quot;  x2=&quot;140&quot; y2=&quot;80&quot;/> <line x1=&quot;80&quot; y1=&quot;80&quot;  x2=&quot;80&quot; y2=&quot;130&quot;/>   <line x1=&quot;135&quot; y1=&quot;80&quot;  x2=&quot;135&quot; y2=&quot;130&quot;/>   <line x1=&quot;40&quot; y1=&quot;90&quot;  x2=&quot;20&quot; y2=&quot;70&quot;/> </g> Document Geoemtry Résumée Insert 3 Introduction  Beispiele Examples
Circles <circle cx=&quot;30&quot; cy=&quot;30&quot; r=&quot;3&quot;/> Coordinates center point Radius Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... ,[object Object],<g id=&quot;trees&quot; stroke=&quot;#009900&quot; fill=&quot;#99FF99&quot; stroke-width=&quot;0.4&quot;> <circle cx=&quot;30&quot; cy=&quot;30&quot; r=&quot;3&quot;/>   <circle cx=&quot;40&quot; cy=&quot;30&quot; r=&quot;3&quot;/>   <circle cx=&quot;50&quot; cy=&quot;30&quot; r=&quot;3&quot;/>   <circle cx=&quot;60&quot; cy=&quot;30&quot; r=&quot;3&quot;/>   <circle cx=&quot;70&quot; cy=&quot;30&quot; r=&quot;3&quot;/>   <circle cx=&quot;80&quot; cy=&quot;30&quot; r=&quot;3&quot;/> </g> Document Geoemtry Résumée Introduction  Beispiele Examples
Path ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<path d=&quot;M 120 , 130L 130 , 120L 130 , 110 125 , 105 115 , 100 110 , 115 110 , 125   z&quot;/> Document Geoemtry Résumée Introduction  Beispiele Examples
[object Object],[object Object],[object Object],[object Object]
Our Example... ,[object Object],Dokument Geoemtry Résumée <circle cx=&quot;80&quot; cy=&quot;30&quot; r=&quot;3&quot;/> </g> <path d=&quot;M 120 , 130L 130 , 120L 130 , 110 125 , 105 115 , 100 110 , 115 110 , 125   z&quot;/> </svg> Introduction  Beispiele Examples Insert 5
Text elements <text x=&quot;15&quot; y=&quot;135&quot; >AbcDef </text> <text  ...  style=&quot;font-family:Arial;font-size:6 >... </text> Position Content Font size Document Geoemtry Résumée End-Tag Start-Tag Introduction  Beispiele Examples Style property
Text:  Additional possibilities ,[object Object],[object Object],[object Object],[object Object],Dokument Geoemtrie Résumée Introduction  Beispiele Examples
Text on Paths: ,[object Object],[object Object],Source: http://www.dbxgeomatics.com/SVGMapMakerSamples.asp?Language= Document Geoemtry Résumée Introduction  Beispiele Examples
text element: Our Example... ,[object Object],... <text x=&quot;15&quot; y=&quot;135&quot; style=&quot;font-family:Arial;font-size:6&quot;>&mapTitle;</text> </svg> Insert  6 Document Geoemtry Résumée Introduction  Beispiele Examples
Definitions: The <defs> element ,[object Object],[object Object],[object Object],[object Object],<defs>   <rect id=&quot;house&quot; width=&quot;5&quot; height=&quot;5&quot;/> </defs> Document Geoemtry Résumée Introduction  Beispiele Examples
The <use>-Element ,[object Object],[object Object],<use xlink:href=&quot;#house&quot; x=&quot;105&quot; y=&quot;50&quot; /> Document Geoemtry Résumée Introduction  Beispiele Examples Application of the xlink standard The referenced document fragment is inserted, not hyperlinked!
Our Example... ,[object Object],<svg id=&quot;map&quot; width=&quot;600px&quot; height=&quot;400px&quot; viewBox=&quot;0cm 0cm 240cm 160cm&quot; preserveAspectRatio=&quot;xMidYMid meet&quot;> <title>Map Example</title> <desc>   Rectangle with red border and light blue interior,   with gray shadow rectangle. </desc> <defs>   <rect id=&quot;house&quot; width=&quot;5&quot; height=&quot;5&quot;/> </defs> <rect x=&quot;10&quot; y=&quot;20&quot; width=&quot;150&quot; height=&quot;120„   fill=&quot;#eeeeff&quot; stroke=&quot;red&quot; stroke-width=&quot;1&quot; /> Insert 7 , 1. Part Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... ,[object Object],<g id=&quot;buildings&quot; stroke=&quot;#FF5500&quot; fill=&quot;#FF9999&quot; stroke-width=&quot;0.4&quot;>   <rect x=&quot;65&quot; y=&quot;70&quot; width=&quot;5&quot; height=&quot;5&quot;/>   <rect x=&quot;65&quot; y=&quot;60&quot; width=&quot;5&quot; height=&quot;5&quot;/>   <use xlink:href=&quot;#house&quot; x=&quot;65&quot; y=&quot;50&quot; />   <!-- left side  -->   <use xlink:href=&quot;#house&quot; x=&quot;50&quot; y=&quot;50&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;50&quot; y=&quot;60&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;50&quot; y=&quot;70&quot; />   <!-- left side  -->   <use xlink:href=&quot;#house&quot; x=&quot;90&quot; y=&quot;50&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;90&quot; y=&quot;60&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;90&quot; y=&quot;70&quot; />   <!-- right side  -->   <use xlink:href=&quot;#house&quot; x=&quot;105&quot; y=&quot;50&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;105&quot; y=&quot;60&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;105&quot; y=&quot;70&quot; />   <!-- right side  -->   <use xlink:href=&quot;#house&quot; x=&quot;90&quot; y=&quot;90&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;90&quot; y=&quot;110&quot; />   <use xlink:href=&quot;#house&quot; x=&quot;105&quot; y=&quot;50&quot; /> </g> Insert 7 , 2. Part Document Geoemtrie Résumée Introduction  Beispiele Examples
Transformations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... ,[object Object],<!-- bottom left road, left side  -->   <g transform=&quot;translate(65,90)&quot;>   <use xlink:href=&quot;#house&quot; x=&quot;0&quot; y=&quot;0„   transform=&quot;scale(1.5)&quot;/> </g> Insert 8 Document Geoemtry Résumée ,[object Object],Introduction  Beispiele Examples
Result Document Geoemtry Résumée Introduction  Beispiele Examples
Hyperlinks ,[object Object],[object Object],<a xlink:href=&quot;http://www.fewo-wuerzburg.de/&quot;> ...  </a> Name spcae xlink ‘ a‘-Element href-Attribut URL Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... <a xlink:href=&quot;http://www.fewo-wuerzburg.de/&quot;>   <g transform=&quot;translate(65,110)&quot;>   <use xlink:href=&quot;#house&quot; x=&quot;0&quot; y=&quot;0&quot; transform=&quot;scale(1.5)&quot;/>   </g> </a> Insert 9 Introduction Document Geoemtry Résumée Examples
Filter Introduction Document Geoemtry Résumée Examples
Filter effects Introduction Document Geoemtry Résumée Examples
Our Example... <defs> <rect id=&quot;house&quot; width=&quot;5&quot; height=&quot;5&quot;/> <filter id=&quot;schatten&quot;>   <feGaussianBlur stdDeviation=&quot;5&quot;  /> </filter> … <rect x=&quot;10&quot; y=&quot;20&quot; width=&quot;150&quot; height=&quot;120„   transform=&quot;translate(3, 3)„   style=&quot;filter:url(#schatten);    fill='#999999' stroke='#999999‚   stroke-width='1'„  /> Insert 10 Introduction Document Geoemtry Résumée Examples
Result Introduction Document Geoemtry Résumée Examples
Gradients ,[object Object],[object Object],[object Object],[object Object],Introduction Document Geoemtry Résumée Examples
Our Example... ,[object Object],Insert 11 Introduction Document Geoemtry Résumée Examples <radialGradient id=&quot;radial&quot; cx=&quot;50%&quot; cy=&quot;90%&quot;    r=&quot;60%&quot; fx=&quot;60%&quot; fy=&quot;80%&quot;>   <stop offset=&quot;0%&quot; style=&quot;stop-color:rgb(0,15,150);stop-opacity:1&quot;/>   <stop offset=&quot;1%&quot; style=&quot;stop-color:rgb(128,128,255);stop-opacity:1&quot;/>   <stop offset=&quot;50%&quot; style=&quot;stop-color:rgb(0,0,255);stop-opacity:1&quot;/> </radialGradient> ,[object Object],<g id=&quot;lake&quot; stroke=&quot;#0000FF&quot; fill=&quot;url(#radial)&quot; stroke-width=&quot;0.4&quot;> <path d=&quot;M 120 130L 130 120L 130 110 125 105 115 100 110 115 110 125z&quot;/> </g>
Result Document Geoemtry Résumée Introduction  Beispiele Examples
Animation ,[object Object],[object Object],Document Geoemtry Résumée Introduction  Beispiele Examples
Our Example... ,[object Object],[object Object],Insert 12 Docment Geoemtry Résumée Introduction  Beispiele Examples <symbol id=&quot;car&quot; overflow=&quot;visible&quot;>   <rect x=&quot;-1&quot; y=&quot;-1&quot; width=&quot;4&quot; height=&quot;2&quot;    style=&quot;fill: rgb(240,65,25); fill-opacity: 0.8; stroke: rgb(55,0,0);    stroke-width:0.1&quot; />   </symbol>  <path id=&quot;carpath&quot; d=&quot;M 10 120 50 80  150 80&quot; /> <g id=&quot;AnimationPaths&quot;>   <use xlink:href=&quot;#car&quot;>    <animateMotion id=&quot;animMotionCar&quot;   dur=&quot;10s;&quot;   repeatCount=&quot;indefinite&quot; rotate=&quot;auto-reverse&quot;>   <mpath xlink:href=&quot;#carpath&quot;/>   </animateMotion>   </use>  </g>
Result Document Geoemtry Résumée Introduction  Beispiele Examples
Exercise ,[object Object]
SVG in HTML ,[object Object],[object Object],[object Object],   http:// www.carto.net/papers/svg/samples/svg_html.shtml Document Geoemtry Résumée Introduction  Beispiele Examples
Switching Layer (groups) on and off <script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;> var svgmap;   //global variable function initializeMap() {  svgmap = document.main_map.getSVGDocument();   } function layerOnOff (checkbox,layer_name) {   var svg_layer;   svg_layer = svgmap.getElementById(layer_name);   if (checkbox.checked)   {   svg_layer.setAttribute(&quot;visibility&quot;, &quot;visible&quot;);   //Show layer.   }   else   { svg_layer.setAttribute(&quot;visibility&quot;, &quot;hidden&quot;);   //Hide layer.   } }</script> Dokcment Geoemtry Résumée Accessing the DOM Introduction Examples
Our Example... ,[object Object],<embed name=&quot;main_map&quot; width=&quot;800&quot; height=&quot;400&quot; src=&quot;mapexample.svg&quot; type=&quot;image/svg+xml&quot; pluginspage=&quot;http://www.adobe.com/svg/viewer/install/&quot;> <form name=&quot;onoff&quot;>   <input type=checkbox checked value=&quot;true&quot; onClick=   &quot;layerOnOff(this,'buildings');&quot; >Layer Buildings   <input type=checkbox checked value=&quot;true&quot; onClick=   &quot;layerOnOff(this,'streets');&quot; >Layer Streets </form> Einleitung Document Geoemtry Résumée Introduction Examples
Result Einleitung Document Geoemtry Résumée Beispiele Introduction Examples
Résumée ,[object Object],[object Object],[object Object],[object Object],[object Object],Einleitung Document Geoemtry Résumée Examples Introduction
SVG ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Einleitung Document Geoemtry Résumée Beispiele
GI-Systems and SVG ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Links ,[object Object],[object Object],[object Object],[object Object],[object Object],for students interest in games:   http:// www.battlebots.com / Einleitung Dokument Geoemtrie Résumée Beispiele
Mailinglisten ,[object Object],[object Object]
Tools ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SVG ,[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Andere mochten auch (11)

Oh my god 驚人意外
Oh my god 驚人意外Oh my god 驚人意外
Oh my god 驚人意外
 
COB_20090220_1
COB_20090220_1COB_20090220_1
COB_20090220_1
 
The Alison Group presents...
The Alison Group presents...The Alison Group presents...
The Alison Group presents...
 
Lasway Cb Dof Dmpa(Jan28 09)
Lasway Cb Dof Dmpa(Jan28 09)Lasway Cb Dof Dmpa(Jan28 09)
Lasway Cb Dof Dmpa(Jan28 09)
 
06.第三天.晨遊蘇蓮多.阿瑪菲海岸公路.拿坡里
06.第三天.晨遊蘇蓮多.阿瑪菲海岸公路.拿坡里06.第三天.晨遊蘇蓮多.阿瑪菲海岸公路.拿坡里
06.第三天.晨遊蘇蓮多.阿瑪菲海岸公路.拿坡里
 
Evaluation question 3
Evaluation question 3Evaluation question 3
Evaluation question 3
 
04.第一天.啟程.名古屋機場.休閒農場.山代溫泉區
04.第一天.啟程.名古屋機場.休閒農場.山代溫泉區04.第一天.啟程.名古屋機場.休閒農場.山代溫泉區
04.第一天.啟程.名古屋機場.休閒農場.山代溫泉區
 
Pediatrics
PediatricsPediatrics
Pediatrics
 
Bo(Frank)_Li_Resume
Bo(Frank)_Li_ResumeBo(Frank)_Li_Resume
Bo(Frank)_Li_Resume
 
Generalidades DE la web 2
Generalidades DE la web 2Generalidades DE la web 2
Generalidades DE la web 2
 
Herramientas busqueda de empleo
Herramientas busqueda de empleoHerramientas busqueda de empleo
Herramientas busqueda de empleo
 

Mehr von Franz-Josef Behr

Mehr von Franz-Josef Behr (6)

Interoperable provision of geodata and services according to the INSPIRE Dire...
Interoperable provision of geodata and services according to the INSPIRE Dire...Interoperable provision of geodata and services according to the INSPIRE Dire...
Interoperable provision of geodata and services according to the INSPIRE Dire...
 
Some Observations on Common Patterns in Information Technology
Some Observations on Common Patterns in Information TechnologySome Observations on Common Patterns in Information Technology
Some Observations on Common Patterns in Information Technology
 
Geodata for Humanitarian Affairs in UN Organisations
Geodata for Humanitarian Affairs in UN OrganisationsGeodata for Humanitarian Affairs in UN Organisations
Geodata for Humanitarian Affairs in UN Organisations
 
Verteilte GI-Systeme
Verteilte GI-SystemeVerteilte GI-Systeme
Verteilte GI-Systeme
 
Open Source as a an attitude and the approach of OSGeo
Open Source as a an attitude and the approach of OSGeoOpen Source as a an attitude and the approach of OSGeo
Open Source as a an attitude and the approach of OSGeo
 
Technical, social and organisational Interoperability
Technical, social and organisational InteroperabilityTechnical, social and organisational Interoperability
Technical, social and organisational Interoperability
 

Scalable Vector Graphics

  • 1. Scalable Vector Graphics - SVG Prof. Dr.-Ing. Franz-Josef Behr Tim Berners-Lee cited by Opera, http://www.opera.com/features/svg/index.dml
  • 2.
  • 3. Context SVG XLink XSL Client-Side- Technologies Internet-Mapping / GIS CIV Data exchange formats GML WMS / WFS Server-Side- Technologies Data base systems Java Internet Technology CSS DOM Dokument Geoemtrie Résumée Examples Introduction
  • 4. Delivering SVG Documents in the Internet Internet http Webserver http CGI protocol Document root Static SVG Documents Server side Programs Dynamic Generation of SVG documents Introduction Dokument Geoemtrie Résumée Examples Client &quot;User Agent&quot; SVG Viewer
  • 5.
  • 6. The famous Vienna Example http://www.karto.ethz.ch/neumann/cartography/vienna/ Dokument Geoemtrie Résumée Examples Introduction
  • 7. Campus Singapore Polytechnic (Master Thesis 2004)
  • 8. Campus Dresden University http://www.carto.net/papers/svg/campus_dresden/ Einleitung Dokument Geoemtrie Résumée Beispiele Introduction
  • 9. Tuerlersee: Interactivity http://www.carto.net/papers/svg/tuerlersee/ Einleitung Dokument Geoemtrie Résumée Beispiele
  • 10. Hill shading Einleitung Dokument Geoemtrie Résumée Beispiele http://www.carto.net/papers/svg/tuerlersee/
  • 11. Tuerlersee: Height profile Einleitung Dokument Geoemtrie Résumée Beispiele http://www.carto.net/papers/svg/tuerlersee/
  • 12. Dynamic process of the Gruben glacier, Switzerland http://www.carto.net/papers/svg/gruben_glacier/ Introduction Dokument Geoemtrie Résumée Beispiele
  • 13.
  • 14.
  • 15.
  • 16. Coordinate systems in SVG, Canvas and Viewport +x +y Canvas View- port Dokument Geoemtry Résumée Introduction Beispiele Examples
  • 17. SVG-Fragment as part of a XML document <?xml version=&quot;1.0&quot; standalone=&quot;yes&quot;?> <parent xmlns=&quot;http://example.org&quot; xmlns:svg=&quot;http://www.w3.org/2000/svg&quot;> <!-- parent contents here --> <svg:svg width=&quot;4cm&quot; height=&quot;8cm&quot;> <svg:ellipse cx=&quot;2cm&quot; cy=&quot;4cm&quot; rx=&quot;2cm&quot; ry=&quot;1cm&quot; /> </svg:svg> <!-- ... --> </parent> Source: http://www.w3.org/TR/SVG11/struct.html#NewDocumentOverview Document Geoemtry Résumée Introduction Beispiele Examples
  • 18. Implementation of your own SVG map Geoemtry Résumée Introduction Beispiele Examples Document <?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot; &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;> <svg id=&quot;map&quot; width=&quot;600px&quot; height=&quot;400px&quot; viewBox=&quot;0 0 240 160&quot; preserveAspectRatio=&quot;xMidYMid meet&quot;> ... </svg>
  • 19.
  • 20.
  • 21.
  • 22. Our Example... <?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot; &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;> <svg id=&quot;map&quot; width=&quot;600px&quot; height=&quot;400px&quot; viewBox=&quot;0 0 240 160&quot; preserveAspectRatio=&quot;xMidYMid meet&quot;> <title>Map Example</title> <desc> Map which shows use of different SVG-elements and functionalitites. </desc> </svg> Insert 2 Document Geoemtry Résumée Introduction Beispiele Examples
  • 23.
  • 24. SVG DTD <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot; &quot;http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd&quot;> System Identifier f o r SVG 1.1 Public Identifier for SVG 1.1: Name of the DTD Dovument Geoemtry Résumée Introduction Beispiele Examples
  • 25.
  • 26. Our Example... <?xml version=&quot;1.0&quot; standalone=&quot;no&quot;?> <!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot; &quot; http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd &quot; [ <!ENTITY mapTitle &quot;SVG Map&quot;> <!ENTITY animDuration &quot;10s&quot;> ]> Document Geoemtry Résumée Introduction Beispiele Examples
  • 27.
  • 28.
  • 29. Rectangle <rect x=&quot;10&quot; y=&quot;20&quot; width=&quot;150&quot; height=&quot;120&quot;/> <rect ... fill=&quot;#eeeeff&quot; stroke=&quot;red&quot; stroke-width=&quot;1&quot; /> Coordinates left upper corner width height Fill color Border color Line width of border Document Geoemtry Résumée Introduction Beispiele Examples
  • 30. Our Example... ... <desc> Map which shows use of different SVG-elements and functionalitites. </desc> <rect x=&quot;10&quot; y=&quot;20&quot; width=&quot;150&quot; height=&quot;120&quot; fill=&quot;#eeeeff&quot; stroke=&quot;red&quot; stroke-width=&quot;1&quot;/> </svg> Document Geoemtry Résumée Introduction Beispiele Examples
  • 31.
  • 32.
  • 33.
  • 34. Line <line x1=&quot;10&quot; y1=&quot;120&quot; x2=&quot;50&quot; y2=&quot;80&quot;/> Coordinates starting point Coordinates end point Document Geoemtry Résumée Introduction Beispiele Examples
  • 35.
  • 36. Circles <circle cx=&quot;30&quot; cy=&quot;30&quot; r=&quot;3&quot;/> Coordinates center point Radius Document Geoemtry Résumée Introduction Beispiele Examples
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Text elements <text x=&quot;15&quot; y=&quot;135&quot; >AbcDef </text> <text ... style=&quot;font-family:Arial;font-size:6 >... </text> Position Content Font size Document Geoemtry Résumée End-Tag Start-Tag Introduction Beispiele Examples Style property
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. Result Document Geoemtry Résumée Introduction Beispiele Examples
  • 52.
  • 53. Our Example... <a xlink:href=&quot;http://www.fewo-wuerzburg.de/&quot;> <g transform=&quot;translate(65,110)&quot;> <use xlink:href=&quot;#house&quot; x=&quot;0&quot; y=&quot;0&quot; transform=&quot;scale(1.5)&quot;/> </g> </a> Insert 9 Introduction Document Geoemtry Résumée Examples
  • 54. Filter Introduction Document Geoemtry Résumée Examples
  • 55. Filter effects Introduction Document Geoemtry Résumée Examples
  • 56. Our Example... <defs> <rect id=&quot;house&quot; width=&quot;5&quot; height=&quot;5&quot;/> <filter id=&quot;schatten&quot;> <feGaussianBlur stdDeviation=&quot;5&quot; /> </filter> … <rect x=&quot;10&quot; y=&quot;20&quot; width=&quot;150&quot; height=&quot;120„ transform=&quot;translate(3, 3)„ style=&quot;filter:url(#schatten); fill='#999999' stroke='#999999‚ stroke-width='1'„ /> Insert 10 Introduction Document Geoemtry Résumée Examples
  • 57. Result Introduction Document Geoemtry Résumée Examples
  • 58.
  • 59.
  • 60. Result Document Geoemtry Résumée Introduction Beispiele Examples
  • 61.
  • 62.
  • 63. Result Document Geoemtry Résumée Introduction Beispiele Examples
  • 64.
  • 65.
  • 66. Switching Layer (groups) on and off <script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;> var svgmap; //global variable function initializeMap() { svgmap = document.main_map.getSVGDocument(); } function layerOnOff (checkbox,layer_name) { var svg_layer; svg_layer = svgmap.getElementById(layer_name); if (checkbox.checked) { svg_layer.setAttribute(&quot;visibility&quot;, &quot;visible&quot;); //Show layer. } else { svg_layer.setAttribute(&quot;visibility&quot;, &quot;hidden&quot;); //Hide layer. } }</script> Dokcment Geoemtry Résumée Accessing the DOM Introduction Examples
  • 67.
  • 68. Result Einleitung Document Geoemtry Résumée Beispiele Introduction Examples
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.