0

I'm using the ArcGIS Online REST API to add/delete features from a 3D web layer. I'm able to POST linestrings to the layer.

But, seemingly randomly, some (not all) of the linestrings get converted to multilinestrings. And when they do get converted, there are less points and their z elevation values are set to 0 ?! (when they're not converted, the z values are fine and map well to a local Scene)

I know they're converted because after I POST the linestrings, I download the layer data and review.

Here is a sample POST (the original linestring has 20 points):

{
  "geometry": {
    "hasZ": true,
    "hasM": false,
    "paths": [
      [
        [
          -122.18396,
          37.7475538,
          84
        ],
        [
          -122.183954,
          37.7475596,
          84.1
        ],
        [
          -122.183955,
          37.7475597,
          84
        ],
        [
          -122.183954,
          37.7475596,
          84.2
        ],
        [
          -122.183955,
          37.7475597,
          84
        ],
        [
          -122.183955,
          37.7475597,
          84
        ],
        [
          -122.183954,
          37.7475596,
          84.1
        ],
        [
          -122.183955,
          37.7475597,
          84
        ],
        [
          -122.183955,
          37.7475597,
          84
        ],
        [
          -122.183949,
          37.7475596,
          84.3
        ],
        [
          -122.183949,
          37.7475597,
          84
        ],
        [
          -122.183949,
          37.7475596,
          84.3
        ],
        [
          -122.183949,
          37.7475597,
          84
        ],
        [
          -122.183949,
          37.7475596,
          84.3
        ],
        [
          -122.183949,
          37.7475596,
          84.3
        ],
        [
          -122.183949,
          37.7475596,
          84.3
        ],
        [
          -122.183949,
          37.7475597,
          84
        ],
        [
          -122.183949,
          37.7475596,
          84.3
        ],
        [
          -122.183949,
          37.7475597,
          84
        ],
        [
          -122.183978,
          37.7475482,
          89
        ]
      ]
    ],
    "spatialReference": {
      "wkid": 4326
    }
  },
  "attributes": {
    "id": "07JDD3P00100TV",
    "model": "Phantom 4",
    "Detectiontime": "2019-08-08T17:27:17Z"
  }
}

and then here it is converted to a multilinestring (only 11 points?) w/ 0 as the z values:

 {
  "type": "Feature",
  "id": 1,
  "geometry": {
    "type": "MultiLineString",
    "coordinates": [
      [
        [
          -122.183957302425,
          37.7475564076597,
          0
        ],
        [
          -122.183949241999,
          37.7475596040345,
          0
        ],
        [
          -122.183948999999,
          37.7475596000012,
          0
        ],
        [
          -122.183948999999,
          37.7475596999999,
          0
        ],
        [
          -122.183949241999,
          37.7475596040345,
          0
        ],
        [
          -122.183955000002,
          37.7475596999999,
          0
        ],
        [
          -122.183954000001,
          37.7475596000012,
          0
        ],
        [
          -122.183957302425,
          37.7475564076597,
          0
        ]
      ],
      [
        [
          -122.183960000004,
          37.7475538000011,
          0
        ],
        [
          -122.183957302425,
          37.7475564076597,
          0
        ],
        [
          -122.183978000004,
          37.7475482000014,
          0
        ]
      ]
    ]
  },
  "properties": {
    "OBJECTID": 1,
    "id": "07JDD3P00100TV",
    "model": "Phantom 4",
    "Detectiontime": "Thu, 08 Aug 2019 17:27:17 GMT",
    "GlobalID": "e7a29f56-90a5-484d-be77-3aef40dc9a7d"
  }
},

The original layer was created in ArcGIS Pro. There's a setting just before you share it as a web layer to set the default z value. Curiously the same points that get set to 0 will get set to 99 if I set this to 99.

  • 1
    Please use the edit button beneath your question to revise it with any additional relevant information. – PolyGeo Sep 6 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.