Get czml building at certain height

I want to get 3D buildings on top of the terrain for which I have the Elevation data for the buildings.

I wrote czml code like following:

{

  "id": "1",

 "description": "Building Height:24.600(m)",

"polygon": {

       "extrudedHeight": {

                "number": 24.600

           },

         "outline": {

               "boolean": true

    },

         "outlineColor": {

                  "rgba": [0,

                0,

                 0,

                 255]

       },

         "material": {

              "solidColor": {

                    "color": {

                                 "rgba": [255,

                              0,

                                 0,

                                 163]

                       }

                  }

          },

         "positions": {

             "cartographicDegrees": [78.39464257000003,

                 17.477616975000046,

                527.72000000000116,

                78.394779279000034,

                17.477647653000076,

                527.72000000000116,

                78.394808867000052,

                17.477550339000061,

                527.72000000000116,

                78.39466662600006,

                 17.477517146000082,

                527.72000000000116,

                78.39464257000003,

                 17.477616975000046,

                527.72000000000116]

        }

  }

}

``

But I am not getting the building at given cartographic altitude(527.72). The building is still sticking to the ellipsoid.

I have tried “polygon.height”, “polygon.perPositionHeight” properties but didn’t find correct way.

Help needed !

Hello,

You need to set both the height and extrudedHeight options. Try something like this:

“extrudedHeight”: 24.600 + 527.72,

“height”: 527.72,

And then for your positions.cartographicDegrees, just use the longitude and latitude coordinates.

Best,

Hannah

Thanks Hannah… That worked. But I would like to say that it seems a bit illogical in itself. Documentation also is confusing for this task.

Following lines worked,

“extrudedHeight”:{“number”:552.32},

“height”:{“number”:527.72},

Thanks, I submitted a fix for the documentation here: https://github.com/AnalyticalGraphicsInc/cesium/pull/3443

-Hannah