New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gpxload

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gpxload

GPXLoad: GPX file Import / Export and API plugin for SignalK Server.

  • 0.5.1
  • npm
  • Socket score

Version published
Weekly downloads
36
decreased by-58.14%
Maintainers
1
Weekly downloads
 
Created
Source

GPXLoad: signalk-server-plugin

GPX file Import / Export and resource API provider plugin for Signal K Server.

SignalK server plugin and WebApp that:

  • Allows the upload of selected selected Routes, Waypoints and Tracks in GPX files to a SignalK server

  • Makes uploaded resources available via the SignalK API e.g. http://signalk-server/signalk/v1/api/reources/routes

  • Preserves the SignalK UUIDs of exported resources written to the GPX file to avoid resource duplication.

New

v0.5.1

  • Added Manage Resources screen to allow deletion of resources.

  • Set a route as the Active Route

  • Deleting a Route will also delete the associated Start / End waypoints.

v0.5.0

  • Added support for SignalK HTTP API PUT actions to enable applications to update / delete resources.

Breaking Changes:

  • v0.5.0 removed support for resource UUIDs that do not strictly align to the Signal K schema and use the urn:mrn:signalk:uuid: prefix.

This will impact resources uploaded from GPX files with versions of GPXLoad prior to 0.4.0. Affected reources will need to be re-imported.

Use and Operation:

To Import a GPX file:

  1. Open the Web App at the url: http://signalk-server/gpxload/

  2. Select the Import GPX tab and click Open GPX file

  3. Select a GPX file.

  4. Select some or all of the Routes, Waypoints and Tracks from the displayed list.

  5. To import just selected resources of a particular type click the Load button located within that resources group. To import all selected resources click Load Selected

Screenshot

To Export resources to a GPX file:

  1. Open the Web App at the url: http://signalk-server/gpxload/

  2. Select the Export to GPX tab and a list of available resources are displayed. Click Refresh if you want to re-load the list of resources from the Signal K server.

  3. Select the Routes, Waypoints and Tracks from the displayed list that you want saved to the GPX file.

  4. Click Save to export selected resources to file.

Note:

  • GPXLoad preserves the uuids of resources exported from Signal K server in the GPX file, so if these GPX files are re-imported they will update the corresponding resource on the Signal K server rather than create a new resource.

  • GPX files containing elements without Signal K UUID values will have UUIDs assigned each time the file is opened (or re-opened) in the WebUI. This will result in duplicate resources on the Signal K server if a GPX file is: opened, resources imported, re-opened and the same resources imported.

  • Signal K HTTP PUT api can be enabled via Signal K server Plugin Config screen

  • GPXLoad will only accept HTTP PUT requests for one specified resource id so you will need to provide a complete, valid resource record as per the Signal K schema.

Example: Add / update route

    HTTP PUT http://signalk-server/signalk/v1/api/vessels/self/resources/routes

    {       
        "value":{
            "urn:mrn:signalk:uuid:a8554512-5d3b-45a1-92e9-eb93da834aaa": {
                "name":"KI",
                "description":"KI via Edithburgh",
                "distance":164006.423,
                "start":"urn:mrn:signalk:uuid:e85c96e7-9bd4-4ed9-81aa-d3a350f0de55",
                "end":"urn:mrn:signalk:uuid:fab5c914-b49b-4f15-a1b4-e7b90de52cb5",
                "feature":{
                    "type":"Feature",
                    "geometry":{
                        "type":"LineString",
                        "coordinates":[
                            [137.780507,-35.781544],[137.633972,-35.557088],[137.582846,-35.551319],[137.534531,-35.589552],[137.752977,-35.08999],[138.432849,-34.885938]
                        ]
                    },
                    "properties":{}
                }               
            }
        }
    }
  • Supplying a null value will DELETE the resource if the configuration is set to allow delete operations.

Example: Delete route

    HTTP PUT http://signalk-server/signalk/v1/api/vessels/self/resources/routes

    {       
        "value":{
            "urn:mrn:signalk:uuid:a8554512-5d3b-45a1-92e9-eb93da834aaa": null
        }
    }

Signal K APIs:

GPXLoad interacts with the following Signal K APIs:

HTTP:

Acts as a provider for the following paths:

/signalk/v1/api/resources/routes

/signalk/v1/api/resources/routes/<uuid>

/signalk/v1/api/resources/waypoints

/signalk/v1/api/resources/waypoints/<uuid>

/signalk/v1/api/resources/tracks

/signalk/v1/api/resources/tracks/<uuid>```

*Stream:*
 
Sends Deltas for the following paths:

resources.routes. resources.waypoints. resources.tracks. navigation.course.activeRoute.href```

which populate the corresponding HTTP paths:

/signalk/v1/api/resources/routes

/signalk/v1/api/resources/waypoints

/signalk/v1/api/resources/tracks

/signalk/v1/api/vessels/self/navigation/course/activeRoute/href```



Keywords

FAQs

Package last updated on 01 Aug 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc