Author Topic: Insert/Delete Bug with translated GPX files  (Read 5162 times)

mikewager

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Insert/Delete Bug with translated GPX files
« on: January 31, 2007, 07:20:31 PM »
I was modifying a line that was translated from our CAD program to GPX and noticed the unmodified portion of the line was 5 feet from its original position.  With some experimentation I found the problem occured when I inserted or deleted a point and then saved the file.  Simply moving a point had no affect, I had to insert or delete a point.  When I checked the file with an ASCII editor I could see the coordinates for the line would change each time I saved after an insert or delete.  Unfortuantely the change does not appear to be uniform from point to point.

I then did the same thing with a file created in Topofusion and noticed the coordinated did not change.  So it appears the problem is with these translated files.

I would be happy to send the files to you.

Thanks

Krein

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 1203
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Insert/Delete Bug with translated GPX files
« Reply #1 on: February 01, 2007, 08:23:35 AM »
That's very strange.  I had a look at the code and can't see anything that should change in surrounding points when you insert or delete.

But please send me the file so I can try it out myself.  smorris@topofusion.com

It sounds like a floating point issue -- so it'll be interesting to see what your CAD converted files look like.

Thanks.

dumketu

  • Full Member
  • ***
  • Posts: 47
    • View Profile
Insert/Delete Bug with translated GPX files
« Reply #2 on: February 01, 2007, 09:15:33 AM »
I dont know if this is related or not, but when creating some waypoints in a GPX file I noticed that there was a slight change occasionally to the coordinates. Specifically, I was creating guide points for the corners of imported maps. Because the corners of the maps lie on even longitude and latitude lines for 1:250,000 maps this was easy, and it made the error obvious. Upon manually entering a waypoint, I entered:

30° 0' 0" N
79° 30' 0" E

After I came back to the point, it read:

30° 0' 0.00" N
79° 30' 0.01" E

I figured this was a roundoff error of some sort (although I would not have expected it with such round numbers) but it was not a big deal for what I was doing due to the scale I was working at. However, may be an issue worth looking into.

Brian

dumketu

  • Full Member
  • ***
  • Posts: 47
    • View Profile
Insert/Delete Bug with translated GPX files
« Reply #3 on: February 01, 2007, 09:15:35 AM »
I dont know if this is related or not, but when creating some waypoints in a GPX file I noticed that there was a slight change occasionally to the coordinates. Specifically, I was creating guide points for the corners of imported maps. Because the corners of the maps lie on even longitude and latitude lines for 1:250,000 maps this was easy, and it made the error obvious. Upon manually entering a waypoint, I entered:

30° 0' 0" N
79° 30' 0" E

After I came back to the point, it read:

30° 0' 0.00" N
79° 30' 0.01" E

I figured this was a roundoff error of some sort (although I would not have expected it with such round numbers) but it was not a big deal for what I was doing due to the scale I was working at. However, may be an issue worth looking into.

Brian

Krein

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 1203
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Insert/Delete Bug with translated GPX files
« Reply #4 on: February 01, 2007, 02:16:09 PM »
OK, I had a look into both of these.

Mike -- I have not been able to reproduce the shifting that I see.  I can imagine it happening somewhere in the code, but it doesn't appear to be from inserting or deleting points.  Both of those functions just copy memory around -- they don't touch any data.  There must be something else that you did to the data that caused the small shifts.  Simplify?  Profile?  Climbing analysis + add elevation to DEM?  Can you think of anything?  I tried deleting and inserting many points, but couldn't get it to change any points at all.

Brian -- Yep, there shouldn't be that much round-off, and it's definitely reproducable.  It's actually due to converting LL->UTM->LL.  Unfortunately that's what is display for waypoints currently.  Obviously we can take out two steps there.  But the good news is that the program isn't using that value of LL in it's display and other computations.  If you're in landsat mode it's using the actual LL, and if UTM it's only been converted once.  So it's just a display issue.

I've flagged it to be fixed in the next version, after we get the Beta publicly released.

Thanks guys.