gkjohnson/three-geojson
关于
Three.js shape loaders for GeoJSON and WKT formats
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文three-geojson

Three.js shape loaders for GeoJSON (readable html) and WKT formats. Supports generation of three.js line geometry in addition to flat and extruded tringulated meshes. All generated geometry are transformed and centered using 64-bit Javascript floating point operations with meshes are offset to retain precision in GPU operations.
Uses @turfjs/unkink-polygon, @mapbox/delaunator, @kninnug/constrainautor, and @placemark/betterknown packages for polygon triangulation and WKT parsing. World GeoJSON file courtesy of geojson-maps.
Some key features supported by this project:
- Support for detecting and fixing self-intersecting polygons so they tringulate correctly.
- Uses constrained delaunay triangulation for correct, high quality triangulation and support for inner vertices.
- Smooth surface normals are generated for ellipsoid-projected shapes.
- Outputs centered geometry with and matrix transform offset to avoid preceision-related artifacts on CPU and GPU when processing high-detail shapes.
- Supports altitude values.
[!NOTE] This project is not hosted on npm and must be installed via Github repository.
Examples
Installation
npm install github:@gkjohnson/three-geojson
Use
// load the content
const result = await new GeoJSON().loadAsync( url );
// extract polygon lines and project them onto the globe
const transformer = new GeoJSONTransformer();
result.polygons.forEach( polygon => {
const line = polygon.getLineObject();
transformer.transformObject( line );
scene.add( line );
} );
API
See the docs site for full API documentation.
The same documentation is also available as markdown in API.md.
探索相关项目
加载中…