When I was in Salzburg/Austria last year at the GI_Forum 2014 conference, I had the chance to present some of my recent experiments with the mapping of OGC interoperable geo-data to X3D interoperable open web 3D scenes and visualisation in the browser. Back in New Zealand later that year I had to present this work to the New Zealand Hydrological Society, too, of course :-)
Characterisation of a hydrogeological setting is a multi-faceted complex task. The assessment of usefulness and quality of relevant data is a major challenge. Statistical analysis and visual exploration of the datasets demand practical support by computer applications. Although a variety of software for this purpose is freely available nowadays, they require a good understanding of the technology or programming language for application in complex hydrogeological settings. Thus, integrated proprietary software products are often used to analyse and particularly provide high-quality visualisation of the system. However, these software tools are typically desktop programs with a strict licensing scheme and a limited extensibility and lack of interoperability with other applications.
We present an open and free to use web-based (platform independent) framework to enable retrieval, exploration and visualisation of hydro-climate time series data as well as three-dimensional geological information via a web browser. How distributed data and processing services can be linked to prepare an on-demand 3D visualisation of geological and hydrological data is demonstrated. A flexible toolbox design enables extensibility via open standards.
The method developed is applied to a case study area presented (s. figure), which is the Horowhenua district in the Manawatu-Wanganui region. Available datasets of 3D geology, hydrology and hydrogeology are combined and serve as example data for demonstrating the framework.
The slides of the presentations are now made accessible here (click here).
The full ISI-indexed conference paper is available here (click here).
Showing posts with label WMS. Show all posts
Showing posts with label WMS. Show all posts
Monday, 24 November 2014
Monday, 21 January 2013
A side note on geospatial data sharing and spatial data infrastructures (SDI)
This blog post is dedicated to provide a general overview over the field of geospatial and environmental data sharing. The term geospatial is actually tautologous: The prefix “geo” implies geography, which always relates things to each other based on their location, where nearer things are stronger related than things further away from each other (Tobler’s 1st law of geography). And the word “spatial” also means having an extent and location in a space. However “geospatial” nowadays is almost exclusively used in the field of digital data with geographical context. Therefore software that delivers, analyses, presents, processes, stores and retrieves is also often called geospatial software (having its origins in the good old GIS – Geographical Information Systems).
Part 1: GIS and GI Science intro
Research areas that work on the science behind GIS and spatial data, on the analytical methods, processes techniques, on ways of (standardised) spatial data exchange, effective and efficient storage and retrieval, are called GI Science, Geoinformatics, Geomatics, Geocomputation, Spatial Computation or Spatial Science … There is actually quite some discussion, if the necessity, even an entitlement for such a dedicated mixed branch of computer science and geography exists, a similar discussion when geography emerged as an accepted field of research (ref). On the other hand you’ll often find the quote that “80% of data has a spatial component” or something like that. Apparently I can get the source right anymore, therefore you might handle this with care. It might go back to the 1990s when GIS software for PCs wanted to get their feet into the market (gis lounge). However a lot of data in the geosciences have a spatial context and - a lot - of those data are needed for governmental agencies to manage land and water resources properly :smile: Agreed?
Part 2: The Opengeospatial Consortium, aka OpenGIS, aka OGC
“The Open Geospatial Consortium (OGC) is an international industry consortium of 479 companies, government agencies and universities participating in a consensus process to develop publicly available interface standards. OGC® Standards support interoperable solutions that ‘geo-enable’ the Web, wireless and location-based services and mainstream IT.”
The OGC standards framework provides means to build a spatial Data infrastructure (LINZ - Land Information New Zealand) – which is “the technology, policies, standards, and human resources necessary to acquire, process, store, distribute and improve the usability of geospatial data. (SDI) facilitates the connections between these important sources of information, and allows people to find and access them.” Quite some of the OGC standards and web services are also ISO international standards. There are interface and service descriptions on the one hand and data encodings/formats and conceptual data models on the other side. I will provide a short summary:
WMS – Web Mapping Service (ISO 19128 WMS v1.3.0)
Essentially provides (web) maps (as images like png or jpg) output data Geographiclly correct images, png, jpg, view or portrayal service
Major methods: GetCapabilties and GetMap
WFS – Web Feature Service (ISO 19142 WFS v2.0)
Provides an interface to access, query, store and retrieve vector “features”, aka discrete data – like in ESRI shapefiles. Data is accessible by their data schema, which can be soft-typed and values in schema fields and location queries are utilized. Output GML (ISO 19136), which is in a particular “domain-specific” XML schema. With WFS-T – transactional – there is also support to write back to the WFS server.
GetCapabilities GetFeature – get the data DescribeFeatureType – get schema
WCS – Web Coverage Service
Provides an interface to access, query and retrieve raster imagery and coverages, grids (aka “fields”) as in continuous data. eg NetCDF-CF, GeoTIFF, ArcGRID
GetCapabilities DescribeCoverage GetCoverage
CSW – Catalogue Service for Web (ISO 19115 CSW 2.0.2)
Provides an interface to access, query, store and retrieve metadata, aka data about the geospatial data, which is accessible through other geospatial webservices. Output is usually XML ISO 19139 metadata or Dublin core.
GetCapabilities GetRecords – find metadata record by search criteria GetRecordById – get one record by its unique id DescribeRecord – metadata type GetDomain – get range of values and/or keywords
SOS – Sensor Observation Service
Provides an interface to access, query, store and retrieve time-series based data that has been measured at locations, eg through sensors or field surveying/sampling. But the focus is to query on temporal and then on spatial or value comparison basis. Standard output formats are O&M, WaterML2.0 time-series and SensorML sensor/procedure metadata.
SOS is part of the sensor web enablement initiative (SWE) which advances to its version 2, where a lot of things become more flexible, but also moe complicated. I will write about that later ☺ SOS explicitly also describes a group of methods to insert sensor and observation data. This is handled through different profiles.
GetCapabilities GetObservation DescribeSensor
There are quite some commercial and Open Source software packages and tool kits available, for the desktop and server-based for the web that support or where explicitly written for OGC webservices and splendid Open Source resources in the web:
OSGeo Foundation: http://www.osgeo.org
(Spatially enabled) Databases:
- Postgresql/Postgis
- MySQL
- Oracle Database
- Microsoft SQL Server
- ESRI Geodatabase / ArcSDE
- SpatiaLite
- Rasdaman
- GeoCouch
Data Servers (store data in databases):
- Geoserver (WMS, WFS, WCS)
- Mapserver (WMS, WFS, SOS)
- 52°North SOS server
- Geonetwork (CSW)
- ESRI ArcIMS / ArcServer
- Thredds (WCS, netCDF)
Web mapping tool kits / frameworks (take data from data servers):
- openlayers
- Mapbender
- MapFish
- Geomajas
- Flash
- Silverlight
Desktop clients supporting (at least partially) OGC standards:
- QuantumGIS
- uDig
- ESRI ArcGIS
- Intergraph Geomedia
And on it goes … in the next weeks, I will write about New Zealand and international examples of OGC webservices implementations and SDIs for geospatial data publishing (where the data is basically public domain and needs to made accessible) and provide some closer insights to OGC SWE and the next generation sensor networks initiative SWE 2.0 et al.
Labels:
52North,
CSW,
eResearch,
Geoinformatics,
GeoServer,
OGC,
Postgis,
SOS,
WCS,
Web Services,
WFS,
WMS,
WPS
Saturday, 28 April 2012
Exposing geographic information with Geoserver and OpenLayers
Exposing geographic information
Visualising geographic data especially on a map has been scientific subject for ages :-) But one of the basics is actually still colouring and labeling features as means of symbolisation to recognise and distinguish geographic features and to compare specific attribute values.
The OpenGIS® Styled Layer Descriptor (SLD) Profile of the OpenGIS® Web Map Service (WMS) Encoding Standard [http://www.opengeospatial.org/standards/wms] defines an encoding that extends the WMS standard to allow user-defined symbolization and coloring of geographic feature[http://www.opengeospatial.org/ogc/glossary/f] and coverage[http://www.opengeospatial.org/ogc/glossary/c] data. SLD addresses the need for users and software to be able to control the visual portrayal of the geospatial data. The ability to define styling rules requires a styling language that the client and server can both understand. The OpenGIS® Symbology Encoding Standard (SE) [http://www.opengeospatial.org/standards/symbol] provides this language, while the SLD profile of WMS enables application of SE to WMS layers using extensions of WMS operations. Additionally, SLD defines an operation for standardized access to legend symbols. (http://www.opengeospatial.org/standards/sld)
I would like to show three nice examples I used in the SMART web mapping application. The first is a a point style - a neat triangle with a label, the 2nd is colouring of contour lines and labeling and the use of Geoserver's FeatureInfo template system.
The first example is a point feature, a State of the Environment monitoring well in New Zealand. Besides other data fields It has an ID, which is actually an officially assigned number.
<?xml version="1.0" encoding="UTF-8"?>The main things I do here, are essentially defining the text representation and then the point symbolisation by giving it the shape of small orange triangle with no surrounding line. For the text symbolisation I define, what data field shall the label represent, the font, the label placement in relation to the actual point and I use the halo-tag to give the font I nice colourful background "glow" :-)
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>soe_gwl_monitoring_wells</Name>
<UserStyle>
<Name>soe_gwl_monitoring_wells:withLabel</Name>
<Title>withLabel</Title>
<FeatureTypeStyle>
<Name>triangleWithLabel</Name>
<Rule>
<Name>triangleWithLabel</Name>
<MinScaleDenominator>0</MinScaleDenominator>
<MaxScaleDenominator>9999999</MaxScaleDenominator>
<TextSymbolizer>
<Label>
<ogc:PropertyName>ID</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Sans-Serif</CssParameter>
<CssParameter name="font-style">italic</CssParameter>
<CssParameter name="font-size">10</CssParameter>
<CssParameter name="font-color">#000000</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>
<ogc:Literal>0.0</ogc:Literal>
</AnchorPointX>
<AnchorPointY>
<ogc:Literal>0.0</ogc:Literal>
</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>
<ogc:Literal>2.0</ogc:Literal>
</DisplacementX>
<DisplacementY>
<ogc:Literal>2.0</ogc:Literal>
</DisplacementY>
</Displacement>
<Rotation>
<ogc:Literal>0.0</ogc:Literal>
</Rotation>
</PointPlacement>
</LabelPlacement>
<Halo>
<Fill>
<CssParameter name="fill">#FF4000</CssParameter>
<CssParameter name="fill-opacity">0.3</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
</TextSymbolizer>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>triangle</WellKnownName>
<Fill>
<CssParameter name="fill">
<ogc:Literal>#FF4000</ogc:Literal>
</CssParameter>
</Fill>
</Mark>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>10</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
The next is a contour line clouring description. The contour lines represent mean annual rainfall and regarding the data sets I used a Jenks classification with 5 classes, which I hard-coded in the SLD document.
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a Named Layer is the basic building block of an SLD document -->
<NamedLayer>
<Name>horowhenua_mean_rainfall_contours</Name>
<UserStyle>
<Name>horowhenua_mean_rainfall_contours:withContourLabel</Name>
<Title>withCountourLabels</Title>
<Abstract>withCountourLabels</Abstract>
<FeatureTypeStyle>
<Name>withCountourLabels</Name>
<Title>withCountourLabels</Title>
<!-- 5 breaks natural jenks, 900-1200, 1201-1700, 1701-2200, 2201-2700, 2701-3200 -->
<Rule>
<Name>900-1200</Name>
<Title>900-1200</Title>
<Abstract>900-1200</Abstract>
<ogc:Filter>
<ogc:PropertyIsLessThanOrEqualTo>
<ogc:PropertyName>CONTOUR</ogc:PropertyName>
<ogc:Literal>1200</ogc:Literal>
</ogc:PropertyIsLessThanOrEqualTo>
</ogc:Filter>
<MinScaleDenominator>0</MinScaleDenominator>
<MaxScaleDenominator>9999999</MaxScaleDenominator>
<TextSymbolizer>
<Label>
<ogc:PropertyName>CONTOUR</ogc:PropertyName>
</Label>
<LabelPlacement>
<LinePlacement />
</LabelPlacement>
<Halo>
<Fill>
<CssParameter name="fill">#CEF6F5</CssParameter>
<CssParameter name="fill-opacity">0.6</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#0B0B3B</CssParameter>
</Fill>
<VendorOption name="followLine">true</VendorOption>
</TextSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#2ECCFA</CssParameter>
<CssParameter name="stroke-opacity">0.7</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>3</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<!-- 5 breaks natural jenks, 900-1200, 1201-1700, 1701-2200, 2201-2700, 2701-3200 -->
<Rule>
<Name>1201-1700</Name>
<Title>1201-1700</Title>
<Abstract>1201-1700</Abstract>
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>CONTOUR</ogc:PropertyName>
<ogc:Literal>1201</ogc:Literal>
</ogc:PropertyIsGreaterThan>
<ogc:PropertyIsLessThanOrEqualTo>
<ogc:PropertyName>CONTOUR</ogc:PropertyName>
<ogc:Literal>1700</ogc:Literal>
</ogc:PropertyIsLessThanOrEqualTo>
</ogc:And>
</ogc:Filter>
<MinScaleDenominator>0</MinScaleDenominator>
<MaxScaleDenominator>9999999</MaxScaleDenominator>
<TextSymbolizer>
<Label>
<ogc:PropertyName>CONTOUR</ogc:PropertyName>
</Label>
<LabelPlacement>
<LinePlacement />
</LabelPlacement>
<Halo>
<Fill>
<CssParameter name="fill">#CEF6F5</CssParameter>
<CssParameter name="fill-opacity">0.6</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#0B0B3B</CssParameter>
</Fill>
<VendorOption name="followLine">true</VendorOption>
</TextSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#2E9AFE</CssParameter>
<CssParameter name="stroke-opacity">0.7</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>3</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<!-- 5 breaks natural jenks, 900-1200, 1201-1700, 1701-2200, 2201-2700, 2701-3200 -->
<Rule>
<Name>1701-2200</Name>
<Title>1701-2200</Title>
<Abstract>1701-2200</Abstract>
...
<!-- 5 breaks natural jenks, 900-1200, 1201-1700, 1701-2200, 2201-2700, 2701-3200 -->
<Rule>
<Name>2201-2700</Name>
<Title>2201-2700</Title>
<Abstract>2201-2700</Abstract>
...
<!-- 5 breaks natural jenks, 900-1200, 1201-1700, 1701-2200, 2201-2700, 2701-3200 -->
<Rule>
<Name>2701-3200</Name>
<Title>2701-3200</Title>
<Abstract>2701-3200</Abstract>
...
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
I cut the last three declarations, as anybody might derive that from the first two ones, I think :-) Here I used the OGC filter encoding specification (http://www.opengeospatial.org/standards/filter) to define that only these lines, which have values of a specific range in the named attribute. Additionally the vendor-option <VendorOption name="followLine">true</VendorOption> followLine aligns the contour's elevation labels along the contour lines :-). A nice fact is that if you use not only the name-tag within the rule, but also title and/or abstract (I am actually not 100% sure :-p ) that naming will be represented in the WMS layer legend.
Finally I would like to shortly introduce my first experiences with Geoserver's freemarker template engine (http://docs.geoserver.org/latest/en/user/tutorials/GetFeatureInfo/index.html and http://geoserver.org/display/GEOS/Templates) to customise featureInfo output with OpenLayers. The first code example is a pretty basic template that fetches attribute names and values from the Geoserver provided featureCollection and then fetches a hydrograph picture based on the ID of the current feature, to demonstrate the flexibilty. In future developments a bit more dynamic functionality like rendering such a graph online by requesting the time-series from a SOS server would way cooler :-)
<#--
Body section of the GetFeatureInfo template, it's provided with one feature collection, and
will be called multiple times if there are various feature collections
-->
<table class="featureInfo">
<caption class="featureInfo">SOE Wells</caption>
<tr>
<#list type.attributes as attribute>
<#if !attribute.isGeometry>
<th >${attribute.name}</th>
</#if>
</#list>
</tr>
<#assign odd = false>
<#list features as feature>
<#if odd>
<tr class="odd">
<#else>
<tr>
</#if>
<#assign odd = !odd>
<#list feature.attributes as attribute>
<#if !attribute.isGeometry>
<td>${attribute.value}</td>
</#if>
</#list>
</tr>
<tr>
<td colspan="4">
<img src="demorequests/${feature.attributes["ID"].value}.png" width="400" height="216" alt="SOE Well ID ${feature.attributes["ID"].value} Hydrograph">
</td>
</tr>
</#list>
</table>
<br/>
In the JavaScript implementation of your OpenLayers map-object you fetch this template "auomagically" filled with data from Geoserver. You need to patch together following things:
- featureInfo = OpenLayers.Control.WMSGetFeatureInfo()
- map.addControl(featureInfo)
- featureInfo.activate()
- document.getElementById('map').style.cursor='pointer';
And finally you could display that generated html via an Ext.Window
The JavaScript stuff is a big hassle in my opinion. It gives you a lot of flexibility and nice cool things directly in the client browser, but it costs a lot of nerves. But maybe I am just not the real JavaScript developer at all :-p
Subscribe to:
Posts (Atom)
