DTDL - How to create object for location (lat,long)?

459 views Asked by At

I have DTDL model similar to below. I can use Json as string and store lat,long values. But,

How I can store lat,long array of locations using objects.

{
  "@id": "dtmi:DigitalTwins:BasicInfra;2",
  "@type": "Interface",
  "displayName": "BasicInfra interface model",
  "@context": "dtmi:dtdl:context;2",
  "contents": [
    {
      "@type": "Property",
      "name": "name",
      "schema": "string"
    },
    {
       "@type": "Property",
       "name": "location",
      "description": "Polygon/PolyLine Format Location",
       "schema": {
          "@type": "Object",
          "fields": [
                     {
                      "name": "x",
                      "schema": "double"
                     },
                     {
                      "name": "y",
                      "schema": "double"
                     }
                    ]
        }
    },
    {
      "@type": "Relationship",
      "name": "contains"
    }
  ]
}
1

There are 1 answers

0
SatishBoddu On

Thanks for posting this question.

We got a response from Microsoft's Product Team.

At the moment, we don't support arrays in properties.

Please follow Azure Digital Twins updates, blogs, and announcements to get latest information on upcoming features. Also Product Updates page.