Skip to content

Cross platform GeoJSON exporter for three.js. Out of the box usable with react-three-fibre.

License

Notifications You must be signed in to change notification settings

prolincur/three-geojson-exporter

Repository files navigation

three-geojson-exporter

three-geojson-exporter is a cross platform GeoJSON file exporter for THREE.js. It takes any 2d object of three.js and converts it into GeoJSON FeatureCollection object. This library works out of the box with cross platform react-native and react-three-fibre as well.

Install

yarn add three-geojson-exporter three

or

npm i three-geojson-exporter three

Usage

import * as THREE from 'three'
import { GeoJsonExporter } from 'three-geojson-exporter'

const exporter = new GeoJsonExporter();
// exporter.setTransformCallback((worldVec3) => [worldVec3.x, worldVec3.y]);
// exporter.setProjection('EPSG:9999')
// exporter.setPrecision(6);

// const scene = new THREE.Scene();

const geojson = exporter.parse(scene);
// downloadFile

Author

Prolincur Technologies

About

Cross platform GeoJSON exporter for three.js. Out of the box usable with react-three-fibre.

Resources

License

Stars

Watchers

Forks

Packages

No packages published