You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're attempting to use the 52deg North Sensor Observation Service APIs provided by DEFRA UK-AIR (i.e. UK government air quality data service).
We're struggling to use the spatial filter feature of the GetObservation endpoint. It's throwing errors that I don't understand. I don't know whether this is user error, a problem with the 52deg North software, or a problem at caused by misconfiguration of the DEFRA system.
I don't know where the best place is to discuss problems with this system so I'll ask here. Please refer me to a more appropriate contact if you can.
I'm calling the API using HTTP requests in Python. I'm happy to share the code, but I'll summarise what I'm doing below.
These are the parameters I'm requesting (shown in JSON format for simplicity of presentation). This is send using the Key-value pair (KVP) binding.
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>An error occurred while querying feature identifiers for spatial filter!
[EXEPTION]:
could not extract ResultSet</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
We also get the same error when using the JSON binding.
The request is defined by OGC SOS 12-006 Requirement 116 -- KVP encoding and I've followed OGC 06-121r3 section 10.2.3 Bounding box KVP encoding:
A WGS 84 bounding box shall be KVP encoded in a corresponding parameter
value list, with the ordered listed values for the quantities:
LowerCorner longitude, in decimal degrees
LowerCorner latitude, in decimal degrees
UpperCorner longitude, in decimal degrees
UpperCorner latitude, in decimal degrees
crs URI = “urn:ogc:def:crs:OGC:1.3:CRS84” (optional)
Hello @Joe-Heffer-Shef ,
Thank you for providing the stack trace. It confirms that the issue is occurring during the decoding of the KVP request for the spatial filter, specifically within the GetObservationKvpDecoder.
Let's break down the stack trace:
Decoding Error: The presence of org.n52.sos.decode.kvp.v2.GetObservationKvpDecoder indicates that the SOS is failing to interpret the spatial filter parameters you've provided in the KVP request.
Security Filters: The numerous Spring Security filters suggest that authentication or authorization might be playing a role. It's possible that the request is being blocked or modified before it reaches the decoder.
Here's how we can investigate further:
KVP Formatting:
Carefully review the OGC specifications for bounding box encoding in KVP. Pay close attention to the order and format of the parameters (longitude, latitude, CRS URI).
Compare your request's KVP formatting with the examples provided in the SOS documentation (if available) or other working SOS implementations.
Try simplifying the spatial filter to a very basic bounding box to see if that works.
SOS Configuration:
Examine the 52North SOS configuration files, especially those related to KVP decoding and security.
Look for any settings that might be affecting the GetObservationKvpDecoder or the Spring Security filters.
Check for any custom configurations that might be overriding the default behavior.
Security Context:
If you have authentication enabled, ensure that your request is properly authenticated.
Investigate the Spring Security filter chain to understand how the request is being processed.
Temporarily disable security filters (if possible in a test environment) to see if that resolves the issue.
API Documentation:
Revisit the 52North SOS documentation for any specific requirements or limitations related to the GetObservation endpoint and spatial filtering.
Community Support:
Consider reaching out to the 52North SOS community or support channels for assistance. Provide them with the full stack trace and details of your request.
By systematically investigating these areas, you should be able to identify the root cause of the decoding failure. Remember to test changes incrementally and document your findings.
Hi,
We're attempting to use the 52deg North Sensor Observation Service APIs provided by DEFRA UK-AIR (i.e. UK government air quality data service).
We're struggling to use the spatial filter feature of the GetObservation endpoint. It's throwing errors that I don't understand. I don't know whether this is user error, a problem with the 52deg North software, or a problem at caused by misconfiguration of the DEFRA system.
I don't know where the best place is to discuss problems with this system so I'll ask here. Please refer me to a more appropriate contact if you can.
I'm calling the API using HTTP requests in Python. I'm happy to share the code, but I'll summarise what I'm doing below.
These are the parameters I'm requesting (shown in JSON format for simplicity of presentation). This is send using the Key-value pair (KVP) binding.
We also get the same error when using the JSON binding.
The request is defined by OGC SOS 12-006 Requirement 116 -- KVP encoding and I've followed OGC 06-121r3 section 10.2.3 Bounding box KVP encoding:
I'm finding that the provided examples don't work.
Sometimes I see this error:
The text was updated successfully, but these errors were encountered: