Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 23-03-2018, 22:12   #1
Registered User

Join Date: Mar 2009
Location: Currently in Malaysia
Boat: Valiant Esprit 37
Posts: 192
Help! GPX File Import Not Functioning

I've been working with large waypoint files to supplement cruising guides so that anchorages and other items in the guides can be shown on OpenCPN using a layer file.

I needed to make some changes for an update to one of the guides. I just exported about 450 waypoints into a GPX file so I could make a bulk change to the local file link name using a text editor. After exporting I deleted all the waypoints, made the change to the link name and attempted to import the updated waypoints so I could make some further changes.

None of the waypoints were imported. I assumed I must have made some error in renaming the link, so I renamed the navobj.xlm to one of the saved versions to get the waypoints back and then did an export, deleted the waypoints and attempted to import the same file I just exported. Again, no waypoints were imported??

I know I have been able to do this in the past and did so regularly. I'm currently using version 4.8.0. Did something change in 4.8.0?

I've attached the exported GPX file. Can anyone successfully import this file? The waypoints are all prefixed with "SM-" so they can be easily deleted.
__________________

reflectionsv37 is offline   Reply With Quote
Old 24-03-2018, 01:29   #2
Registered User

Join Date: Mar 2009
Location: Currently in Malaysia
Boat: Valiant Esprit 37
Posts: 192
Re: Help! GPX File Import Not Functioning

It doesn't look like the file uploaded. Let's try again!

That's better!!
Attached Files
File Type: gpx Sail Malaysia Pilot Test.gpx (394.9 KB, 19 views)
__________________

reflectionsv37 is offline   Reply With Quote
Old 24-03-2018, 01:54   #3
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: Help! GPX File Import Not Functioning

Quote:
Originally Posted by reflectionsv37 View Post
It doesn't look like the file uploaded. Let's try again!

That's better!!
The file is just fine.

So the usual question: Don't you have the same waypoints already loaded as a layer?
nohal is offline   Reply With Quote
Old 24-03-2018, 01:56   #4
Registered User
 
Alan Mighty's Avatar

Join Date: Mar 2014
Location: Moreton Bay
Boat: US$4,550 of lead under a GRP hull with cutter rig
Posts: 1,488
Re: Help! GPX File Import Not Functioning

Seems to have worked. I zoomed on Pulau Pinang and this is what I see:
__________________
“Fools say that you can only gain experience at your own expense, but I have always contrived to gain my experience at the expense of others.” - Otto von Bismarck
Alan Mighty is offline   Reply With Quote
Old 24-03-2018, 02:51   #5
Registered User

Join Date: Mar 2009
Location: Currently in Malaysia
Boat: Valiant Esprit 37
Posts: 192
Re: Help! GPX File Import Not Functioning

Nohal,

No, I don't keep the file in the Layers directory because I need to periodically need to make changes to the waypoints. I exported them so I could use a text editor to find/replace all the links to the updated cruising guide name. I then deleted all the waypoints and then attempted to import them so I could make individual changes to a few. The import did nothing. No error messages, no warnings, nothing.

Thinking I might have damaged the file with the renaming, I did it again with the file I attached here without changing the file at all. Same thing happened when I tried to import this file. Nothing.

I'm really at a loss. I have done this export/import many times in the past and never had a problem. I was on another version, maybe 4.4.

I'm at a complete loss at what might be wrong. For the time being, I found a workaround. After recovering the waypoints by renaming the navobj.xml file, I just made me the individual changes I needed and then exported and did the bulk name change for the so I can distribute.

I added my changed file to the layers folder to verify that everything worked ok and it did. You can have the waypoints in the waypoints section and the same waypoints in the layers folder. Both are displayed on the charts but you have to drag the regular waypoint out of the way to see the Layer waypoint beneath it.

Can anyone explain what the GUID represents in the exported files from OpenCPN?
reflectionsv37 is offline   Reply With Quote
Old 24-03-2018, 03:10   #6
Registered User

Join Date: Mar 2009
Location: Currently in Malaysia
Boat: Valiant Esprit 37
Posts: 192
Re: Help! GPX File Import Not Functioning

Alan,

Sure looks like it worked for you. What version are you running?
reflectionsv37 is offline   Reply With Quote
Old 24-03-2018, 03:31   #7
Registered User
 
Alan Mighty's Avatar

Join Date: Mar 2014
Location: Moreton Bay
Boat: US$4,550 of lead under a GRP hull with cutter rig
Posts: 1,488
Re: Help! GPX File Import Not Functioning

Quote:
Originally Posted by reflectionsv37 View Post
Alan,

Sure looks like it worked for you. What version are you running?
4.8.0
__________________
“Fools say that you can only gain experience at your own expense, but I have always contrived to gain my experience at the expense of others.” - Otto von Bismarck
Alan Mighty is offline   Reply With Quote
Old 24-03-2018, 03:40   #8
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: Help! GPX File Import Not Functioning

Quote:
Originally Posted by reflectionsv37 View Post
Nohal,

No, I don't keep the file in the Layers directory because I need to periodically need to make changes to the waypoints. I exported them so I could use a text editor to find/replace all the links to the updated cruising guide name. I then deleted all the waypoints and then attempted to import them so I could make individual changes to a few. The import did nothing. No error messages, no warnings, nothing.

Thinking I might have damaged the file with the renaming, I did it again with the file I attached here without changing the file at all. Same thing happened when I tried to import this file. Nothing.

I'm really at a loss. I have done this export/import many times in the past and never had a problem. I was on another version, maybe 4.4.

I'm at a complete loss at what might be wrong. For the time being, I found a workaround. After recovering the waypoints by renaming the navobj.xml file, I just made me the individual changes I needed and then exported and did the bulk name change for the so I can distribute.

I added my changed file to the layers folder to verify that everything worked ok and it did. You can have the waypoints in the waypoints section and the same waypoints in the layers folder. Both are displayed on the charts but you have to drag the regular waypoint out of the way to see the Layer waypoint beneath it.

Can anyone explain what the GUID represents in the exported files from OpenCPN?
This is not how it works, you simply can not have the same waypoint in a layer and then import it from a GPX file.
The logic used for wpt entities during the import is this: https://github.com/OpenCPN/OpenCPN/b...util.cpp#L2764 (Name and lat+lon used to tell whether it is a duplicate or not as we can not rely on the imported entity having the OpenCPN specific GUID extension during the import), called from https://github.com/OpenCPN/OpenCPN/b...tion.cpp#L1310

The GUID represents the internal globally unique identifier of the navobject in OpenCPN and is completely irrelevant in the waypoint import from GPX as you can see above (It is used elsewhere for other purposes).

FWIW, I have just submitted a pull request that will inform you in case some waypoints were identified as duplicates during the import.

Pavel
nohal is offline   Reply With Quote
Old 24-03-2018, 04:21   #9
Registered User

Join Date: Mar 2009
Location: Currently in Malaysia
Boat: Valiant Esprit 37
Posts: 192
Re: Help! GPX File Import Not Functioning

Quote:
Originally Posted by nohal View Post
This is not how it works, you simply can not have the same waypoint in a layer and then import it from a GPX file.
The logic used for wpt entities during the import is this: https://github.com/OpenCPN/OpenCPN/b...util.cpp#L2764 (Name and lat+lon used to tell whether it is a duplicate or not as we can not rely on the imported entity having the OpenCPN specific GUID extension during the import), called from https://github.com/OpenCPN/OpenCPN/b...tion.cpp#L1310

The GUID represents the internal globally unique identifier of the navobject in OpenCPN and is completely irrelevant in the waypoint import from GPX as you can see above (It is used elsewhere for other purposes).

FWIW, I have just submitted a pull request that will inform you in case some waypoints were identified as duplicates during the import.

