1.0.0 • Published 4 years ago

iof-xml-coords v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

iof-xml-coords

npm version

Convert the coordinates in an IOF-XML file to WGS84.

The conversion might be needed if the XML file is exported from e.g. Condes using a map with a local coordinate system.

Installation

npm install -g iof-xml-coords

Usage

iof-xml-coords [-s <projection>] <file>

Arguments

  • file - The source file (reads from STDIN if not specified)

Options

  • -s, --src <projection> - The source projection (default: "GK25FIN")

  • -h, --help - Display help

  • -V, --version - Output the version number

Projection

Currently supported projections:

Other projections can be specified in the Proj4js format. These can be found in for example epsg.io.

Besides the command line option, the projection can also be passed via the IOF_SRC environment variable.

Examples

Convert "ETRS89 / TM35FIN" coordinates from coursedata.xml to coursedata_wgs84.xml:

iof-xml-coords -s TM35FIN coursedata.xml > coursedata_wgs84.xml

Convert "ETRS89 / UTM zone 35N" (EPSG:3047) coordinates. Output to STDOUT.

export IOF_SRC='+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'

iof-xml-coords < iof.xml

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tmatilai/iof-xml-coords. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The software is available as open source under the terms of the ISC License.