Comments (14)
A Thing can only have 1 real-world location. Therefore, if you add a new Location to a Thing, the old location is automatically removed.
A Thing can have multiple Location entities, but they have to be different encodings of the same real-world location.
To link these multiple Location entities to the Thing, you have to link them all in the same request.
from frost-server.
Hi,
Thanks for replying. I've tried create new Things through Postman and link to two existed location as below.
However, I'd like to create Thing and also create two new Locations link it at the same times. I'd try to POST like this:
But the "test2" Location just automatically overwrite "test1" Location.
Am I missing something?
Thanks for any advices!
from frost-server.
Your test2 JSON is not valid.
A JSON object is a set of key-value pairs, and each key is only allowed to exist once. Your test2 JSON has the key "Locations" twice, and thus only one of the two is ever available.
from frost-server.
Hi,
Successfully create. However, it seems to be considered as one Location with two kinds of descriptions.
How can I create two different Locations Object just in one request.
Thanks for answering.
from frost-server.
That JSON looks fine to me. Locations is an array, with two objects in it.
If you format your JSON properly it'll be easier to recognise.
from frost-server.
Thanks a lot. The problem is fixed.
from frost-server.
Hi,
Now with the Multiple Location, it seems that Observation can't automatically link Location as it's FeatureOfInterest.
How can I let the server automatically use the first Location object in Location Array as the Observation's FeatureOfInterest?
Thanks for answering.
from frost-server.
Hmm, it seems it fetches the first Location it finds in the database. If that happens to be one of the non-geoJSON Locations, it'll fail. Which error message do you get?
from frost-server.
This is how the Locations Table looks like in my PostgreSQL:
And the error code was "HTTP code 500", using Eclipse :
from frost-server.
Ok, that's the client side error, do you happen to have the server-side exception from the server logs?
from frost-server.
It should work in the master branch now.
from frost-server.
Thanks for fixed it, the problem of FeatureOfInterest was solved.
However, there's something bad happened.
As the pic shows, the Location which was selected to be Observation's FeatureOfInterest disappeared in the /v1.0/Location, but it still remain in postgre's Location Table.
from frost-server.
Can you add an orderby to that query, to make sure it isn't somewhere else in the result set? Without an explicit orderby you never know which oder PostgreSQL gives you the results.
from frost-server.
Oh, I found it when I orderby "@iot.id". Thanks a lot !!
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.