Earth Resource Markup Language (ERML) - Overview for Melbourne Science Hackfest

Note - If you were looking for the NVCL dataset information for Melbourne Science Hackfest, it can be found at NVCLGovHackOverview

Overview

This page is for participants in Melbourne Science Hackfest who are interested in creating a mashup of the ERML data. This page provides a quick introduction to the ERML data, services and its use. If you are looking for the full overview then you can find it at EarthResourceDeployments.

What is ERML?

Earth Resource Markup Language (ERML), is an information model for describing relationships between concepts like mines, minerals and commodities. In AuScope a community of data providers spread all over Australia have agreed to expose their data publicly using the ERML model. Each one of these data providers has their own proprietary schema for modelling mining data which would normally be a pain for consumers of the data. The use of ERML means there is a consistent way to query and receive the information - much easier!

The Model

The ERML model itself is broken up into a series of concepts (Mines, Commodities) where each of these concepts has one or more complex relationships with other concepts. For instance, every Mine will have one or more Commodities (think Gold, Silver, Iron) along with information describing how much of each commodity has been extracted. If you are familiar with UML then the following schema should outline all of the relationships, if UML isn't your thing then don't worry too much, this is only to give you a rough idea of the relationships between concepts.

The ERML Model
EarthResourceML_V1_AuScope_Profile.jpg

How to query it

WFS

As mentioned, ERML is a complex model and is queryable through a OGC Web Feature Service (WFS) interface. The WFS interface exposes a variety of feature types which correspond to the above concepts. A feature type is analogous to an object in Object Oriented Programming, it has a defined set of attributes which may be comprised of further feature types. A WFS allows you to query for instances of a particular feature type and have those instances be returned as XML encoded features.

As an example, the ERML WFS instances expose a feature type called MiningFeatureOccurrence. This feature type contains spatial geometry and references to a Mine which allows you to georeference a specific instance of a Mine. For simplicity's sake, let's just request the first two instances of the MiningFeatureOccurrence with the following query:

Courtesy of the Department of Mines and Petroleum Western Australia
http://geossdi.dmp.wa.gov.au/services/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&typeName=er:MiningFeatureOccurrence&maxFeatures=2

Of course, if all we could do was request the first X instances of a feature type then WFS wouldn't be very useful. What WFS also allows you to do is generate OGC Filter queries and embed them in a WFS request. Filters allow you to ask questions like, "are there any mines within this region of interest" or "are there any mines created after 2005". To make an filter query within your WFS query, you'll want to switch to HTTP POST requests, to test out a filter simply POST the following to a WFS:

POST the below to http://geossdi.dmp.wa.gov.au/services/wfs to get the first two mines whose status is 'Not Operating'

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature service="WFS" version="1.1.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:er="urn:cgi:xmlns:GGIC:EarthResource:1.1" maxFeatures="2">
<wfs:Query typeName="er:MiningFeatureOccurrence" srsName="EPSG:4326">
<ogc:Filter>
<ogc:And>
<ogc:BBOX>
<ogc:PropertyName>er:location</ogc:PropertyName>
<gml:Envelope srsName="EPSG:4326">
<gml:lowerCorner>110 -13 </gml:lowerCorner>
<gml:upperCorner>130 -36 </gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>er:specification/er:Mine/er:status</ogc:PropertyName>
<ogc:Literal>not operating</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

For more detailed information, see:
OGC WFS specification
OGC Filter specification

WMS:

Some of the service are set up with WMS support(As described in the next section)

WMS support for app schema is a feature supported by Geoserver and more information can be found below

http://docs.geoserver.org/stable/en/user/data/app-schema/wms-support.html

http://docs.geoserver.org/latest/en/user/data/app-schema/configuration.html#app-schema-configuration

Filtering.

As descibed in the Geoserver documentation, there are many ways to provide filtering for wms
  • Inlining the filter in a Get request
  • Post the filter in a Post request
  • Inline a sld that contains the filter request in a Get request
  • Post a sld containing the filter in a Post request
Going through each of the methods above is out of scope for this write up. Please refer to the GeoServer documentation for more information

