linked-places-format icon indicating copy to clipboard operation
linked-places-format copied to clipboard

Properties changing in time

Open damylen opened this issue 4 years ago • 2 comments

Is it possible to use linked-places to only change the properties for a specific time period? In my case the geometries stay the same (municipalities) and I only want to change some sensor data, stored in properties.

damylen avatar Apr 05 '20 17:04 damylen

An interesting question and food for thought. As I understand, this would involve including a when element within one or more of a Feature's properties, e.g. something like:

"features": [
  { "@id": "http://mygaz.org/places/p_12345",
    "type": "Feature",
    "properties":{
      "title": "Abingdon (UK)",
      "ccodes": ["GB"],
      "mymeasure": [
      	{ "value": 12.34, 
      	  "when": {"timespans":[{"start":{"in":1832}}]}
      	},
      	{ "value": 34, 
      	  "when": {"timespans":[{"start":{"in":2020}}]}
      	}
      ]
    },

From the standpoint of the GeoJSON spec, this is perfectly valid -- and it would not break implementations supporting GeoJSON or Linked Places. See popup boxes in this gist.

What to do with that data would be up to individual software applications...but that is the same issue with many other elements within Linked Places. For example, if such a dataset were uploaded to @WHGazetteer, the mymeasure property would be ignored.

HTH.

kgeographer avatar Apr 12 '20 16:04 kgeographer

Thank you for your thoughts.... Had something similar in mind. From a performance perspective there would be a reason not to include the 'when' for each property, especially if you many features, with many properties that refer to the same dates.

Your issue with software applications is real. When implementing this in Mapbox (JS/GL), I noticed that they only support primitive types as property values. So a nested JSON object is serialized a string.

damylen avatar Apr 12 '20 18:04 damylen