Skip to content

node.js module for converting .prj files and projcs / geogcs strings to EPSG codes

Notifications You must be signed in to change notification settings

lolastudio/prj2epsg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prj2epsg

Node.js module for converting .prj files and projcs / geogcs strings to EPSG codes

  • Install
npm i prj2epsg
  • From .prj file
const prj2epsg = require('prj2epsg');
const fs = require('fs');

fs.readFile('./myproj.prj', (err, data) => {
    if(!err) prj2epsg.fromPRJ(data);
});
  • From GEOGCS / PROJCS string
const prj2epsg = require('prj2epsg');
let prj = 'GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]';

prj2epsg.fromPRJ(prj) // 4326
  • Methods
Method Arguments Description
get projection (String, File), type ('prj', 'epsg') returns full data object
fromPRJ projection (String, File) returns epsg code without prefix
fromEPSG projection (String, File) returns prj projcs / geogcs string

About

node.js module for converting .prj files and projcs / geogcs strings to EPSG codes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published