mirsch / lab2gpx

GNU General Public License v3.0
26 stars 22 forks source link

Country not included in gpx #69

Closed PlasmaWave closed 2 years ago

PlasmaWave commented 2 years ago

When I import the gpx file into GSAK, the "Country" field is not populated so I have to populate the field myself.

Would it be possible to include "groundspeak:country" in the "lab2gpx" download?

Many thanks for this fabulous tool.

Greetings from England

SamHenkel commented 2 years ago

so I have to populate the field myself.

No, create appropriate GSAK load settings* instead and GSAK will populate country and state automatically for you whilst importing the GPX file. Groundspeak's LabCache API does not deliver region data anyway.

Hans

PlasmaWave commented 2 years ago

Hans ... many thanks for your quick reply.

In the GSAK Load settings I already had State/County/Elevation fields populated (YB/SB/M) but couldn't see a Country field, so following your message searched the GSAK help & forum - hadn't noticed the "Post Load Macro" field before! So have now populated it with the "CountryStateCounty___Overwrite" macro, which I saved to my PC.

Worked a treat on a test Lab gpx, so that's really useful. Question: is above the best method to populate Country? I saw in the help some (macro?) code for fetching Country but have no idea how to use it.

Thanks again, Richard

SamHenkel commented 2 years ago

I saw in the help some (macro?) code for fetching Country but have no idea how to use it.

This one line macro will get the countries for all Labs where country is empty: $Countries=GetCountry("CB") Use it as a post load macro.

Hans

PlasmaWave commented 2 years ago

Hans,

A small macro now created and it's working perfectly - have been reading about and looking at macros, also created and experimented with a couple of very simple ones. Will attempt to build some knowledge/experience over time, but it's a steep learning curve for sure,

Many thanks for your help and encouraging me to educate myself!

Richard

SamHenkel commented 2 years ago

Many thanks for your help and encouraging me to educate myself!

You're welcome. If in doubt, just jump to GSAK's own forum and you will get any help needed on creating macros or just using GSAK.

Hans