Cesium Tutorial (9): Loading Geometry Files

In 2D GIS, there are many vector data formats, such as shapefile (SHP), DWG, KMZ/KML, GeoJSON, etc. The complex structure of Shapefile files will bring pressure to network transmission, so Cesium mainly uses GeoJSON and KML, two data formats suitable for network transmission, to store geometric shapes. Here is how to use GeoJSON and KML.

1、GeoJSON

GeoJSON is a JSON data format that encodes various geographic data structures. GeoJSON objects can represent geometry, features, or feature collections. The supported geometry types are point, line, area, multipoint, multiline, multisurface, and geometry collection.

GeoJSON data can be obtained through Alibaba Cloud DataV , after selecting a certain range, just copy the url of the data.

 What I choose here is the data of Wuhan area

code writing

const viewer = new Cesium.Viewer("cesiumContainer",{
    imageryProvider: Cesium.createWorldImagery({
        style: Cesium.IonWorldImageryStyle.AERIAL_WITH_LABELS,
    }),
    }     
);
co

Guess you like

Origin blog.csdn.net/WwLK123/article/details/131018332