Comments (6)
That's not possible, unfortunately. You will have to put the location in the FeatureOfInterest of the Observation, or update the Location of the Thing.
from frost-server.
I put location in FeatureOfInterest of the Observation. I am trying to use geospatial function like below. But getting error response with status code 400.
http://localhost:8080/SensorThingsService/v1.0/Datastreams(41)/Observations?$expand=FeatureOfInterest($filter=geo.distance(FeatureOfInterest/feature, geography'POINT (103.83233428 1.3037227)') gt 100)
(or)
http://localhost:8080/SensorThingsService/v1.0/Datastreams(41)/Observations?$expand=FeatureOfInterest($filter=geo.distance(feature, geography'POINT (103.83233428 1.3037227)') gt 100)
Response for both request:
Unexpected 'I'
from frost-server.
What version are you using? With your queries I get
Illegal operation: Could not convert parameter of type com.querydsl.core.types.dsl.StringPath to type com.querydsl.spatial.GeometryExpression
because we've got a bug in the FoI filter...
That said, I don't think your query expresses what you want to do.
v1.0/Datastreams(41)/Observations?$expand=FeatureOfInterest($filter=geo.distance(feature, geography'POINT (103.83233428 1.3037227)') gt 100)
This query fetches all observations for Datastream 41, and then for each Observation, expands the FoI, but only if that FoI is further away than 100 units.
So you always get all Observations, but only for some the FoI.
You probably want this query:
v1.0/Datastreams(41)/Observations?$expand=FeatureOfInterest&$filter=geo.distance(FeatureOfInterest/feature, geography'POINT (103.83233428 1.3037227)') gt 100
Fetch all Observations, filtered by distance, and expand the FoI.
That also currently gives the same error, due to the bug I mentioned.
from frost-server.
Filtering on FeatureOfInterest/feature now works.
from frost-server.
Thank you. I took changes and tested. Working fine. Version 1.2-SNAPSHOT.
from frost-server.
Excellent.
from frost-server.
Related Issues (20)
- Database auto-update for Basic Authentication does not work under some conditions HOT 3
- Helm chart bug: Mqtt not using external db connection string when frost.db.enableIntegratedDb is set to false HOT 4
- Server Error 500 when trying to patch a thing HOT 2
- Redirect URI not using `serviceRootUrl` HOT 3
- persistence_idGenerationMode_<ENTITY> is not applied HOT 5
- The phenomenonTime field on a MultiDatastream is updated based on the resultTimes, not the expected phenomenonTimes. HOT 1
- [Issue]SensorThings API with Tomcat 10 HOT 3
- GEOM column in Locations is sometimes created as NULL causing issues on the REST-API
- InternalMessageBus errors on fraunhoferiosb/frost-server-http HOT 5
- [Docker Image] Failed to initialize PostgreSQL DB HOT 10
- [Question]Can STA check duplicate data? HOT 1
- Disapperaing properties with empty string as value HOT 2
- Change Datastream/observationType to enum and check its values
- FROST Server very slow on large requests HOT 5
- Database is not using PhenomenonTime-Index HOT 5
- Issue With Authentication with FROST Server HOT 1
- Inconsistency in current Location of a Thing when Historical Locations are deleted or updated HOT 1
- Issue querying FROST-Server with umlauts in name HOT 4
- Query performance issues on Observations with plugins_coreModel_idType LONG HOT 3
- Using batch createObservations failed HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frost-server.