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.
npm install -g iof-xml-coordsiof-xml-coords [-s <projection>] <file>
file- The source file (reads from STDIN if not specified)
-s, --src <projection>- The source projection (default: "GK25FIN")-h, --help- Display help-V, --version- Output the version number
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.
Convert "ETRS89 / TM35FIN" coordinates from coursedata.xml to coursedata_wgs84.xml:
iof-xml-coords -s TM35FIN coursedata.xml > coursedata_wgs84.xmlConvert "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.xmlBug 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.
The software is available as open source under the terms of the ISC License.