UNPKG

get-epsg-code

Version:

Gets EPSG Code for Various Inputs (incl. OGC WKT, ESRI WKT, GML, Mapfile, PROJ String, Proj4js String, XML)

11 lines (9 loc) 362 B
function parseProj4JS(input, { debug = false } = { debug: false }) { const start = input.indexOf(":") + 1; const end = input.indexOf('"', start + 2); const str = input.substring(start, end); if (debug) console.log('parseProj4JS str: "' + str + '"'); if (str) return Number(str); } module.exports = parseProj4JS; module.exports.default = parseProj4JS;