Orion geolocation feature involves an attribute, which value represents WGS84 coordinates and an associated metadata:
{"name":"location","value":"WGS84","type":"string"}
If the attribute itself keeps its value to WGS84 coordinates, could the metadata be modified (e.g. change its name to localizaciĆ³n or its type to coordinates) and keep the feature working? or this metadata is somehow hard coded and MUST be specified in that way?
Thanks
The fields of the metadata used to "mark" the attribute which means entity location work as follow:
The name cannot be freely chosen, it is fixed to location.
The type is not taken into account in the current Orion version (0.19.0) so can be freely chosen. However, we recommend to use string (as shown in the documentation).
The value cannot be freely chosen, it is fixed to WGS84. In the future, the set of available coordinates systems could grow but, by the moment (i.e. 0.19.0) this is the way it works.
Note the name of the attribute to which that metadata is associated can be freely chosen. The attribute name could be "location" (in this case it would match with the name of the metadata), "coordinates", or whatever you want.
Related
When I write multiple points with the same tag value, it only writes the first point to the database.
Is this a bug or must be different tag values when writing multiple points?
Thank you!
It is a feature, not a bug. You need to create unique points, otherwise non unique points are "deduplicated". See doc https://docs.influxdata.com/influxdb/v1.7/troubleshooting/frequently-asked-questions/#how-does-influxdb-handle-duplicate-points
A point is uniquely identified by the measurement name, tag set, and timestamp. If you submit a new point with the same measurement, tag set, and timestamp as an existing point, the field set becomes the union of the old field set and the new field set, where any ties go to the new field set. This is the intended behavior.
Help me to resolve the query for Dialogflow agent!
I've defined an entity called "ProgrammingLanguages" and assigned 2 different reference values with common synonyms like below :
Android - Mobile OS, Mobile Development, Google
iOS - Mobile OS, Mobile Development, Apple
Already defined a intent with parameter named "ProgrammingLanguages" along with isList selected "Yes"
Now when I ask my agent "Show me the list of mobile os", it always returns "Android" only! when I replaced the sequence for values inside entity, it started showing me "iOS", That means, it's always taking the first value and didn't show all the values with similar synonyms for that particular entity!
Could someone help me to understand this behaviour?
Thanks,
This will not work correctly. You cannot put same synonyms for different Entity values. If you are using the same synonyms that means the two entities are same.
isList is used to capture multiple values for a parameter like if I am collecting brand names of cars, my entity will be car_brands and user can provide single value or multiple like Ferrari, Benz, Bugati, BMW or only Suzuki.
If you ask your agent "Show the list of mobile os" that means, it should return Android and iOS. Entities are not used to return response values. They are used to capture category for which you want bot/agent to return value.
In your case,
create an Entity and put all the above synonyms under one say "mobileOS".
when the user uses synonyms, mobileOS will be the captured parameter.
use it to decide and return all the mobile OS.
You don't need to enable isList as you are not collecting a list of values from the user.
I'm having difficulty understanding the correct way to include validation information in a swagger file, when the validation logic can be dynamic (default, minValue, maxValue, etc.).
Consider the following example:
In a banking application, we a have a REST API for withdrawals. The withdrawal amount cannot be greater than the account value of the person taking the withdrawal. This value is going to depend on the context (Who's bank account we are withdrawing from) to get that maximum value. What is the correct/standard way to represent this information in a Swagger file?
The default/mininum/maximum/etc. values are static. OpenAPI/Swagger does not support parameter dependencies. You will need to document these restrictions verbally in the operation description and/or parameter description, and implement the logic yourself.
In OL2 feature id's were generated internally. In OL3 this doesn't seem to be the case since the id's are undefined. I have tried with WKT, JSON, and KML sources and none of them have id's assigned to features. Has the internal feature id been removed from OL3? If not what do I need to do to get the id's generated. I am requesting the id via:
feature.getId();
This is real problem for drag and drop since I don't have control over the files.
Cheers
No, OL3 does not generate any feature IDs.
When reading features, each Format may set the feature ID if it is defined according to the semantics of the format. For GeoJSON, it's the "id" member of the feature (not a property).
When creating new features, it's the responsibility of the application to set the features ID if necessary. Use the setId method of the feature. If using the Draw interaction, it's drawend event might be useful.
You should also note these facts about feature IDs in OL3:
No features with duplicate IDs may be in the same source. If you add a feature to a source where a feature with an equal ID exists, the new feature is ignored.
Feature IDs are compared as strings, so 1234 and "1234" are considered equal.
IDs are included when serializing features according to each Format's specification for feature identifiers.
I'm writing an iOS application that pulls events from a public Google calendar, pulls out the free-form "Location" field, and drops a pin on a map corresponding to the given location. I want to make the app as flexible as possible using some kind of string search or fuzzy matching algorithms, but I'm not sure where to begin.
There are several things a calendar moderator may enter into the Location field:
A building name and room number (e.g. Foo Hall Room 123)
A building abbreviation and room number (e.g. FOO 123)
A shorthand room or location name (e.g. Foo)
Currently, I have a sqlite database composed of one table, each row storing a latitude, longitude, full building name (Foo Hall), and standardized building abbreviation (FOO).
I want to take the moderator's free-form string and obtain the correct coordinates from the database (if present).
I've tried using LIKE '%FOO%' and similar patterns, as well as Levenshtein Distance, but I run into issues, for instance if the actual building name is "Example Foo and Bar Building" and the location entered by moderator is "Example Bar Building".
The three options I've considered are...
Force the moderator to enter in a standardized abbreviation or building name. This could potentially be a tedious process for the calendar moderators, so I'm trying to avoid this if possible.
Do a crude substring search that checks if the entered string is contained anywhere in the database string. This is what my university does on their website, but it obviously isn't very flexible.
Implement a more complex fuzzy string matching algorithm that provides maximum flexibility but will take an order of magnitude more time to implement. If the right one already exists, that would be the ideal solution!!
Which of these options (if any) seems the best? Is there a better alternative that I haven't thought of? Is there a library that does what I need and I just haven't found it yet?
Thanks in advance for any help!