Board index FlightGear Release candidates 2.10

how many gps waypoint can we stock in fg 2.10 ?

This is the archive of topics about the 2.10 release candidates.

how many gps waypoint can we stock in fg 2.10 ?

Postby jeep » Thu Feb 21, 2013 1:35 pm

i'm trying to correct the garmin 196
when i try to load the cities stored in cities.xml, it block with the error :

Sqlite error:PRIMARY KEY must be unique (19) while running:
INSERT INTO octree (rowid, children) VALUES (?1, 0)
caught exception processing subsystem:flight
message:Sqlite error:PRIMARY KEY must be unique

that i understand is that the key can't be more than x (i don't know how...) entries in this table.

so, my question is : how many gps point (for the gamin 196, it's the cities) can we add to the sqlite base ?
jeep
 
Posts: 73
Joined: Mon Feb 14, 2011 10:37 am

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby zakalawe » Thu Feb 21, 2013 2:42 pm

There's no limit on number, the problem is you're doing this each launch. The error is that the primary key (IDENT) must be unique. The better solution would be for me to add cities natively, so you don't need to do it all, in your code. If that's acceptable, I could do this quite easily. Ideally I would prefer a 'better' cities data source however, since this could be used by many GPS systems. It could also be displayed on the nav-map, which would be very useful.

And, actually, we could offer airport search by city, would also be nice.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby jeep » Thu Feb 21, 2013 3:00 pm

i saw that i trie to ad the waypoints each startup, and now , i do it juste one time (on my computer)

the better way would be to have a world base of cities natively on flightgear
if you do it, i will modify the garmin 196 to access it

what do you need to add it on flightgear ?
and can we have a new type of waypoint (to have a difference with user waypoint, airport, fix, etc ...) ?
and how to delete a user waypoint ? in older version , we don't have to delete waypoint because flightgear "forget" them on shutdown ...
jeep
 
Posts: 73
Joined: Mon Feb 14, 2011 10:37 am

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby F-JJTH » Thu Feb 21, 2013 3:51 pm

In my mind, a good solution could be a "cities.dat" file which contains :

# LAT LON NAME Z-INDEX
43.497968 4.807205 Avignon 6


where Z-INDEX is used to choose when to display the waypoint depending on zoom level. For Example, every capital (Paris, London, Madrid, Roma....) will be always displayed on the map (Z-INDEX=100). Barcelona, Manchester, San Francisco... will be displayed on the map only when we are at the first step of zoom (Z-INDEX=50). Then little cities could have a Z-INDEX=3 (they will displayed only when we are zooming at max)

This kind of file could be shared with X-Plane community (they share their apt.dat since long years... a good consideration could be share our cities.dat :) )

Just my 2 cents
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby zakalawe » Thu Feb 21, 2013 4:39 pm

I can deal with any format that's sane - XML or simply line of text. At a minimum, lat, lon and full name. Ideally a rough population or size code would be good. My only concern with your existing data file is the names seem to be truncated; I guess the G196 does that, but for a global solution, I would prefer to store full names have your UI shorten the name if required.

And yes of course this would be a new type in DB and for Nasal queries, that's no problem.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby Hooray » Thu Feb 21, 2013 5:03 pm

there's a related feature request regarding ESRI/shapefile support in FG and supporting other geo-referenced data, this would have a number of uses in FG.
Using Tom's cppbind framework, it would not even seem difficult to add ESRI bindings to Nasal, so that standard ESRI shapefiles could be processed by FG instead of custom-baked file formats.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby F-JJTH » Fri Feb 22, 2013 9:04 pm

Since OSM data are now compatible with FG license, why don't use it ? Two solutions are doable :
1) Use the XAPI request system : it require a working Internet connection, we could refresh the MapWidget depending on zoom level with different
2) Generate a "poi.dat.gz" (Point Of Interest) from OSM database (request to download the Planet.osm ~25Gb compressed) : it require to be synced regulary (each release?)

Looking at the XAPI request system it's really easy to make a request for worldwide or specific area. With XML format for example :

List of all country in the world + capital_city :
http://www.overpass-api.de/api/xapi?node[place=country]

List of all cities in an area :
http://www.overpass-api.de/api/xapi?node[place=city][bbox=-1.32,42.94,9.24,46.23] ( bbox=west,south,east,north )

We can use several "place" tags like :
place=country
place=county
place=city
place=town
place=village
place=hamlet

Be careful ! For town, village, hamlet you need to use a reasonable bounding box !

