sibartlett / Geo

A geospatial library for .NET
https://www.nuget.org/packages/Geo/
GNU Lesser General Public License v3.0
176 stars 39 forks source link

GPX: route points, track points and way points should have the same data #43

Closed mfeingol closed 3 years ago

mfeingol commented 4 years ago

I've noticed that GPX tracks whose route points have names or descriptions don't see that data materialize at the GpsData level. The reason is Route just has a list of Coordinate instances and the serializer doesn't transfer name/desc/comment fields to the public surface area when deserializing.

Technically, Route points, TrackSegment points and GpsData waypoints should probably all be the same type, as they are in the GPX spec, where everything is a wptType.

However, that will change a lot of public signatures, and be a fairly breaking change in the library. A more conservative alternative would be to attach new properties to Coordinate, Fix, and Waypoint respectively.

@sibartlett, thoughts? I'm happy to PR a fix, but I'm not sure which direction to take here.

Thanks.

sibartlett commented 4 years ago

I'll give this some thought.

I'm open to making breaking changes, to better follow the GPX spec. We'd need to publish a new major version of the library if we did that though.

mfeingol commented 4 years ago

I've submitted a PR for the simplest solution to this. Please let me know if you have any feedback.

mfeingol commented 4 years ago

@sibartlett: just wondering if you've had a chance to think about the right path forward for this.

The PR I submitted is a breaking change, and it might make sense to include any other breaking changes in one fell version upgrade swoop.

However, it's not clear that anyone actually needs anything more than what's in the PR. E.g. I have yet to come across a GPX file in the wild whose trackpoints have anything but coordinates and elevation data. I have encountered routepoints with metadata.

Thanks, as always!

sibartlett commented 4 years ago

Sorry for the delay, things have been busy. I will look soon, no later than the 24th - which is a 10% day at work for me.

mfeingol commented 4 years ago

Hi, @sibartlett. Looks like the PR went through. Thanks again! 🍾

Do you plan to publish a new NuGet package in the near term?

sibartlett commented 4 years ago

Published as 1.0.0

Sorry for the delay.

mfeingol commented 4 years ago

Thank you, sir.