[FOSS-GPS] FoxtrotGPS - POI and other stuff

Joshua Judson Rosen rozzin at hackerposse.com
Sun Jan 8 22:52:51 PST 2017

On 12/15/2016 06:14 AM, David Bannon wrote:
> On 15/12/16 20:52, Sezer Yalcin wrote:
>> Just for #1
>> Sqlite is very common database. You can use available C libraries or
>> deal with it use simpler scripting languages like
>> PHP https://secure.php.net/manual/en/book.sqlite3.php
> Yes, thanks Sezer. I should have chosen my words more carefully. What I
> want to know is the database schema, the names of the database columns
> and what sort of data foxtrot expects to find in there. If I could find
> an (Foxtrot POI) example file, I could use sqlite to dump the schema but
> I have not found anything like one.

Hi, David!

Gosh it's been a while....

Regarding the POI table, it's just defined in poi.c
(at "#define POI_DB_CREATE").

Adding some inline comments...:

	CREATE TABLE poi (idmd5 TEXT, -- a unique ID-string
	                  lat REAL, lon REAL, -- location
	                  visibility REAL, -- 1=public, 0=personal
	                  cat REAL, subcat REAL, -- index into menus
	                  keywords TEXT, -- i.e. POI name
	                  desc TEXT, -- description
	                  price_range REAL, -- 1, 3, or 5
	                  extended_open REAL, -- really a bool
	                  creator TEXT, -- not used
	                  bookmarked REAL, -- not used
	                  user_rating REAL, -- not used
	                  rating REAL, -- not used
	                  user_comment TEXT); -- not used

Thought you might think it from the name, "idmd5" ID-string
is not an md5sum of anything; it's formed by concatenating
the textual forms of two large random numbers together,
but really it could be anything (a UUID would probably be
a better choice).

The price_range values 1, 3, and 5 correspond to
"budget", "medium", and "exclusive".

extended_open is the "extended opening hours" checkbox,
where 1=checked, 0=unchecked.

I'm not immediately sure whether any of the various
unused columns after extended_open were _ever used_
back when Marcus was developing the codebase as tangoGPS,
or if he just reserved them because he thought he might
use them for something at some point in the future....

In response to your other questions...:

>> On Thu, Dec 15, 2016 at 12:40 PM, David Bannon
>> <dbannon at internode.on.net <mailto:dbannon at internode.on.net>> wrote:
>>     Hi Folks, some questions about FoxtrotGPS ?
>>     1. Reference is made to the poi.db, an sqlite database. Anyone
>>     know where the format of that file is documented ? I might be able
>>     to work it out from poi.c but not very keen.
>>     2. My install of Foxtrot does not have any mention of poi in
>>     menus, is that because the Ubuntu build chooses to not support poi ?

No idea why the POI menu-items would be missing. The menus work
other than that--you have items for waypoints, route-finding,
route-planning, photos...?

I don't think there's any code to show/hide the "show POIs" item
or the "POIs" submenu.

>>     3. Assuming above, I grabbed source but the INSTALL file with
>>     building instructions seems to have gone away. Those instructions
>>     exist on the web site, should we make a new INSTALL file or remove
>>     reference to it from README ?

It should still be in the release tarballs; it's autogenerated
when you run ./autogen.sh. There used to be a version in bzr that
basically had the contents of the README prepended to it;
that was removed mostly to let Autotools actually give us
as up-to-date a set of INSTALL instructions as it could
(and prepending our README onto INSTALL seemed redundant--
especially when the INSTALL file that Autotools generates says
"see the `README' file for instructions specific to this package"
at the top of the file).

>>     4. In Contributions, the script, gpx2osm, line 26 says "...osm
>>     version='0.5'...". OSM now requires version 0.6, fortunately, what
>>     we are doing here is unchanged with the version boost so its a
>>     simple edit, change 0.5 to 0.6

Is that really all that needs to be changed?

Hm. While I'm looking at that... do you know if the "generator='JOSM'"
bit is actually necessary? (IIRC you just copied that verbatim
from Marcus' perl script?)

>>     5. Do you want a "pull request" or what ever Launchpad uses to do
>>     3 and 4 of this ?

Does the above explanation change your mind any about the INSTALL file? ;)

More information about the FOSS-GPS mailing list