The same can be done with JSON format : http://www.overpass-api.de/api/interpreter?data=[out:json];node[place=country]%28-4,38,12,60%29;out;
User avatar
F-JJTH
 
Posts: 696
Joined: Fri Sep 09, 2011 12:02 pm

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby Zosma » Sat Feb 23, 2013 12:24 pm

There is also
http://earth-info.nga.mil/gns/html/namefiles.htm which could be used as a starting point.

I've only used it for The Netherlands myself and it isn't perfect: there are double entries and some very weird ones, like a city entry that in reality is only a street somewhere.

I don't think the license would be an issue?
Foreign geographic names data is freely available. A suitable citation note is: "Toponymic information is based on the Geographic Names Database, containing official standard names approved by the United States Board on Geographic Names and maintained by the National Geospatial-Intelligence Agency. More information is available at the Maps and Geodata link at http://www.nga.mil. The National Geospatial-Intelligence Agency name, initials, and seal are protected by 10 United States Code Section 425."
Zosma
 
Posts: 12
Joined: Sat Mar 31, 2012 2:36 pm
Location: Enschede, The Netherlands
Callsign: PH-ZOS
Version: git
OS: GNU/Linux

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby zakalawe » Sat Feb 23, 2013 10:35 pm

The stuff with online queries can wait. For now I would like a simpler static file to parse, please. That's something I can get working in the existing system in an afternoon, with no risk. The other stuff being discussed here, I'll leave to someone who cares more than I do.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby Hooray » Sat Feb 23, 2013 10:43 pm

zakalawe wrote in Sat Feb 23, 2013 10:35 pm:Ideally I would prefer a 'better' cities data source however, since this could be used by many GPS systems. It could also be displayed on the nav-map, which would be very useful. And, actually, we could offer airport search by city, would also be nice.
The stuff with online queries can wait. For now I would like a simpler static file to parse, please.


Agreed, the simplest/quickest solution would probably mean directly importing ESRI files into the DB, the more flexible approach would be providing bindings to read in ESRI shapefiles, so that contributors would handle such details.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby Zosma » Sat Feb 23, 2013 11:30 pm

In the link I provided there are static files, just tab delimited. I cannot vouch for how usable they are though.
Zosma
 
Posts: 12
Joined: Sat Mar 31, 2012 2:36 pm
Location: Enschede, The Netherlands
Callsign: PH-ZOS
Version: git
OS: GNU/Linux

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby zakalawe » Sat Feb 23, 2013 11:42 pm

Zosma wrote in Sat Feb 23, 2013 11:30 pm:In the link I provided there are static files, just tab delimited. I cannot vouch for how usable they are though.

That's a little too far to the other extreme, 1.2GB uncompressed.

If someone could generate lat, lon, full name, population from that data in a single file (tab delimited is probably smaller than XML), that would be ideal. The existing G196 cities.xml is close, except there's no size information and the names are truncated.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby Zosma » Sun Feb 24, 2013 12:12 am

Fair enough, 1.2 GB is way too much. What's more, population information is not available for The Netherlands and probably other countries. The extraction would be quite easy, but coping with the double/useless entries and the lack of population information not so much. Mmm.
Zosma
 
Posts: 12
Joined: Sat Mar 31, 2012 2:36 pm
Location: Enschede, The Netherlands
Callsign: PH-ZOS
Version: git
OS: GNU/Linux

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby zakalawe » Sun Feb 24, 2013 11:22 am

Zosma wrote in Sun Feb 24, 2013 12:12 am:What's more, population information is not available for The Netherlands and probably other countries. The extraction would be quite easy, but coping with the double/useless entries and the lack of population information not so much. Mmm.

If you want to extract entries for the whole world, based on some criteria (population >= 1000? 10000?) and let me know the resulting size in text and gziped text, I would be happy to use that data. Adding in missing items (.nl, and the USA I think) we could do ad-hoc.

Of course, if someone has a better source, that's fine too. I'd be curious to know the original source for the cities.xml which the G196 includes - that file is pretty small, so it must only include larger cities (>=100000?).
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: how many gps waypoint can we stock in fg 2.10 ?

Postby Hooray » Sun Feb 24, 2013 11:27 am

we can keep ignoring the whole ESRI shapefile idea, which is fine - but at least let us know if you'd be willing to review a corresponding patch to add ESRI support instead of adding yet-another custom file format (aka "re-invented wheel").

A modern GPS implemented in FG would inevitably benefit from such a feature.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Next

Return to 2.10

Who is online

Users browsing this forum: No registered users and 1 guest