Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3d polygon #687

Open
samareshdasglobal opened this issue Jun 21, 2024 · 2 comments
Open

3d polygon #687

samareshdasglobal opened this issue Jun 21, 2024 · 2 comments

Comments

@samareshdasglobal
Copy link

Hello,
I am trying to render polygons with altitude in TerriaMap. I have prepared a GeoJSON with a height property. During debugging, I noticed that the following code is executed, but it does not draw polygons in 3D shape. Using the same GeoJSON data, I am able to draw 3D polygons using CesiumJS.

entity.polygon.closeTop = new ConstantProperty(true);
entity.polygon.extrudedHeight = properties[this.heightProperty];
entity.polygon.height = properties[this.heightProperty];
entity.polygon.heightReference = new ConstantProperty(
HeightReference.CLAMP_TO_GROUND
);
entity.polygon.extrudedHeightReference = new ConstantProperty(
HeightReference.RELATIVE_TO_GROUND
);

@samareshdasglobal
Copy link
Author

Hello,
After some investigation and debugging, I noticed that 3D polygon drawing is implemented in TerriaJS. The only problem is that I couldn't find a way to set this.heightProperty dynamically.

@na9da
Copy link
Contributor

na9da commented Jun 26, 2024

Hi @samareshdasglobal - you could try setting the heightProperty in the catalog definition.

Example:

{
      "type": "geojson",
      "url": "https://data.melbourne.vic.gov.au/api/v2/catalog/datasets/2023-building-footprints/exports/geojson",
      "name": "Extruded buildings",
      "heightProperty": "structure_extrusion"
}

Here is a link to see it in action
(warning the dataset is huge so your browser might hang a bit while rendering).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants