Notices


Reply
Thread Tools
abby_normal's Avatar
Posts: 48 | Thanked: 4 times | Joined on Jan 2008
#1
First of all, let me just say that this is a truly awesome program. Kudos to gnuite and the others contributing to the project.

I will be traveling to NZ next month, and have been working on obtaining offline content. Downloading maps has been working fine, so I've now turned to POIs. There is an impressive collection (40,000+) available from Zenbu (www.zenbu.co.nz), and I managed to convert the native format (.CSV file) to .GPX using a program called GPSBabel, and then imported the waypoints into Mapper. The import took quite a while!

My question is whether anyone has advice or suggestions as to how I can best map the information in the Zenbu file to Mapper. The Zenbu information does not have "categories" as such, it has "tags" that do not easily map to categories. Here are the first 3 lines of the .csv file, which shows the available fields:

Code:
zid,name,tags,website,physical_address,phone,opening_hours,longitude,latitude,gisprecision,correctly_placed,created_at,updated_at,updated_by
1000105,The Don,"japanese donburi restaurant, takeaway, licensed","","Upstairs in Queens Arcade, 47 High Street, Auckland",09 379 2834,"Mon Fri 11am-9pm, Sat 5-9pm",174.766374,-36.848021,number,true,2006-07-06 14:29:32,2006-10-06 09:37:22,zenbu
1000112,Burger King - Swanson Street,"burgers, fast food",http://www.burgerking.co.nz,"115 Queen Street, Auckland Central",09 309 8579,"",174.765937,-36.846247,manual,true,2006-07-06 15:12:51,2007-03-15 10:41:15.252002,zenbu
What's too bad is that most of this information gets lost in the shuffle. When GPSBabel turns this into .GPX, it just takes the information in the "name" field and puts it into <name>, <cmt>, and <desc> tags, like so:

Code:
<wpt lat="-36.848021000" lon="174.766374000">
<time>2006-10-06T00:00:00Z</time>
  <name>The Don</name>
  <cmt>The Don</cmt>
  <desc>The Don</desc>
</wpt>
I messed around with changing the headings in the first line of the .CSV file, but that did not help. I imagine that with some tweaking, either GPSBabel or some other program could assign the tags more intelligently, and mabe even concatenate fields in some reasonable manner (e.g. put address, phone, hours, and website into the <desc> tag separated by line breaks). Any suggestions on a good program or technique for doing this?

The folks at the New Zealand Open GPS Maps Project (gwprojects.orcon.net.nz/gps/) have figured out a way to get all of this information into useful waypoints for Garmin units--including icons appropriate to the type of waypoint, inclusion of addresses & phone numbers, etc. Is there any reasonable prospect of doing something similar with Mapper?
 
abby_normal's Avatar
Posts: 48 | Thanked: 4 times | Joined on Jan 2008
#2
OK, after trying a lot of things, and some greatly-appreciated help from the folks on the NZ Open GPS Project website, I am much closer to being able to use the data! After jumping through various hoops, I can generate a .gpx file that contains all of the information I think can be squeezed into Maemo Mapper. The .gpx file does import into Google Earth and various other utilities. However, the POI --> Import . . . menu item in mapper does not work. I get the error "Error parsing GPX file". Unfortunately I have no idea what the parser thinks is wrong with it. Maybe something to do with the categories? I read somewhere that categories were handled through the <sym> tag, but perhaps that is wrong. Does anyone have any insight into what might be wrong with the following .gpx format?

Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="Zenbu - http://www.zenbu.co.nz" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

<metadata>
<link href="http://www.zenbu.co.nz">
<text>Zenbu POIs via NZ Open GPS Project</text>
</link>
</metadata>
<wpt lat="-36.86405" lon="174.71991">
<name>auckland zoo</name>
<cmt>motions rd, western springs, akl  +64 (9) 360-3800  7 days 9.30am - 5.30pm</cmt>
<desc>motions rd, western springs, akl  +64 (9) 360-3800  7 days 9.30am - 5.30pm</desc>
<sym>Zoo</sym>
</wpt>
<wpt lat="-37.88288" lon="175.23794">
<name>vilagrad vineyard and winery</name>
<cmt>702 rukuhia rd, ngahinapouri  +64 (7) 825-2893  </cmt>
<desc>702 rukuhia rd, ngahinapouri  +64 (7) 825-2893  </desc>
<sym>Vineyard Winery</sym>
</wpt>
</gpx>
__________________
Igor: I'm almost sure that was the name.
 
abby_normal's Avatar
Posts: 48 | Thanked: 4 times | Joined on Jan 2008
#3
Erm, alternatively, if anyone could provide an example of a POI in .gpx format that successfully loads lat, lon, label, description, and category information into Maemo Mapper, that would be a really helpful start. (And does the category have to already exist in Mapper before loading to succeed?).

