Difference between revisions of "Observation enrichment"

From AMTech WikiDocs
Jump to: navigation, search
(Geolocation substitution)
(Geolocation substitution)
Line 16: Line 16:
  
 
* <code>#{country}</code> or <code>#{country_code}</code>
 
* <code>#{country}</code> or <code>#{country_code}</code>
* #{state} or </code>#{province}</code>
+
* <code>#{state}</code> or </code>#{province}</code>
* #{postcode} or #{postal code} or #{zip code}
+
* <code>#{postcode}</code> or <code>#{postal code}</code> or <code>#{zip code}</code>
* #{city} or #{town}
+
* <code>#{city}</code> or <code>#{town}</code>
* #{suburb} or #{residential} or #{city_district} or #{municipality} or #{neighbourhood}
+
* <code>#{suburb}</code> or <code>#{residential}</code> or <code>#{city_district}</code> or <code>#{municipality}</code> or <code>#{neighbourhood}</code>
  
 
=== Proximity updates ===
 
=== Proximity updates ===

Revision as of 10:21, 14 March 2016

The enrichment of observations is a group of actions and/or replacements that take place over an observation in the process of delivering it ot its final destination or topic. They are placeholder substitutions, geolocation substitutions, proximity updates.

Placeholder substitution

A placeholder is a string with format #{placeholder_name} than can be used in certain fields of an observation where the placeholder substitution takes place. Actually there are three fields where this kind of substitution is considered:

  • topic
  • producer
  • targetthings

Some substitutions occur in the process of building the observation in applications in the edge like the M2MBridge and others occur after the observation is sent to the AMTech's platform. This is mostly geolocation substitutions which is a special kind of placeholder substitution.

Geolocation substitution

This is about doing placeholder substitution of a group of geolocation attributes than can be determined by using the location field of an observation. Based on the WKT that is given in the location field, a process of reverse geolocation is run and the address is determined when possible. These fields are then replaced if they appear in the topic, producer or targetthings fields of the original observation JSON.

  • #{country} or #{country_code}
  • #{state} or </code>#{province}</code>
  • #{postcode} or #{postal code} or #{zip code}
  • #{city} or #{town}
  • #{suburb} or #{residential} or #{city_district} or #{municipality} or #{neighbourhood}

Proximity updates