Jump to content

Gsak - Questions And Problems Exporting


Recommended Posts

Hi! I have a small problem and a related question, I was hoping someone could help me with.

 

Working with the latest version of GSAK, I'm trying to export to Microsoft Streets & Trips. Mostly it goes okay - however, one of the fields that gets exported is the "Type" field. However, there is no information for that field for the entire file. It's effectively an empty column.

 

Although I can get the %typ variable to work in the Description, it's not as useful as having it's own field - and since GSAK is exporting that field anyway, you would think that it should be populated.

 

Can anyone shed some light on what is causing this problem, and how to fix it?

 

 

Seperately, as a question - is there any way to customize the fields that GSAK exports in the first place? For example, I might want the Difficulty/Terrain, Placed By, Cache Type, etc... to be in their own fields, rather than being forced to shove them all into a single Description field.

 

Is this possible?

 

TIA!

 

Note: I deliberately did not post this in the main GSAK Thread. Honestly, I don't know how people can keep track of everything in there - it's a mess! It would be like putting the entire Northeast Forum into one thread. :rolleyes:

Link to comment
Hi! I have a small problem and a related question, I was hoping someone could help me with.

 

Working with the latest version of GSAK, I'm trying to export to Microsoft Streets & Trips. Mostly it goes okay - however, one of the fields that gets exported is the "Type" field. However, there is no information for that field for the entire file. It's effectively an empty column.

 

Although I can get the %typ variable to work in the Description, it's not as useful as having it's own field - and since GSAK is exporting that field anyway, you would think that it should be populated.

 

Can anyone shed some light on what is causing this problem, and how to fix it?

 

 

Seperately, as a question - is there any way to customize the fields that GSAK exports in the first place? For example, I might want the Difficulty/Terrain, Placed By, Cache Type, etc... to be in their own fields, rather than being forced to shove them all into a single Description field.

 

Is this possible?

 

GSAK uses GPSBabel "Under the hood" for the conversion to S&T. I am not sure why it leaves this field blank but a question in the GPSBabel mailing list should answer that one.

 

However you can generate your own CSV files using GPSBabel stand alone (or via GSAK - File=>Export=Custom) you will however need to acquaint yourself with the GPSBabel "style" files and not all grounspeak extensions are supported. There is actaully a post about this very type of thing in the GSAK thread here

Link to comment
I am not sure why it leaves this field blank but a question in the GPSBabel mailing list should answer that one.

 

"Because it does." :rolleyes:

 

The S&T format was done before I actually owned S&T. Someone told me that was the format that S&T wanted to see, so that's how we wrote it. Even now that I have ready access S&T and a Windows system, I'll confess I have been unable to find definitions of what that "type" field really is.

 

If you can find a document (or example) showing how "type" is ever used by S&T - especially if it would allow icon information to be smuggled along - I'd love to see it.

 

In related news, I'm considering changing the field separator in this format from a comma to a tab since the comma causes the Euorpean versions of S&T ("Autoroute") grief.

Link to comment

Thank you, both of you, for your help.

 

As it turns out, I actually managed to figure this out. :rolleyes:

 

Once Clyde pointed out that I could do this via the Custom Import, I researched and experimented - and I just managed to get it to work pretty well.

 

Here is my new Streets & Trips CSV Style File:

 


# gpsbabel XCSV style file
#
# Format: MS S&T 2002/2003


#
# Modified by Enchanted Shadow
#


DESCRIPTION  	Microsoft Streets and Trips 2002/2003

#
# FILE LAYOUT DEFINITIIONS:
#

FIELD_DELIMITER	COMMA
RECORD_DELIMITER	NEWLINE
BADCHARS  	,"

PROLOGUE	Name, Latitude, Longitude, Info, URL, Type, Container


#
# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:
#

IFIELD	SHORTNAME, "", "%s"  	# Name
IFIELD	LAT_DECIMAL, "", "%f"  # Latitude
IFIELD	LON_DECIMAL, "", "%f"  # Longitude
IFIELD	DESCRIPTION, "", "%s"  # Name 2 (Big Description)
IFIELD	URL, "", "%s"    # URL
IFIELD	GEOCACHE_TYPE,"", "%s"  # Geocache Type
IFIELD	GEOCACHE_CONTAINER,"","%s"	# Container Type/Size


 

