This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
BONUS Innovation 2012 Grant identifier: BONUS call2012inno-38
FerryScope D1.2 Rflex WFS API Reference Finish Environment Institute
ii v1.0, 31.03.2015
Change log
Version Date Revised by Change Authors
0.1 07.08.2014 - First internal release Kervinen, Simis, Keto
0.2 30.09.2014 - Introduction and data description
Corrections to ship codes
Simis
0.3 07.10.2014 - Finished edits to document format, added table of contents, introduction, data fields description, and data filtering procedures, references.
Content complete
Simis
0.4 31.03.2015 - Format with Deliverable template Boettcher
0.5 09.04.2015 - General project summaries Simis
1.0.1 09.04.2015 - Added WFS client information Boettcher
1.0.2 10.04.2015 - Added description of new combined algaline+ferrybox feature type
Kervinen
1.0.3 13.04.2015 - Added field descriptions of new feature type Simis
1.0.5 16.04.2015 Boettcher D1.2 release for BONUS upload -
This report may be cited as:
Kervinen, M., S.G.H.Simis, V.Keto, M. Boettcher. 2015. Rflex WFS API Reference. FerryScope D1.2, Version 1.0
FerryScope: Bridging the divide between satellite and shipborne sensing for Baltic Sea water quality assessment
Consortium:
Brockmann Consult GmbH (BC), Germany
Finish Environment Institute (SYKE), Finland
Estonian Marine Institute (EMI), Estonia
Grant identifier:
BONUS call2012inno-38
Finish Environment Institute FerryScope D1.2 Rflex WFS API Reference
6.3 Decoding the Rrs data ........................................................................................................ - 11 -
7 Known issues ............................................................................................................................. - 12 -
Appendix A Rflex Client for Python (retrieve-rrs.py) ......................................................................... - 13 -
Finish Environment Institute FerryScope D1.2 Rflex WFS API Reference
v1.0, 31.03.2015 - 1 -
1 Introduction
1.1 Purpose and scope
This document describes the functionality of the FerryScope Web Feature Service which serves a
combination of remote-sensing reflectance (Rrs) and time-matched flow-through ferrybox data. It is
intended as a quick reference to start harvesting data from this service. The service is hosted by
SYKE. BC operates a client that uses the data in a matchup flow against satellite imagery.
1.2 References
The following documents are referenced in this document.
ID Title Issue Date
[Simis
and
Olsson
2013]
Simis, S. G. H., and J. Olsson. 2013. Unattended processing of shipborne hyperspectral reflectance measurements. Remote Sens. Environ. 135: 202–212. [doi: 10.1016/j.rse.2013.04.001]
2013
1.3 Terms and acronyms
The following acronyms are used in this document.
Acronym Expansion
OGC Open Geospatial Consortium
WFS Web Feature Service
MSFD Marine Strategy Framework Directive
1.4 Document overview
After this formal introduction
Section 2 Overview of FerryScope, Rflex, and the Rrs data service.
Section 3 Defines the Rflex data service, access points, and data served
Section 4 Describes the graphical user interface to access Rrs data
Section 5 Describes the WFS machine-to-machine interface
Section 6 Defines the data structures of the features provided by the service
Section 7 Lists known issues of the service
FerryScope D1.2 Rflex WFS API Reference Finish Environment Institute
- 2 - v1.0, 31.03.2015
2 Overview
2.1 The FerryScope project
FerryScope addresses two major concerns in the remote sensing of optically complex waters: (1) high
ambiguity in inverting remotely sensed signals to water quality parameters, and (2) significant
uncertainty in the atmospheric correction of the top-of-atmosphere recorded radiance. FerryScope
links highly automated water quality parameter measurements collected from merchant vessels at 3-
5 m depth with high-volume processing of satellite data, to produce regional water quality estimates
with unprecedented product confidence. SYKE develops the in situ observation network. Brockmann
Consult provides automated matchup-analysis and develops tools for user uptake of combined
satellite and in situ data. EMI develops demonstration products and leads research tasks that
increase our understanding of the bio-optical variability in the sea.
2.2 Rflex hyperspectral reflectance measurements
The Baltic Sea already has an extensive network of ship-based monitoring from 7 ferry transects,
covering all Baltic Sea basins. These systems sample at approximately 200 m horizontal resolution
from 3-5 m depth, which is under all but severely stratified conditions representative of surface
waters. Temperature, salinity, turbidity, and fluorescence by phytoplankton pigments chlorophyll-a
and phycocyanin (in summer) are obtained. Quality assurance of the existing ferrybox measurements
as well as laboratory-based analyses (nutrients, phytotaxonomic analysis) is supported with
automated water sample collection. The ferryboxes are thus an ideal platform to delineate horizontal
patterns in several MSFD indicators such as eutrophication, biodiversity, and water transparency.
Recently, a hyperspectral remote-sensing reflectance (Rrs) platforms was developed for automated
deployment in the FP7 PROTOOL project (Figure 2-1-Figure 2-2). A first system was tested in ESA-
Balmon while FerryScope implements the system on two ferries covering long routes across the
Baltic Sea, both spending 4-5 days per week at sea. FerryScope further improves the automation
aspect of data quality control and develops a set of data interfaces, which are described in this
document.
Figure 2-1 Rflex platform installed on M/S Finnmaid (Finnlines)
Figure 2-2 Rrs spectra collected with Rflex on the Baltic Sea
Finish Environment Institute FerryScope D1.2 Rflex WFS API Reference
v1.0, 31.03.2015 - 3 -
3 The Rflex data service
This section defines the Rflex WFS and the data served by this service. A schematic overview of Rflex
and subsequent processing is shown in Figure 3-1.
Figure 3-1 Schematic overview of the Rflex platform (bottom section) and subsequent data flows.
The service supports only single coordinate reference system (EPSG:4326) and single output format (GML). The number of returned features per request is limited to 5000.
Second block, only 24 entries left but count=100 can still be used http://ferryscope.ymparisto.fi/Rflex/services/RflexWFS?service=wfs&request=GetFeature&version=2.0.0&storedquery
Retrieve full set at once for comparison http://ferryscope.ymparisto.fi/Rflex/services/RflexWFS?service=wfs&request=GetFeature&version=2.0.0&storedquery
<rflex:al_timemin>2014-06-15T09:35:36</rflex:al_timemin> Start time of the Alg@line measurements
<rflex:al_timemax>2014-06-15T09:36:20</rflex:al_timemax> End time of the alg@line measurements
<rflex:al_num>3.0</rflex:al_num> Number of averaged Alg@line measurements
<rflex:al_sochlfl_avg>2.48</rflex:al_sochlfl_avg> Mean chlorophyll-a fluorescence (mg m-3)
<rflex:al_sochlfl_sd>0.05196152422705705</rflex:al_sochlfl_sd> Standard deviation of previous
<rflex:al_soflow_avg>3.15</rflex:al_soflow_avg> Mean flow rate (L min-1)
<rflex:al_soflow_sd>0.050000000000030555</rflex:al_soflow_sd> Standard deviation of previous
Finish Environment Institute FerryScope D1.2 Rflex WFS API Reference
v1.0, 31.03.2015 - 11 -
<rflex:al_sopcfl_avg>0.11766666666666666</rflex:al_sopcfl_avg> Mean Phycocyanin fluorescence (arbitrary units)
<rflex:al_sopcfl_sd>0.0015275252316519533</rflex:al_sopcfl_sd> Standard deviation of previous
<rflex:al_sosal_avg>5.5760000000000005</rflex:al_sosal_avg> Mean of Salinity (PSU)
<rflex:al_sosal_sd>0.0017320508053823734</rflex:al_sosal_sd> Standard deviation of previous
<rflex:al_sotemp_avg>11.604999999999999</rflex:al_sotemp_avg> Mean of Temperature in flow system (°C)
<rflex:al_sotemp_sd>0.015099668870302736</rflex:al_sotemp_sd> Standard deviation of previous
<rflex:al_soturb_avg>1.05</rflex:al_soturb_avg> Mean of Turbidity (STU)
<rflex:al_soturb_sd>0.027712812921095863</rflex:al_soturb_sd> Standard deviation of previous
<rflex:al_soxtemp_avg>11.231</rflex:al_soxtemp_avg> Mean of Hull Temperature system (°C)
<rflex:al_soxtemp_sd>0.13322537295889827</rflex:al_soxtemp_sd> Standard deviation of previous
</rflex:RrsFerryboxMeasurement> End of this Rrs FerryboxMeasurement
</wfs:member> End of this feature
6.3 Decoding the Rrs data
The Rrs spectrum is represented in the XML response as a
hexadecimal string of double-precision floating point numbers (big-
endian byte order). The number of measurements is given in the
rrslen-property of the feature, normally 193.
6.3.1 Python (assuming big-endian environment) r = '000000000000F8FF0AC3F…'
rhex = r.decode("hex")
import struct
rrs = struct.unpack('d'*193,rhex)
A dedicated python client for Rflex which retrieves data from the WFS and takes care of dividing
requests according to the size of the result set, is included in Appendix A.
6.3.2 Matlab on windows (little-endian environment)
For little-endian environments the response string needs to be manually reordered to swap byte-
order without truncation problems. Matlab’s built-in swapbytes(hex2num(X))may truncate some values
and result in invalid spectra, so we need to flip the bytes manually, which is done in the for loop
below:
s = '000000000000F8FF0AC3F…’; %truncated for readability
n = 193;
X = reshape(s,16,n)';
Rrs = zeros(n,1);
for ii = 1:n,
x = X(ii,:);
y = fliplr(reshape(x,2,length(x)/2)')';
ss = fliplr(y(:)');
Rrs(ii)=hex2num(ss);
end
FerryScope D1.2 Rflex WFS API Reference Finish Environment Institute
- 12 - v1.0, 31.03.2015
7 Known issues
There are a few known issues of the Rflex WFS. They refer to the system state at 2014-08-06 based
on degree 3.4-pre14.
WFS 2.0.0 sortBy parameter is not respected
Workaround: Use stored query RflexAPI which provides sorted data or send xml-formatted request with the following rule. Full examples are available in the query portal.