Jagged Edges of extruded polygons

I had a 2d geojson data for a building floor-plan. I extrude each geometry using height attribute. Issue is that the all the edges come jagged. How can I improve the quality of map?

code to display viewer:
viewer = new Cesium.Viewer('cesiumContainer', {
        baseLayerPicker : false,
        infoBox : false,
        selectionIndicator : false,
        shadows: true,
        vrButton: false,
        geocoder: false,
        homeButton: false,
        sceneModePicker: false,
        timeline: false,
        navigationHelpButton: false,
        navigationInstructionsInitiallyVisible: false,
        scene3DOnly: false,
        resolutionScale: 2.0,
        skyAtmosphere: false,
        animation: false,
        //mapProjection: new Cesium.WebMercatorProjection(),
        sceneMode: Cesium.SceneMode.SCENE3D

code to extrude polygon
    var promise = Cesium.GeoJsonDataSource.load(geoJsonUrl);
    promise.then(function(dataSource) {

        //Get the array of entities
        var entities = dataSource.entities.values;
        var colorHash = {};
        for (var i = 0; i < entities.length; i++) {
            var entity = entities[i];
            var geom = entity.polygon;
           geom.height = entity.properties.bhght + 0.1;
           geom.extrudedHeight = entity.properties.hght + 0.1;



I couldn’t reproduce this. Could you give me an example with some sample data?

Also, what OS and browser are you using?




Sorry for the late replay. Let me explain in more detail.

See the snapshot below, especially doors in brown color. The doors are extruded polygons. As you can see, the standing line is not straight. Why is it so? I got no improvement by giving resolution scale of 2.

I am sharing my sample geojson and sample test code.

Browser: Chrome Version 56.0.2924.87 (64-bit), OS: Windows 10 (more details in snapshot)




samplecode.zip (54.5 KB)


Sorry, but I don’t have a good fix for this. I think it’s just an artifact because the polygon is intersecting with the wall.


Thanks for the reply Hannah, but the issue even comes when I don’t draw the wall at all. The sample data provided by me doesn’t contain any wall.

According to me the issue comes whenever the vertical line of door is not perpendicular to the floor.

Thanks again for your time.


The jagging doesn't come at all Microsoft Edge.
The jagging got mitigated when I installed latest version of Chrome Version 56.0.2924.87 (64-bit) for Windows.
I suspect this is connected with anti-aliasing in Chrome.