Now, what I did to modify the original Style file into this current one was the following:

 

1. I modified the Prologue line to reflect the full set of fields that I have added. I also changed the name of the field "Name 2" to "Info", as I think it's more appropriate, given how I'm exporting this.

 

2. I modified the original placeholder line for the Geocache Type, which was "IFIELD IGNORE, "", """, and I replaced it with a functional version - "IFIELD GEOCACHE_TYPE,"", "%s"".

 

3. I added an additional field to show the Container Type/Size.

 

 

When I do a Custom Export from GSAK, these are my settings:

 

1. Statement Line:

 


"C:\Apps\GSAK\GPSBabel.exe" -i gpx -f "C:\Apps\GSAK\temp\babel.gpx" -o xcsv,style="C:\Work\Custom GSAK Styles\Modified S&T Style.txt" -F "C:\Test\S&T Geocache Export.csv"

 

2. Waypoint Name: "%name", Maximum Characters = 100

 

3. Waypoint Description: "%dif / %ter - Placed by %by"

 

 

When I'm done, and I import this newly created file into Mappoint/S&T, a typical waypoint balloon will look like this:

 

Old Stone School

42.12242, -74.67557

Info: 1.5 / 2 - Placed by JBzHOW and the Gasman

Type: Traditional cache

Container: Regular

 

 

I think that turns out pretty well, don't you think? :anicute:

Link to comment

...but only once you go into pushpin properties and turn on those fields in the balloon.

 

I like it. It looks like it's introducing geocaching-specific stuff in a non-geocaching format, but GPSBabel writes empties and S&T ignores them. So I made a similar set of changes and folded in the field separator change I've been meaning to do and will probably check that in to the GPSBabel tree in the next day or two. Once that's done "s_and_t" will have these characteristics and you won't have todo the -o xcsv,style=whatever stuff any more,

 

Thanx.

RJL

Link to comment

 

...but only once you go into pushpin properties and turn on those fields in the balloon.

 

 

True. I forgot to mention that. <_<

 

 

I like it.  It looks like it's introducing geocaching-specific stuff in a non-geocaching format, but GPSBabel writes empties and S&T ignores them.  So I made a similar set of changes and folded in the field separator change I've been meaning to do and will probably check that in to the GPSBabel tree in the next day or two.  Once that's done "s_and_t" will have these characteristics and you won't have todo the -o xcsv,style=whatever stuff any more,

 

Thanx.

RJL

 

 

Thanks, Robert. I'm glad I could contribute. :blink:

 

Incidentally, when I looked at the GPSBabel Style documentation, I found Fields for Geocache Type, Container, Difficulty, and Terrain. But I didn't find any fields listed for "Placed by" and "Date Placed".

 

Was I blind and/or are those fields defined elsewhere? Or does GSPBabel not support them?

Link to comment

I believe that what GSAK hands GPSBabel is a custom CSV format that doesn't include these fields.

 

Can you confirm that they're present if you send a "real" Pocket query straight through GPSBabel?

 

gpsbabel -i gpx -f yourpq.gpx -o s_and_t -F blah.txt

 

...and slrup blah.txt into S&T.

Link to comment
I believe that what GSAK hands GPSBabel is a custom CSV format that doesn't include these fields.

 

That would explain it. I thought GSAK used Babel's s_n_t format

 

Can you confirm that they're present if you send a "real" Pocket query straight through GPSBabel?

 

Yes they're present.

 

I'll do the custom export thing from GSAK then.

Link to comment

It probably does - as an output. The key becomes what GSAK hands to GPSBabel as an INPUT. If GSAK delivers the data to GPSBabel in a format that doesnt' include diff/terr/container, etc., then GPSBabel can't push that into the right piles on the output stream.

 

This actually brings up an interesting point that I hadn't thought much about. If GSAK starts handing a diff/terr/container/cache type to GPSBabel in all cases, it's going to start including this stuff in the waypoint comments even on the protocol xfers, regardless of that %gibberish you've given GSAK. Crikey!

 

I don't know of GSAK uses the same options to call GPSBabel for custom exportt, internal export, and unit transfer. Looks like we should have this discussion in the presence of the GSAK development & support groups.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...