-
I have a csv file and terria map draw the point shape only. How to tell the terria map draw other shape (Ex Cesium Entity) and change color base on value from csv file ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @LHKode, Good question. I'll try to answer them in parts.
It is currently not possible to replace a CSV point with custom Cesium entity. Although not what you maybe looking for, we can use CZML for styling GeoJSON/Shape files. In this example, each tree is a Shapefile point styled as a Cesium billboard image and scaled using its height property. The catalog definition looks something similar to below: {
"name": "Trees",
"type": "geojson",
"url": "example.org/trees.shp",
"czmlTemplate": {
"billboard": {
"disableDepthTestDistance": 0,
"height": {
"reference": "#properties.max_height"
},
"heightReference": "CLAMP_TO_GROUND",
"horizontalOrigin": "CENTER",
"image": "/images/tree.png",
"scale": 1,
"scaleByDistance": {
"nearFarScalar": [0, 1, 10000, 0.0001]
},
"show": true,
"sizeInMeters": true,
"verticalOrigin": "BOTTOM",
"width": {
"reference": "#properties.diameter"
}
}
}
} Some documentation on the property
If you only want to change color or size of the points in a CSV (without using a custom entity). This is currently possible. The exact definition will depend on whether your CSV data is continuous or discrete. In this example, we style individual power stations based on the selected display variable. You can check its catalog definition here. With CSV, it is also possible to use Maki icons to style individual points. Here is an example where I replace each point with a
Note that the style editor might be a bit hard to understand at first as it was primarily designed as developer tool but it exposes a lot of options. Happy to help further with any questions. If it is possible, please do share some sample data that you are trying to style. |
Beta Was this translation helpful? Give feedback.
Hi @na9da
Thanks for your useful answer !!!
It helps me alot. Really look forward to this helpful implementation of this feature.