Pavel
Thanks Pavel. It's getting late here in Malaysia but I'll try some other things tomorrow. I have been making a new version of the GPX each time there is a an update to the guide. I am almost certain that I didn't have an old version of the GPX file in the layer file, but I'm not certain. I'll will try this again tomorrow.

Based on what you wrote here, during an import it checks, using lat,long and name, to determine if there is a duplicate waypoint. After I finished all of my changes, I exported all waypoints to a GPX file to create the file for distribution and then copied that file to my layers folder to make sure the layer waypoints opened the correct version of the cruising guide. Both the normal waypoints are there and also the waypoints from the layer file. Naturally, they both have the same lat,long and name and both display on the chart. One on top of the other. I can move the one on the top by dragging it out of the way so I can click on the layer waypoint underneath. That's how I verified that it opened the correct version of the cruising guide.

If I did have an old version of the GPX in the layer file, what you wrote would explain why nothing imported as every waypoint would have the same lat,long and name. I'll try again tomorrow to see if I can verify that. Thanks for your help and it would be a good idea to have a warning if you're trying to import a duplicate waypoint. Make sure to add a cancel button to the import so I don't have to click an acknowledgement 450 times. LOL
reflectionsv37 is offline   Reply With Quote
Old 24-03-2018, 04:27   #10
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: Help! GPX File Import Not Functioning

Don't worry, it looks like this (And acknowledges itself automatically after 10 seconds in case you have rum in one hand and a cigar in the other...)
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2018-03-24 at 08.25.03.png
Views:	252
Size:	46.1 KB
ID:	166927  
nohal is offline   Reply With Quote
Old 24-03-2018, 10:27   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,958
Re: Help! GPX File Import Not Functioning

Thanks Pavel, your illustrations will need to make in into the manual (but this is for the next version) so how would we handle that? Put a [Future Version]?

I have updated Technical: Routes, Waypoints, Navobjects, Gpx and GUID
with the last four lines and a modification.
rgleason is offline   Reply With Quote
Old 24-03-2018, 11:44   #12
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,228
Re: Help! GPX File Import Not Functioning

Quote:
Originally Posted by rgleason View Post
Thanks Pavel, your illustrations will need to make in into the manual (but this is for the next version) so how would we handle that? Put a [Future Version]?
No "future version", no "new", no "maybe", no "recently", no "I think, no "he says". Is the feature implemented? It has to be in the *online* version of the manual, which has always followed the master branch. Is it not? There is nothing to document.

This one is implemented and merged to master.

Pavel
nohal is offline   Reply With Quote
Old 24-03-2018, 15:04   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,958
Re: Help! GPX File Import Not Functioning

Thanks Pavel for the clarification. "The online manual follows the merged master."
I'll fix it.
rgleason is offline   Reply With Quote
Old 25-03-2018, 10:07   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,958
Re: Help! GPX File Import Not Functioning

Added the notice screenshot.

Technical: Routes, Waypoints, Navobjects, Gpx and Guid

The organization of subparagraphs for Marks & Routes, Create Routes, Active Route, Import & Export, Route Handling, Layers, etc should be reviewed, updated and improved for logical flow and better organization. A better location for this "Technical" note should also be found.
rgleason is offline   Reply With Quote
Old 25-03-2018, 10:56   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 13,958
Re: Help! GPX File Import Not Functioning

I also think we need to clarify that there are two types of points, maybe 3.
1. Route points
2. Waypoints

What are "Marks" anyone know? Is this just a shorter name for both?
__________________

rgleason is offline   Reply With Quote
Reply

Tags
fun, import

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPX Route won't import AnchorageGuy OpenCPN 9 10-02-2015 12:55
throttle selector not functioning DDowling Engines and Propulsion Systems 4 23-01-2014 01:07
.gpx import data error?? onehalfmoon OpenCPN 3 03-04-2013 06:24
Import GPX Tracks Crash Bluesipp OpenCPN 25 29-10-2011 00:20
How to Import gpx Tracks into MaxSea George64 Navigation 0 10-09-2010 15:56

Advertise Here


All times are GMT -7. The time now is 22:18.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2020, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.