To introduce location metadada, documentation says "Note that you can use different attributes to specify the location in different entities, e.g. entity "Car1" could be using "position" attribute, while entity "Phone22" could use attribute "coordinates".". That is, the attribute name could be any name, the type could be any string. The name of metadata is free?
1 Answers
Regarding "custom" user metadata (i.e. metadata which Orion doesn't interpret itself, to be generated and consumed by the application interacting with Orion), names are free. You can use whatever string you want, except the ones reserved for metadata to which Orion gives a special semantic, such "ID" and "location". However, note that "custom" metadata persistence is not yet an implemented feature (see https://github.com/telefonicaid/fiware-orion/issues/252). We plan to do it in a next version (probably Orion 0.13.0). I'd recomend you to subscribe to that issue in GitHub, as we will close the issue as soon as the feature gets implemented.
Regarding the "location" metadata (which is described in the following section in the manual: https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_User_and_Programmers_Guide#Geolocation_capabilities) the metadata name is not free (it must be "location"). What is free is the attribute name to which the metadata it is attached (in the example above, these are the "position" and "coordinates" alternatives mentioned). In addition, note that although the attribute name is free, there is a fixed syntax:
The value of the location attribute is a string with two numbers separated by a comma (","): the first number is the latitude and the second is the longitude. Only decimal notation is allowed (e.g. "40.418889"), degree-minute-second notation is not allowed (e.g. "40°44'55''N").