-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with location encoding #1971
Comments
This may not be an issue with the software but could be an issue with the documentation site under "Creating Entities", which for Locations provides guidance that does not match the example in the STA standard document. This guidance has evidently been followed by many of the USA endpoints as well as BRGM and BGS. Perhaps in the sensorthings standard repo we can consider an amendment to the standard that says a valid feature of the specified encoding must be supplied. As it stands it's possible to create a client that behaves differently with two endpoints that both nominally comply with the STA spec but encode the "geo+json" location differently And perhaps FROST can attempt to validate such encodings on entity creation |
Any valid GeoJSON would be correct, if the encodingType is application/geo+json:
Both a full Feature and just a Geometry match the encodingType and are correct. Technically, a FeatureCollection would also be allowed, but that would be semantically incorrect... The PostGIS function ST_GeomFromGeoJSON doesn't support Feature objects, only Geometry objects, so if FROST detects a full feature it will extract the Geometry from it and use that for its spatial index column. The SensorUP docs also use direct Geometry objects: Most GeoJSON client libraries have no trouble dealing with either form, though it may be annoying to users that both forms are allowed. |
On the other hand, with JSON-FG the full-feature form will have to be used, since it can contain both a |
I believe the way the geometry is being represented in the Location and FoI entities is wrong, or maybe its an ambiguity in the STA standard spec, but the way it's done here is different from hydroserver2.
Compare https://beta.hydroserver2.org/api/sensorthings/v1.1/Locations('dfbbf648-88e3-45fc-85e9-5204cfad4fcc'):
to the example in the STA docs
to the way FROST encodes:
https://ogc-demo.k8s.ilt-dmz.iosb.fraunhofer.de/FROST-Server/v1.1/Locations(2)
As far as I know most clients are built on FROST but, other implementations that are more compliant with the spec won't work with those clients (namely one we are working on that surfaced this problem) because FROST isn't actually presenting GeoJSON within the 'location' element, but just GeoJSONish geometry
The text was updated successfully, but these errors were encountered: