
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
as a command line tool:
$ npm install -g togpx
$ togpx file.geojson > file.gpx
as a nodejs library:
$ npm install togpx
var togpx = require('togpx');
togpx(geojson_data);
as a browser library:
<script src='togpx.js'></script>
togpx(geojson_data);
togpx( geojson, options )geojson: the GeoJSON data.options: optional. The following options can be used:
creator: Specify a creator string that is used to specify the software that created the final GPX file. Default is togpx.metadata: An object containing metadata about the to be converted dataset. Will be included in the GPX in the <metadata> tag. Usefull for providing information like copyright, time, desc, etc.featureTitle: Defines a callback that is used to construct a title (<name>) for a given GeoJSON feature. The callback is called with the GeoJSON feature's properties object.featureDescription: Defines a callback that is used to construct a description (<desc>) for a given GeoJSON feature. The callback is called with the GeoJSON feature's properties object.featureLink: Defines a callback that is used to construct an URL (<link>) for a given GeoJSON feature. The callback is called with the GeoJSON feature's properties object.featureCoordTimes: Defines a callback that is called for each feature to determine timestamps of each coordinate. Gets called with the current feature as a parameter, must return an array of UTC ISO 8601 timestamp strings for each coordinate of the feature. Alternatively. this option can be a string, in which case the corresponding feature property is used to read the times array.The result is a string of GPX XML.
The conversion from GeoJSON to GPX is (by definition) lossy, because not every GeoJSON feature can be represented with the simple data types present in GPX files and GPX does not support arbitrary feature properties. This library tries to convert as much geometry and information as possible:
name tag of GPX elements will be determined by a simple heuristic that searches for the following GeoJSON properties to construct a meaningful title: name, ref, iddesc tag of GPX elements will be constructed by concatenating all respective GeoJSON properties.[lon, lat, altitude])times or coordTimes property that is an array of UTC ISO 8601 timestamp strings. See the featureCoordTimes option for customizing this behaviour.FAQs
convert geojson to gpx
The npm package togpx receives a total of 2,138 weekly downloads. As such, togpx popularity was classified as popular.
We found that togpx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.