Below is an example of a SLD we used in a post WMS request to filter a WMS request.

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" 
   xmlns:mo="http://xmlns.geoscience.gov.au/minoccml/1.0" 
   xmlns:er="urn:cgi:xmlns:GGIC:EarthResource:1.1" 
   xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" 
   xmlns:ogc="http://www.opengis.net/ogc" 
   xmlns:xlink="http://www.w3.org/1999/xlink" 
   xmlns:gml="http://www.opengis.net/gml" 
   xmlns:gsml="urn:cgi:xmlns:CGI:GeoSciML:2.0" 
   xmlns:sld="http://www.opengis.net/sld" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <NamedLayer>
      <Name>er:MiningFeatureOccurrence</Name>
      <UserStyle>
         <Name>portal-style</Name>
         <Title>er:MiningFeatureOccurrence</Title>
         <Abstract>EarthResource</Abstract>
         <IsDefault>1</IsDefault>
         <FeatureTypeStyle>
            <Rule>
               <Name>er:MiningFeatureOccurrence</Name>
               <Abstract>er:MiningFeatureOccurrence</Abstract>
               <ogc:Filter>
                  <ogc:PropertyIsLike escapeChar="!" wildCard="*" matchCase="false" singleChar="#" >
                     <ogc:PropertyName>er:specification/er:Mine/er:mineName/er:MineName/er:mineName</ogc:PropertyName>
                     <ogc:Literal>BAYLEY*</ogc:Literal>
                  </ogc:PropertyIsLike>
               </ogc:Filter>
               <PointSymbolizer>
                  <Graphic>
                     <Mark>
                        <WellKnownName>square</WellKnownName>
                        <Fill>
                           <CssParameter name="fill">#AA0078</CssParameter>
                        </Fill>
                     </Mark>
                     <Size>6</Size>
                  </Graphic>
               </PointSymbolizer>
            </Rule>
         </FeatureTypeStyle>
      </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

Below is a basic sample request without filtering and uses the default SLD in the setup.

http://gsnsw.arrc.csiro.au/gsnsw-earthresource/er/wms?service=WMS&version=1.1.0&request=GetMap&layers=er:MiningFeatureOccurrence&styles=&bbox=112.907,-54.7539,158.96,-10.1357&width=512&height=496&srs=EPSG:4326&format=image%2Fpng

Data Providers

ERML providers expose the following feature types:
Feature Type Description WMS
er:Commodity Information about a single commodity (mineral) extracted from the ground. No
gsml:MappedFeature Maps a MineralOccurrence to a spatial location Yes
er:MineralOccurrence Represents an extracted amount of a particular commodity. No
er:Mine Metadata describing a mine No
er:MiningActivity A mining activity is an instance of mining that produced some commodity. No
er:MiningFeatureOccurrence Maps a Mine to a spatial location. Yes
Geoscience Victoria - http://geology.data.vic.gov.au/services/earthresourceml/wfs

Geoscience Western Australia - http://geossdi.dmp.wa.gov.au/services/wfs

Primary Industries and Resources South Australia - https://sarigdata.pir.sa.gov.au/ergrid/geoserver/wfs

Northern Territory Geological Survey - http://geology.data.nt.gov.au/geoserver/wfs

Mineral Resources Tasmania: - http://www.mrt.tas.gov.au/web-services/wfs

Department of Primary Industries New South Wales: - http://gsnsw.arrc.csiro.au/gsnsw-earthresource/wfs

Where is it used?

The AuScope Portal is a web based GIS portal for displaying spatial data sets like ERML. To see it in action please visit the portaland click on any of the red markers.

erml-auscope-portal.png

NSW_ERML.png

-- JoshVote - 31 May 2012

-- JesseRobertson - 07 Jul 2014

-- VincentFazio - 18 Feb 2016
Topic attachments
I Attachment Action Size Date Who Comment
EarthResourceML_V1_AuScope_Profile.jpgjpg EarthResourceML_V1_AuScope_Profile.jpg manage 314 K 31 May 2012 - 07:14 JoshVote  
NSW_ERML.pngpng NSW_ERML.png manage 493 K 07 Jul 2014 - 07:50 VictorTey  
erml-auscope-portal.pngpng erml-auscope-portal.png manage 582 K 31 May 2012 - 08:30 JoshVote  
Topic revision: r9 - 19 Feb 2016, VincentFazio
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback