Thread: [Gpsbabel-misc] Text to mapsource mps
Brought to you by:
robertl
From: helen j. <hjo...@bt...> - 2004-07-22 13:29:32
|
Hi. I'm new to playing around with maps, so have what is probably a very basic problem which is stumping me. I have a large list of waypoints held in an excel spreadsheet. I want to upload them to Mapsource. Looking at the Babel site, it seemed that creating a xcvs style file + a txt file containing a formatted set of data from the spreadsheet and using babel to convert this to mps format would be the way to go. So, I created: FIELD_DELIMITER TAB RECORD_DELIMITER NEWLINE BADCHARS TAB FORMAT_TYPE INTERNAL IFIELD SHORTNAME, "", "%s" IFIELD DESCRIPTION, "", "%s" IFIELD ICON_DESCR, "", "%s" IFIELD LAT_DIRDECIMAL, "", "%c%f" IFIELD LON_DIRDECIMAL, "", "%c%f" IFIELD EXCEL_TIME, "", "%f" And fed in: arethu 12345678901234567890123 Shipwreck N5019.580 E00411.190 38191.0 But mapsource won't accept the generated mps file saying it's not the right format. Anyone care to help me here? Thanks in advance.... - helen |
From: Robert L. <rob...@us...> - 2004-07-22 19:55:13
|
Hi, Helen. > upload them to Mapsource. Looking at the Babel site, it seemed that creating > a xcvs style file + a txt file containing a formatted set of data from the > spreadsheet and using babel to convert this to mps format would be the way It seems like you're close, but have one mismatch: > IFIELD LAT_DIRDECIMAL, "", "%c%f" > IFIELD LON_DIRDECIMAL, "", "%c%f" > > And fed in: > > arethu 12345678901234567890123 Shipwreck N5019.580 E00411.190 The problem is that your lat and lon aren't in the format of Lxx_DIRDECIMAL. I'm not really certain what format they ARE in, but DIRDECIMAL have the hemisphere followed by the coordindate in decimal degrees - and "5019" is definitely not a valid degree marker. Yeah, we probably should detect this at this point and fuss about it... I have a feeling that these numbers are actually that kind of weird format used by NMEA and its mutants where it's degrees * 100 + minutes. (Does anybody know what this format is called?) If you can confirm that first coordinate is 50 degrees and 19.580 minutes (i.e. 50.326333 degrees north, 4.186500 degrees east) we can probably add a new style format specifier to handle those. If it's something else, we'll need help to understand what it is. RJL |
From: helen j. <hjo...@bt...> - 2004-07-23 14:57:09
|
> > IFIELD LAT_DIRDECIMAL, "", "%c%f" > > IFIELD LON_DIRDECIMAL, "", "%c%f" > > > > And fed in: > > > > arethu 12345678901234567890123 Shipwreck > N5019.580 E00411.190 > > The problem is that your lat and lon aren't in the format of > Lxx_DIRDECIMAL. I'm not really certain what format they ARE > in, but DIRDECIMAL have the hemisphere followed by the > coordindate in decimal degrees - and "5019" is definitely not > a valid degree marker. The co-ords I use are (lat) HDDMM.MMM (long) HDDDMM.MMM form. So, N5019.580 = North 50 degrees, 19.580 minutes And E00411.190 = East 004 degrees, 11.190 minutes. However, I've now used Excel to convert them to DIRDECIMAL format and all seems fine now. Thanks for the push in the right direction ;-) - h |
From: Robert L. <rob...@us...> - 2004-07-23 15:16:56
|
helen johnstone wrote: > The co-ords I use are (lat) HDDMM.MMM (long) HDDDMM.MMM form. [ ... ] > However, I've now used Excel to convert them to DIRDECIMAL format and > all seems fine now. I could be convinced to add these to the style definitions if there's a reason. But if it's a solved problem for you (and to my recollection, you're the only one that's requested this, even if indirectly) I'm inclined to not clutter things up. > Thanks for the push in the right direction ;-) You're welcome. Enjoy. RJL |