The Wayback Machine - https://web.archive.org/web/20201019111853/https://github.com/kobesin/GeoConvert
Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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);

About

Converting between Geojson and GIS file formats

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.