0.2.2 • Published 8 months ago

@gooin/fit2spatial v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

fit2spatial

This CLI program can convert Garmin FIT files to various spatial data formats, such as GeoJSON, SHP, KML, GPX, etc. It is easy to use and can be integrated into automation scripts.

Usage

$ npm install -g @gooin/fit2spatial
$ fit2spatial COMMAND
running command...
$ fit2spatial (--version)
@gooin/fit2spatial/0.2.2 win32-x64 node-v18.16.0
$ fit2spatial --help [COMMAND]
USAGE
  $ fit2spatial COMMAND
...
$ npm install -g @gooin/fit2spatial

<!-- transform a single .fit file to GeoJSON file -->
$ fit2spatial geojson -i C:/Users/gooin/Downloads/fit/example.fit  -o C:/Users/gooin/Downloads/fit/example.json

<!-- transform a directory contains .fit files to GeoJSON files -->
$ fit2spatial geojson -i C:/Users/gooin/Downloads/fit/  -o C:/Users/gooin/Downloads/geojson/


<!-- transform a single .fit file to SHP file -->
$ fit2spatial shp -i C:/Users/gooin/Downloads/fit/example.fit  -o C:/Users/gooin/Downloads/fit/example.shp

<!-- transform a directory contains .fit files to SHP files -->
$ fit2spatial shp -i C:/Users/gooin/Downloads/fit/  -o C:/Users/gooin/Downloads/shp/

Note: In Shapefile, Field names cannot be longer than 10 characters. So, some field names will be truncated. See more: Geoprocessing considerations for shapefile output—ArcMap

TODO:

  • Add convert to GeoJSON linestring
  • Add convert to SHP linestring
  • Add test
  • Add flag to geometry only, remove statistics fields.
  • Add convert to GPX
  • Add convert to KML
  • Add convert to CSV
  • Add convert to GeoJSON/SHP point