Update: I found the source of the parsing problem . . . Mapper did not like the stuff in the <gpx> tag, so when that is simplified to "<gpx>", and the <metadata> tag is taken out entirely, Mapper loads it just fine--except for the category. Regardless of whether the category already exists in mapper or not, the <sym> tag gets ignored and the category is set to the "default" category. So if anyone has a suggestion about how to successfully load category from a .gpx file, that would be most appreciated.
__________________
Igor: I'm almost sure that was the name.

Last edited by abby_normal; 2008-02-01 at 18:57.
 
rcull's Avatar
Posts: 299 | Thanked: 168 times | Joined on Jun 2006 @ Wales UK
#4
abby_normal

If you run Windross there is always Poi_Loader :-

http://www.internettablettalk.com/fo...ght=Poi_Loader

Rick
 
abby_normal's Avatar
Posts: 48 | Thanked: 4 times | Joined on Jan 2008
#5
Thanks! I did know about this app from browsing the forums, and it looks quite useful. I will try it, but as the developer, can you tell me how I should prepare my .GPX file so your app will be able to read the categories and input them into the database? Should I put the category in a <sym> tag, like so:

<sym>Police Station</sym>

. . . or do I need to use a different tag, or even some other category identifier like a number? Since I am looking to import around 40,000 POIs, manually setting the category for each one isn't an option.
__________________
Igor: I'm almost sure that was the name.
 
Posts: 566 | Thanked: 150 times | Joined on Dec 2007
#6
Originally Posted by abby_normal View Post
Thanks! I did know about this app from browsing the forums, and it looks quite useful. I will try it, but as the developer, can you tell me how I should prepare my .GPX file so your app will be able to read the categories and input them into the database? Should I put the category in a <sym> tag, like so:

<sym>Police Station</sym>

. . . or do I need to use a different tag, or even some other category identifier like a number? Since I am looking to import around 40,000 POIs, manually setting the category for each one isn't an option.
I have no experience with importing POI but you should try a xml tool to validate your gpx file against the doctype definition mentioned in the qpx file quoted above (http://www.topografix.com/GPX/1/1/gpx.xsd).
 
abby_normal's Avatar
Posts: 48 | Thanked: 4 times | Joined on Jan 2008
#7
I appreciate the suggestion! For what it is worth, the example cited above validates against that schema, according to this NIST tool (Xerces/Jing parsers). But I guess technically valid is not enough to get it to play nice with mapper. As mentioned above, I finally got Mapper to accept the POIs by simplifying the <gpx> opening tag to "<gpx>" and removing the "<metadata>" tag and data altogether. It's just the category issue at this point . . .
__________________
Igor: I'm almost sure that was the name.
 
rcull's Avatar
Posts: 299 | Thanked: 168 times | Joined on Jun 2006 @ Wales UK
#8
abby_normal

Yes Poi_Loader uses the sym tag and creates a new category in poi.db if it doesn't already exist. If you connect your table with USB (and poi.db is on an accessible card )then you can update poi.db in situ.

Rick
 
abby_normal's Avatar
Posts: 48 | Thanked: 4 times | Joined on Jan 2008
#9
Drat. Rick, I really appreciate your taking the time to answer my questions. Unfortunately, poi loader (I am using 1.0_pre) can load the attached GPX file just fine--as can the built-in "import" function--but the categories are not getting picked up. The category simply defaults to what I select at import time as the default (e.g. "Other").

I will note one other difference--Mapper's built-in import function preserves the line breaks in the <desc> tag, while poi loader converts them to spaces. That may be a "feature" not a bug, I just wanted to point it out.

NB, you probably need to change the extension of the attached back to ".gpx". I could not upload it with that extension, so I changed it to ".txt".

Perhaps preserving the categories isn't going to be possible . . . but if you happen to have an example GPX file you'd be willing to share that does pick up the categories upon loading, I'd love to see it. Maybe by eyeballing the way it is constructed I can figure out how to tweak the format of the attached (or rather, the script that generates the attached). Thanks again.
Attached Files
File Type: txt nzpoi.txt (3.2 KB, 145 views)
__________________
Igor: I'm almost sure that was the name.
 
Posts: 179 | Thanked: 90 times | Joined on Dec 2007
#10
Originally Posted by abby_normal View Post
Perhaps preserving the categories isn't going to be possible . . . but if you happen to have an example GPX file you'd be willing to share that does pick up the categories upon loading, I'd love to see it.

try-
http://gnuite.com:8080/cgi-bin/poi.cgi

it'll generate valid pois in *gpx format all day...

hope this helps,
kernelpanic
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:47.