wms @ sgu - smhi01 jonas holmberg - wms @ sgu.pdf · wms @ sgu - innehåll vad är wms (wep map...
TRANSCRIPT
WMS @ SGU
Jonas Holmberg
WMS @ SGU - innehåll
� Vad är WMS (Wep Map Service)?
� WMS lager / tjänster och struktur påSGU
� SGUs WMS i ArcGIS
� SGUs WMS i Geodata.se
� SGUs WMS i kartvisare
• OGC / ISO standard för webbaserade kartor
� 2000 version 1.0.0
WMS – Web Map Service
� 2001 version 1.1.0
� 2002 version 1.1.1
� 2004 version 1.3.0 - (ISO 19128)
”The Web Map Service Interface Standard (WMS) provides a
simple HTTP interface for requesting georeferenced map images
from one or more geospatial databases”
opengeospatial.org
WMS – Web Map Service
• WMS anrop (requests)– GetCapabilities - Required
– GetMap - Required– GetFeatureInfo - Optional
– GetLegendGraphic - Optional
– DescribeLayer - Optional
• GetCapabilities
Request Parameter Required/Optional
Description
VERSION=version O Request version
SERVICE=WMS R Service type
REQUEST=GetCapabilities R Request name
UPDATESEQUENCE=string O Sequence number or string for cache control
WMS – GetCapabilities
• Metadata om tjänsten- vad tjänsten kan- vilka lager som ingår- lagrets egenskaper
- skalintervall
- frågbarhet (GetFeatureInfo)
- kartografi- metadata för lagret
- vilka ”mimetypes” som stöds för de olika ”requesten”
WMS – GetCapabilitieshttp://maps3.sgu.se/geoserver177/wms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1
Request Parameter Required/Optional
Description
VERSION=version R Request version.REQUEST=GetMap R Request name.LAYERS=layer_list R Comma-separated list of one or more map layers. Optional if SLD parameter is present.
STYLES=style_list R Comma-separated list of one rendering style per requested layer. Optional if SLD parameter is present.
SRS=namespace:identifier R Spatial Reference System.BBOX=minx,miny,maxx,maxy R Bounding box corners (lower left, upper right) in SRS units.
WIDTH=output_width R Width in pixels of map picture.HEIGHT=output_height R Height in pixels of map picture.FORMAT=output_format R Output format of map.TRANSPARENT=TRUE|FALSE O Background transparency of map (default=FALSE).
BGCOLOR=color_value O Hexadecimal red-green-blue color value for the background color (default=FFFFFF).
EXCEPTIONS=exception_format O The format in which exceptions are to be reported by the WMS (default=SE_XML).
TIME=time O Time value of layer desired.ELEVATION=elevation O Elevation of layer desired.Other sample dimension(s) O Value of other dimensions as appropriate.
Vendor-specific parameters O Optional experimental parameters.
The following parameters are used only with Web Map Services that support the Styled Layer Descriptor specification SLD=styled_layer_descriptor_URL O URL of Styled Layer Descriptor (as defined in SLD Specification).
WFS=web_feature_service_URL O URL of Web Feature Service providing features to be symbolized using SLD.
WMS – GetMap
• GetMap
WMS – GetMap
• Rasterkartbild av tjänsten/lagret:- från ett kartutsnitt (BBOX)- i något bildformat (png, gif, jpeg etc.)- kartografi enligt STYLES parametern
WMS – GetMap
http://maps3.sgu.se/geoserver177/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:3006&LAYERS=gv:SE.GOV.SGU.GRUNDVATTEN.BERG.1M,
gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&HEIGHT=550&WIDTH=401&STYLES=&FORMAT=image/png&EXCEPTIONS=application/vnd.ogc.se_inimage&BBOX=620497.0879532172,6619743.559766034,663224.5343000988,6678347.289169487
WMS – GetFeatureInfo
• Fråga om enskilt objekt i tjänsten/lagret- svaret kan levereras som:
- text/plain- text/html- application/vnd.ogc.gml
WMS – GetFeatureInfo
• GetFeatureInfoRequest Parameter Required/
OptionalDescription
VERSION=version R Request version.REQUEST=GetFeatureInfo R Request name.
<map_request_copy> R Partial copy of the Map request parameters that generated the map for which information is desired.
QUERY_LAYERS=layer_list R Comma-separated list of one or more layers to be queried.
INFO_FORMAT=output_format O Return format of feature information (MIME type).
FEATURE_COUNT=number O Number of features about which to return information (default=1).
X=pixel_column R X coordinate in pixels of feature (measured from upper left corner=0)
Y=pixel_row R Y coordinate in pixels of feature (measured from upper left corner=0)
EXCEPTIONS=exception_format O The format in which exceptions are to be reported by the WMS (default=application/vnd.ogc.se_xml).
Vendor-specific parameters O Optional experimental parameters.
http://maps3.sgu.se/geoserver177/wms?REQUEST=GetFeatureInfo&VERSION=1.1.1&LAYERS=gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&STYLES=&SRS=EPSG:3006&WIDTH=401&HEIGHT=550&FORMAT=image/png&EXCEPTIONS=application/vnd.ogc.se_xml&BBOX=623267.44607,6617719.067296,665994.892417,6676322.796699&X=248&Y=406
&INFO_FORMAT=text/html&QUERY_LAYERS=gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&FEATURE_COUNT=1
WMS – GetFeatureInfo
http://maps3.sgu.se/geoserver177/wms?REQUEST=GetFeatureInfo&VERSION=1.1.1&LAYERS=gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&STYLES=&SRS=EPSG:3006&WIDTH=401&HEIGHT=550&FORMAT=image/png&EXCEPTIONS=application/vnd.ogc.se_xml&BBOX=623267.44607,6617719.067296,665994.892417,6676322.796699&X=248&Y=406
&INFO_FORMAT=text/plain&QUERY_LAYERS=gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&FEATURE_COUNT=1
WMS – GetFeatureInfo
Results for FeatureType 'SE.GOV.SGU.GRUNDVATTEN.JOR D.1M':--------------------------------------------kartering = sve hynajkap_id = 2.31706218E8jkap = 2005jkap_text = Ovanligt stor grundvattentillgång, stor leksordningen > 125 l/s (ca > 10 000 m3/d), med ovanligt goda uttagsmö jligheter geom = [GEOMETRY (MultiPolygon) with 80 points]--------------------------------------------
http://maps3.sgu.se/geoserver177/wms?REQUEST=GetFeatureInfo&VERSION=1.1.1&LAYERS=gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&STYLES=&SRS=EPSG:3006&WIDTH=401&HEIGHT=550&FORMAT=image/png&EXCEPTIONS=application/vnd.ogc.se_xml&BBOX=623267.44607,6617719.067296,665994.892417,6676322.796699&X=248&Y=406
&INFO_FORMAT=application/vnd.ogc.gml &QUERY_LAYERS=gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&FEATURE_COUNT=1
WMS – GetFeatureInfo
WMS – GetLegendGraphic
• GetLegendGraphicRequest Parameter Required/
OptionalDescription
VERSION=version R Request version.REQUEST=GetLegendGraphics R Request name.
LAYER=layer R One layer to be queried.
FORMAT=output_format R Return format of feature information (MIME type).
WIDTH=output_width O Width in pixels of legend picture.
HEIGHT=output_height O Height in pixels of legend picture.
EXCEPTIONS=exception_format O The format in which exceptions are to be reported by the WMS (default=application/vnd.ogc.se_xml).
STYLE=style_name O Rendering style per requested layer
Vendor-specific parameters O Optional experimental parameters.
WMS – GetLegendGraphic
• Teckenförklaring för ett enskilt lager- svaret kan levereras som:
- i något bildformat (png, gif, jpeg etc.)- enligt kartografi för lagrets <Style>
http://maps3.sgu.se:80/geoserver177/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M&STYLE=
WMS – GetLegendGraphic
WMS – lager och tjänster - struktur
berg:SE.GOV.SGU.ALDER.1M berg:SE.GOV.SGU.BERGGRUND.DETALJERAD_INDELNING.1M berg:SE.GOV.SGU.BERGGRUND.DIABAS.1M berg:SE.GOV.SGU.BERGGRUND.ENKEL_INDELNING.1M berg:SE.GOV.SGU.BERGGRUND.TEKTONIK.1M berg:SE.GOV.SGU.BERGGRUND_FENNO.1M berg:SE.GOV.SGU.BORRKARNOR.ARKIV.250K berg:SE.GOV.SGU.BORRKARNOR.SAMLINGAR.250K berg:SE.GOV.SGU.MALM_MINERALISERINGAR.250K berg:SE.GOV.SGU.MINERAL_BERGARTSRESURSER.250K berg:SE.GOV.SGU.MRR_DIAMANT_OLJA.250K berg:SE.GOV.SGU.MRR_MINERAL.250K
Berggrund, malm och mineralhttp://maps3.sgu.se/geoserver177/wms?namespace=berg
fysik:SE.GOV.SGU.ANALOG_GRAVIMETRY.250K fysik:SE.GOV.SGU.ANALOG_IP.250K fysik:SE.GOV.SGU.ANALOG_MAGNETIC_FIELD.250K fysik:SE.GOV.SGU.ANALOG_SLINGRAM.250K fysik:SE.GOV.SGU.ANALOG_VLF.250K fysik:SE.GOV.SGU.DIGITAL_GRAVIMETRY.250K fysik:SE.GOV.SGU.DIGITAL_IP.250K fysik:SE.GOV.SGU.DIGITAL_MAGNETIC_FIELD.250K fysik:SE.GOV.SGU.DIGITAL_SLINGRAM.250K fysik:SE.GOV.SGU.DIGITAL_VLF.250K fysik:SE.GOV.SGU.KALIUM fysik:SE.GOV.SGU.MAGNET fysik:SE.GOV.SGU.THORIUM fysik:SE.GOV.SGU.TYNGDKRAFT fysik:SE.GOV.SGU.URAN
Geofysikhttp://maps3.sgu.se/geoserver177/wms?namespace=fysik
gv:SE.GOV.SGU.BRUNNAR.250K gv:SE.GOV.SGU.GRUNDVATTEN.BERG.1M gv:SE.GOV.SGU.GRUNDVATTEN.JORD.1M gv:SE.GOV.SGU.KALLOR.1M gv:SE.GOV.SGU.MILJOOVERVAKNING_GRUNDVATTEN.250K gv:SE.GOV.SGU.NATIONELL_MILJOOVERVAKNING_GRUNDVATTEN.250K gv:SE.GOV.SGU.REGIONAL_MILJOOVERVAKNING_GRUNDVATTEN.250K
jord:GRUNDLAGER_50K jord:LINJER_50K jord:SE.GOV.SGU.GRUSFOREKOMSTER.250K jord:SE.GOV.SGU.JORD.GRUNDLAGER.50K jord:SE.GOV.SGU.JORD.JORDARTER.1M jord:SE.GOV.SGU.JORD.JORDARTER_OVERSIKT.1M jord:SE.GOV.SGU.JORD.LINJER.50K jord:SE.GOV.SGU.JORD.UNDERLIGGANDE_LAGER.50K jord:SE.GOV.SGU.MORANFOREKOMSTER.250K jord:SE.GOV.SGU.SANDFOREKOMSTER.250K jord:UNDERLIGGANDE_LAGER_50K
marin:SE.GOV.SGU.MILJOOVERVAKNING_DUMPSTATION.250K marin:SE.GOV.SGU.MILJOOVERVAKNING_SEDIMENT_KARTL.250Kmarin:SE.GOV.SGU.MILJOOVERVAKNING_SEDIMENT_NMO.250K
marin:SE.GOV.SGU.MILJOOVERVAKNING_SEDIMENT_RMO.250K
Grundvatten, brunnar och miljöövervakning av grundvattenhttp://maps3.sgu.se/geoserver177/wms?namespace=gv
Jordarterhttp://maps3.sgu.se/geoserver177/wms?namespace=jord
Maringeologi, miljöövervakning sedimenthttp://maps3.sgu.se/geoserver177/wms?namespace=marin
mininfo:SE.GOV.SGU.BALLAST.BERGKVALITET mininfo:SE.GOV.SGU.BALLAST.GV_MAGASIN mininfo:SE.GOV.SGU.BALLAST.PROVPUNKT mininfo:SE.GOV.SGU.BALLAST.RADIUMINDEX mininfo:SE.GOV.SGU.BIOGEOKEMI_CU.250K mininfo:SE.GOV.SGU.BIOGEOKEMI_CU_WMS.250K mininfo:SE.GOV.SGU.JORD.TACKNING.50K mininfo:SE.GOV.SGU.MARKGEOKEMI_CU.250K mininfo:SE.GOV.SGU.MARKGEOKEMI_CU_WMS.250K mininfo:SE.GOV.SGU.MARKGEOKEMI_NSG_CU.250K mininfo:SE.GOV.SGU.MARKGEOKEMI_NSG_CU_WMS.250K mininfo:SE.GOV.SGU.RIKSINTRESSEN_MINERAL.MINERALRESURSER_250K mininfo:SE.GOV.SGU.RIKSINTRESSEN_MINERAL_PUNKT.250K mininfo:SE.GOV.SGU.RIKSINTRESSEN_MINERAL_YTA.250K mininfo:SE.GOV.SGU.TAKTER.INDUSTRIMATERIAL.250K mininfo:SE.GOV.SGU.TAKTER.KROSSBERG.250K mininfo:SE.GOV.SGU.TAKTER.MORAN.250K mininfo:SE.GOV.SGU.TAKTER.NATURGRUS.250K mininfo:SE.GOV.SGU.TAKTER.NATURSTEN.250K mininfo:SE.GOV.SGU.TAKTER.OVRIGT.250K mininfo:SE.GOV.SGU.TAKTER.TAKTPRODUKTION.250K
Ballast, mineralinformation och geokemihttp://maps3.sgu.se/geoserver177/wms?namespace=mininfo
WMS med Geoserver
• WMS GetCapabilities för GeoServer ger svar med alla ingående lager som publicerats som WMS lager på servern (gäller v 2.0 och äldre)
• Kan vara svårt att överblicka vid många (flera 10-tals) lager
• Lösning kan vara att använda sig av den specifika GeoServer-parametern &namespace=
Problem:
Lösning:
PostgreSQL / PostGIS - struktur
• GIS lager i PostgreSQL / PostGIS– Indelning i databasscheman enligt geologiskt tema
GeoServer - Namespace
• Eget namespace för varje tema
• Namespacet får en egen URI
GeoServer - Datastore• Namespace kopplas
till databasschema i konfig av ”Datastore” i GeoServer
GeoServer - Featuretype
• ”Featuretype” -lagren är sorterade enligt respektive ”Datastore”vid definition av nytt lager
http://.../.../wms?request=getCapabilities&namespace=berg
GeoServer - GetCapabilitiesht
tp://
.../..
./wm
s?re
ques
t=ge
tCap
abili
ties&
nam
espa
ce=b
erg
berg:SE.GOV.SGU.ALDER.1M berg:SE.GOV.SGU.BERGGRUND.DETALJERAD_INDELNING.1M berg:SE.GOV.SGU.BERGGRUND.DIABAS.1M berg:SE.GOV.SGU.BERGGRUND.ENKEL_INDELNING.1M berg:SE.GOV.SGU.BERGGRUND.TEKTONIK.1M berg:SE.GOV.SGU.BERGGRUND_FENNO.1M berg:SE.GOV.SGU.BORRKARNOR.ARKIV.250K berg:SE.GOV.SGU.BORRKARNOR.SAMLINGAR.250K berg:SE.GOV.SGU.MALM_MINERALISERINGAR.250K berg:SE.GOV.SGU.MINERAL_BERGARTSRESURSER.250K berg:SE.GOV.SGU.MRR_DIAMANT_OLJA.250K berg:SE.GOV.SGU.MRR_MINERAL.250K
WMS i SGUs kartvisare exempel
???
Extra - webbplattform
Gammal webbplattform• Webb- & applikationsserver
– Apache 2 & Tomcat 4.1 och 5.5
– Solaris 8
• Kartserver– ArcIMS 9.1 / 9.2 & WMSConnector 9.1 / 9.2– Geoserver 1.7.7
– Apache 2 & Tomcat 5.0 och 5.5 / 6.0 för Windows
– Windows server 2003
• Databasserver – Oracle 9i & ArcSDE 9.1
– Solaris 8
Problem – gammal/befintlig plattform
• Spretighet– Flera olika OS
– Många olika versioner av applikationsservrar (Tomcat 4.x, 5.x,5.5.x)
– Olika versioner av Java (1.4, 1.5, 1.6)• Underhåll / uppgraderingar
– Svårt att underhålla och uppgradera
– Många beroenden mellan systemkomponenter
• Licenskostnader• Prestanda
Enter ”Open Source”
Systemarkitektur – ny plattform
• OS– Linux Ubuntu LTS
• Webb- & applikationsserver– Tomcat 6
• Kartserver– Tomcat 6
– GeoServer 1.7.7, WMS 1.1.1
– (Deegree 2.3, WMS 1.3 /WFS 1.1)
• Databasserver – PostgreSQL 8.3.8 / PostGIS 1.3.5
• ”Blackbox”– OS
– Linux Ubuntu LTS– Mapserver
– OneGeology – Europé
– WMS 1.3– …
Webbfront
Kartserver
Databas
Web/app server
Kartserver
Databas
Systemarkitektur – ny plattform
Tomcat 6.0 GeoServer 1.7.7
PostgreSQL+PostGIS
Tomcat 6.0 sgu.se kartvisare …
Deegree 2.3
NginX
Reverse proxy
Blackbox
MapServer
1GE - Europe
…
• Alla maskiner körs virtualiserat