GeoConvert Save

Converting between Geojson and GIS file formats

Project README

GeoConvert

Converting between Geojson and GIS file formats

KML(KMZ), GPX, Shapefile, DXF(unfinished), WKT(unfinished)

Rreference the JavaScript file manually:

<script src="dist/GeoConvert.min.js"></script>

Note that coordinate transformations depend on proj4.js (this means proj4.js must be included before including the file).

<script src="lib/proj4.js"></script>

Usage

kml to geojson

GeoConvert.kml2Geojson(kml);

geojson to kml

GeoConvert.geojson2Kml(geojson);

gpx to geojson

GeoConvert.gpx2Geojson(kml);

geojson to gpx

GeoConvert.geojson2Gpx(geojson);

shapefile to geojson

//shapefile is a object that contain shp, dbf [arrayBuffer], prj? [string]
var shapefile = {};
shapefile.shp = arrayBuffer_shp;
shapefile.dbf = arrayBuffer_dbf;

//optional
shapefile.prj = string_prj;

GeoConvert.shapefile2Geojson(shapefile);

wkt to geojson

GeoConvert.wkt2Geojson(wkt);
Open Source Agenda is not affiliated with "GeoConvert" Project. README Source: kobesin/GeoConvert
Stars
40
Open Issues
1
Last Commit
4 years ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating