Hi,
I might sound very naive, but kindly bare with me I am very new to cesium.
I have some shapefiles having polygons(buildings) with height as one of its attributes. I was able to successfully extrude it by converting it to Geojson and passing it to GeoJsonDataSource.
But for some shapefiles the polygons are rendered all over the globe (see attachment). I think the problem is with the projection system of the shapefile. Using qgis I was able to change its CRS to WGS84 and then it worked fine. But I want to change the CRS on the web itself rather than changing it using some GIS tool. Is there a way I can convert I can do this in cesium?
If its not possible I was thinking of using proj4js library to do the conversion, but I don’t know how can I get the geometry/coordinates of the polygons from the entity.polygon object?
This is the code that i am using for extrusion.
dataSource.load(geojson).then(function() {
var entities = dataSource.entities.values;
for (var i = 0; i < entities.length; i++) {
var entity = entities[i];
var color = Color.White;
entity.polygon.material = color;
entity.polygon.fill=true;
entity.polygon.outlineColor = Color.BLACK;
//Attribute for the height:
entity.polygon.extrudedHeight = 3.5*entity.properties.HT_RANDOM;
}
});