Git Product home page Git Product logo

gpxjs's Introduction

About Me:

I'm a 2nd-year computer science student at WPI. I'm passionate about Swarm Robotics, Biology, and Urban Planning, and I'm hoping to explore these fields from a programmer's perspective. I learned to code with Arduino and Processing (10+ years ago), and since then I've expanded to many different languages and environments. In high school, I was the Programming Lead and Team Captain for FRC Team 2539.

LinkedIn

GitHub Trophies

Tech Stack:

Languages:

JavaScript TypeScript Python Java C++ C AssemblyScript

Libraries/Frameworks:

Electron.js React Vite Three js WebGL Flutter NodeJS OpenCV P5js Qt ROS SolidJS TailwindCSS Matplotlib PyTorch scikit-learn TensorFlow

Tools:

Figma Docker

gpxjs's People

Contributors

bdferris-v2 avatar matteomelotti avatar pedroslvieira avatar we-gold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gpxjs's Issues

Could not find a declaration file for module '@we-gold/gpxjs'

Hi,
when using your package with typescript in nodejs, I get the following error:

Could not find a declaration file for module '@we-gold/gpxjs'. '/workspaces/basic-bun/node_modules/@we-gold/gpxjs/dist/gpxjs.js' implicitly has an 'any' type.
There are types at '/workspaces/basic-bun/node_modules/@we-gold/gpxjs/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@we-gold/gpxjs' library may need to update its package.json or typings.

I'm using it with this import statement in my code.
import { parseGPXWithCustomParser } from "@we-gold/gpxjs";

The problem can be fixed by adding the following line to the exports-section in the package.json:

"exports": {
	".": {
		"import": "./dist/gpxjs.js",
		"require": "./dist/gpxjs.umd.cjs",
+		"types": "./dist/index.d.ts"
	}
},

If you have further questions, feel free to ask.

Extensions not parsed correctly

Hello,
I'm trying to parse a gpx file with this structure:
<trkseg> <trkpt lat="47.012168" lon="7.602021"> <ele>127</ele> <time>2024-04-13T08:04:29.000Z</time> <extensions> <ns3:TrackPointExtension> <ns3:atemp>22.0</ns3:atemp> <ns3:hr>109</ns3:hr> <ns3:cad>86</ns3:cad> </ns3:TrackPointExtension> </extensions> </trkpt> </trkseg>
but when I print the extensions I get this:
Screenshot 2024-04-14 at 19 46 10

feat: Support serialization back to GPX

It'd be great to have support for serializing the parsed GPX data model back to GPX XML. Any chance you'd be willing to consider a PR that added this functionality?

CDATA parsing

Hi!

Seems that CDATA values are parsed as is.
See an example file linked.

The final geojson looks like:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "name": "<![CDATA[#2RR @ BiciNuragica 2015: da Selargius a Silius]]>",
        "comment": "",
        "description": "",
        "src": "",
        "number": "",
        "link": null,
        "type": null
      },

While I'd expect the name value to be "#2RR @ BiciNuragica 2015: da Selargius a Silius".

(BTW, not sure it makes sense to set the other keys with empty values (comment, src, link…).

Thanks :)

Gpx input (.txt to be removed):
test_with_cdata.gpx.txt

Geojson output:
test_with_cdata.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.