OpenLayers: Data Integration in an Open Source Map ... - GIS-News

bookmarkalikeInternet and Web Development

Dec 14, 2013 (3 years and 9 months ago)

414 views

Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
1
OpenLayers: Data Integration in an
OpenLayers: Data Integration in an
Open Source Map Browser
Open Source Map Browser
Prof. Dr. Franz-Josef Behr
Stuttgart University of AppliedSciences
Hochschule für Technik, Stuttgart
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
2
FOSS4G 2008, Cape Town, South
FOSS4G 2008, Cape Town, South
Africa
Africa
OpenLayers + Ext JS (BOF Session)
OpenLayers + Ext JS (BOF Session)
WebServicesapplication with Djangoand OpenLayers
WebServicesapplication with Djangoand OpenLayers
Sensor Observation Service from UMN MapServermeets OpenLayer
Sensor Observation Service from UMN MapServermeets OpenLayer
PostgreSQL/PostGIS, Geoserver& OpenLayers at ElectricitéDe France
PostgreSQL/PostGIS, Geoserver& OpenLayers at ElectricitéDe France
The Open-Geo Stack: OpenLayers, GeoServer, PostGIS
The Open-Geo Stack: OpenLayers, GeoServer, PostGIS
OpenLayers -Building Web Mapping Applications with a Solid Foundation
OpenLayers -Building Web Mapping Applications with a Solid Foundation
OpenLayers Vector Style
OpenLayers Vector Style
OpenLayers Code Sprint
OpenLayers Code Sprint
The use of OpenLayers for the demonstration and visualisationof
environmental research applications
The use of OpenLayers for the demonstration and visualisationof
environmental research applications
Ride the lightning -Mapping
lightningswith geotoolsand
openlayers
Ride the lightning -Mapping
lightningswith geotoolsand
openlayers
Building an application framework based on OpenLayers and ExtJS
Building an application framework based on OpenLayers and ExtJS
Source: Christopher Schmidt Date: Thu, 18 Sep 2008 11:43:35 -0400 To: crinolium
<wengerter@gmail.com>
36 presentations that mention OpenLayers
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
3
[Free]
[Free]
Map
Map
Browsers
Browsers
•MapGuideOpen Source, https://mapguide.osgeo.org/
•OpenLayer, http://www.openlayers.org/
•FlashEarth, http://www.flashearth.com/
•ka-Map, http://ka-map.maptools.org/
•WorldKit, http://worldkit.org/
•Google Maps, http://www.google.com/apis/maps/
•Yahoo! Maps API, http://developer.yahoo.com/maps/
•Microsoft Live Local, http://local.live.com/
•deegreeiGeoPortal, http://www.lat-lon.de
–WMS, WFS, WCS, Catalogue Service, GazetteerService
•MappingWidgets, http://mappingwidgets.sourceforge.net/
–WMS, zoom in, zoom out, pan, info, overview
•Chameleon, http://chameleon.maptools.org/
•p.mapper, http://www.pmapper.net/
–basedon UMN MapServer
/PHP/MapScript, zoom/pan, query, etc.
•WMS Mapper, http://wms-map.sourceforge.net/
: WMS, zoom
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
4
OpenLayers API
OpenLayers API
•Feature Overview, history, components
•Code example
•Software developmentfeatures
•Typesand integrationof datalayers
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
5
What is OpenLayers?
What is OpenLayers?
•an API for building web map applications
•pure client-side object-orientedJavaScript, usingcomponentsfrom
Prototype.js
and theRico
library
•AJAX (Asynchronous JavaScript and XML)
•supports open and proprietary data standards / sources
•efficient tiling
•BSD licensed (standard licence for open source software, see
http://svn.openlayers.org/trunk/openlayers/release-license.txt)
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
6
History of the Project
History of the Project
•Started after Where 2.0 conference in 2005
•Motivated by MetaCarta's business needs
•released before Where 2.0 conference in 2006
•already used by > 10,000 people
•a project of the Open Source Geospatial Foundation.
•currently version 2.7
…aims to become "the Apache of web mapping APIs"
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
7
Components of OpenLayers
Components of OpenLayers
just a prototype!
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
8
Simple
Simple
Map
Map
IncludingAPI
Creatingmap
object
Addinglayer
Placeholder
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
9
Versioning
Versioning
and
and
tracking
tracking
•Code and content: in the OpenLayers Subversion
(SVN) repository, http://svn.openlayers.org/
•enabling worldwide development
•Project management using trac
–tracking system for bugs, feature requests,
version management etc (“tickets“)
–interface to Subversion
–allows wiki-like markup in descriptions and
messages, creating links and seamless
references between bugs, tasks,filesand wiki
pages.
–timeline gives historic view of the project,
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
10
OpenLayers Subversion System
OpenLayers Subversion System
•a versioncontrolsystem
(successorof CVS)
•trunk: currentversionof
project
•branches: copiesof original
source
•tags: copieswithout
modifications
•sandbox: „playground“ for
singledevelopers
http://en.wikipedia.org/wiki/Subversion_%28software%29
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
11
Tracking system
Tracking system
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
12
Groups
Groups
involved
involved
•Users
•Mailinglistsparticipants
•Registereddevelopers(contributors)
•Project SteeringCommittee(7 members,
http://trac.openlayers.org/wiki/SteeringCommitteeMembers)
•Committee Chair
–facilitates discussion of proposals, responsible for memberships
of the Project Steering Committee.
–adjudication in cases of disputes about voting.
•Democratic process: Addition and removal of members from the
committee, as well as selection of a Chair should be handled as a
proposal to the committee.
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
13
Development
Development
Process
Process
Clear and sound development rules:
1.Proposals ￿OpenLayers dev mailing list ￿discussion and voting, for at
least two business days.
2.Voting:
1."+1“: indicating support for the proposal and a willingness to
support implementation.
2."-1“: to veto a proposal, but must provide clear reasoning and
alternate approaches to resolving the problem
3.“-0”: indicates mild disagreement, but no effect; “0”: no opinion,
“+0”: mild support, but no effect.
3.Members of the Project Steering Committee's votes will be counted.
4.Acceptance: +2 (including the proposer), no vetos(-1).
5.Veto ￿can be resubmitted for an override vote.
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
14
Testing
Testing
Methodology
Methodology
•Test.AnotherWay-
Framework
•morethan2100
automatedtests(http://openlayers.org/blog/20
07/08/23/automated-testing/)
http://openlayers.org/dev/tests/run-tests.html
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
15
Classes
Classes
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
16
API
API
documentation
documentation
:
:
OpenLayers.Map
OpenLayers.Map
Source: http://dev.openlayers.org/apidocs/files/OpenLayers-js.html
[2007-09-07]
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
17
Architecture
Architecture
Internet
http
Webserver (Proxy)
http
OpenLayers
Client
Localfiles
SQL
Geo-DBMS
http
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
18
OpenLayers Maps consist of Layers
OpenLayers Maps consist of Layers
•OGC WFS
•GeoRSS
•CSV
•GML
•KML
•WKT
•OGC WMS
•Google Maps
•MSN Live Local
•Yahoo! Maps
•Multimap
•MapGuide
•ka-Map
•WorldWind
Raster
Layers,
tiled
Vector
Layers,
points,
lines,
polygons
rendered
withSVG
/ VML
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
19
GeoRSS
GeoRSS
•W3C 2006: “a simple model for tagging external content
with geographic feature properties which are consistent
with the general feature model and syntax of OGC
GML.”
•supported by Yahoo! Maps, Google Maps, Live Local,
WorldKit, MapInfo, FME, Drupal, …
<item xmlns="http://mywebserver.com/rss2">
<title>…</title>
<description>…</description>
<georss:pointxmlns:georss="http://www.georss.org/georss">
45.3515625 75.234375
</georss:point>
</item>
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
20
GeoRSS in OpenLayers
GeoRSS in OpenLayers•Presently, two XML serializations are supported: GeoRSS
Simple, W3C GeoRSS
vargeorsslayer= new OpenLayers.Layer.GeoRSS(“georss.xml”, value);
map.addLayer(georsslayer);
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
21
GeoJSON
GeoJSON
•JSON = JavaScript
ObjectNotation
•lightweightdata-
interchangeformat
•efficientusein
JavaScript programs
{
"type": "Feature",
"id": "OpenLayers.Feature.Vector_122",
"properties": {
},
"geometry": {
"type": "Point",
"coordinates": [
115.3125,
24.9609375
]
},
"crs": {
"type": "EPSG",
"properties": {
"code": 4326
}
}
}
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
22
OGC‘s
OGC‘s
Geography
Geography
Markup
Markup
Language
Language
GML
GML
•onlyversion2 support
•Integration of a GML Layer
<wfs:FeatureCollectionxmlns:wfs="http://www.opengis.net/wfs">
<gml:featureMemberxmlns:gml="http://www.opengis.net/gml">
<feature:features
xmlns:feature=http://mapserver.gis.umn.edu/mapserver
fid="OpenLayers.Feature.Vector_156">
<feature:geometry>
<gml:Point>
<gml:coordinatesdecimal="." cs=", " ts=“
">75.2,45.3
</gml:coordinates>
</gml:Point>
</feature:geometry>
</feature:features>
</gml:featureMember>
</wfs:FeatureCollection>
map.addLayer(newOpenLayers.Layer.GML("GML", "gml/polygon.xml"));
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
23
Keyhole
Keyhole
Markup
Markup
Language
Language
-
-
KML
KML
•„I addedsupportforKML point displayin about20 minutes,
includingthetime to find dataand writea demoHTML pageloading
someexampledata. AddingLineStringsupportwas another15
minutes.“
http://crschmidt.net/blog/archives/201/openlayers-vector-support/
•polygonsnotyetsupported
•Integration of a KML Layer
map.addLayer(
new OpenLayers.Layer.GML(
"KML",
"kml/mc-search.kml",
{format: OpenLayers.Format.KML}
)
);
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
24
WMS
WMS
•A WMS layerneedslayername, URL, and parametes
varmap=newOpenLayers.Map('map');
varwmslayer=newOpenLayers.Layer.WMS(
"WMSStuttgart",
"http://suasdemo.easywms.com/WMS/getmapcap.php?",
{
layers:'gruenflaechen,oeffentl_gebaeude,private_gebaeude',
VERSION:"1.1.1",
units:'meters‚
transparent:'false',
format:'image/png'
maxExtent:'newOpenLayers.Bounds(minx,miny,maxx,maxy)',
maxResolution':'auto‚
}
);
map.addLayer(wmslayer);
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
25
WMS
WMS
•GetCapabilities
supportedby
extension1
•GetMap and
GetFeatureInfo
supported
•WMS-T support
//Registerclickevent
map.events.register('click',map,function(e){
//initializethedisplayingtext
$('nodeList').innerHTML="Loading...";
//definetheparametersforgetfeatureInfo
varurl=wmslayer.getFullRequestString({
REQUEST:"GetFeatureInfo",
EXCEPTIONS:"application/vnd.ogc.se_xml",
BBOX:wms.map.getExtent().toBBOX(),
X:e.xy.x,Y:e.xy.y,
INFO_FORMAT:'text/html',
QUERY_LAYERS:wms.params.LAYERS,
REDIUS:2,
WIDTH:wmslayer.map.size.w,
HEIGHT:wmslayer.map.size.h});
//getfeatureInfo
OpenLayers.loadURL(url,'',this,setHTML);
Event.stop(e);
});
//displaytheresult
functionsetHTML(response){
$('nodeList').innerHTML=response.responseText;
}
1see http://trac.openlayers.org/wiki/WMSManager,
http://www.ominiverdi.org/openlayers/sandbox/openlayers/examples/wms_manager.html
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
26
WFS
WFS
support
support
•WFS
•WFS-Transactional
functioninit(){
OpenLayers.ProxyHost="/proxy/?url=";
map=newOpenLayers.Map('map');
layer=newOpenLayers.Layer.WMS("OpenLayersWMS",
"http://labs.metacarta.com/wms/vmap0",{layers:'basic'});
map.addLayer(layer);
layer=newOpenLayers.Layer.WFS("OwlSurvey",
"http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
{typename:"OWLS",maxfeatures:10},
{featureClass:OpenLayers.Feature.WFS});
map.addLayer(layer);
}
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
27
Google Maps in OpenLayers
Google Maps in OpenLayers
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
28
vargoogleLayer=newOpenLayers.Layer.Google("GoogleSatellite",
{type:G_SATELLITE_MAP,'maxZoomLevel':18});
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
29
varsatellite=newOpenLayers.Layer.Google("GoogleMaps",
{type:G_NORMAL_MAP,'maxZoomLevel':18});
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
30
MSN Virtual Earth in OpenLayers
MSN Virtual Earth in OpenLayers
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
31
Additionally, OpenLayers supports...
Additionally, OpenLayers supports...
•Yahoo! Maps
•MultiMap
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
32
Samples: Integration of SRTM
Samples: Integration of SRTM
data
data
Source: http://dev.openstreetmap.org/~spaetz/?lat=6217998.0293&lon=996891.50684&zoom=8&layers=TTB
[2007-09-05]
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
33
Sample: OpenStreetMap
Sample: OpenStreetMap
•aims to be a free
editable map of the
whole world.
•http://www.openstre
etmap.org/
Source: http://www.openstreetmap.org/
[2007-09-10]
Prof. Dr.-Ing. Franz-Josef Behr
OpenLayers: Data Integration
34
Conclusion
Conclusion
•OpenLayers isa promisingOpen Source web mapping
client.
•Modern softwaredevelopmenttoolsand processes
ensurequalityand progressof thework.
•OpenLayers iscapableto integratemanyof data
resources.
•„Open Source Software forOpen Geodata“