[ gpsdrive ] GPSDrive with Mapnik and OSM: claims "No map available for this position"
Jan-Erik Skata
jeskata at gmail.com
Wed Jun 18 08:10:42 AKDT 2008
On Tue, Jun 17, 2008 at 9:54 PM, Jan-Erik Skata <jeskata at gmail.com> wrote:
> On Tue, Jun 17, 2008 at 9:10 PM, Jan-Erik Skata <jeskata at gmail.com> wrote:
>
>> On Mon, Jun 16, 2008 at 12:08 PM, Guenther Meyer <d.s.e at sordidmusic.com>
>> wrote:
>>
>>> Am Montag 16 Juni 2008 schrieb Ross Scanlon:
>>> > On Sun, 15 Jun 2008 20:10:30 +0300
>>> >
>>> > "Jan-Erik Skata" <jeskata at gmail.com> wrote:
>>> > > Now I have tried completely reinstalling the databases (postgres and
>>> > > postgis) and installing map data again using osm2pgsql, without
>>> further
>>> > > success.
>>> > > Is there any way I can check where the problem might be, in GPSDrive,
>>> > > Mapnik or perhaps osm2pgsql? But still, Mapnik seems to be rendering
>>> > > correctly.
>>> >
>>> > If you can render a test image using generate_image.py from Mapnik then
>>> the
>>> > problem lies after this.
>>> >
>>> > So probably something to do with gpsdrive.
>>> >
>>> > I gather it's not showing the correct position in gpsdrive
>>>
>>> this looks definitely like a mapnik problem or its datasources.
>>> none of the messages comes from gpsdrive.
>>>
>>>
>>
>> OK, I have restored from image and re-installed everything - still does
>> the same. What's going on here?
>>
>
> After unchecking mapnik mode I get this message:
> db_postgis_query: an error occured while trying to read from the database!
> query: SELECT name,poi,ASTEXT(way) AS geometry FROM planet_osm_point WHERE
> SetSRID(way,-1) && SetSRID('BOX3D(-62464.39000975 6672245.68381766 ,
> 2826898.48558904 9686088.73319662)'::box3d,-1) AND poi IN () LIMIT 20000;
> db_postgis_query: an error occured while trying to read from the database!
> query: SELECT name,poi,ASTEXT(way) AS geometry FROM planet_osm_point WHERE
> SetSRID(way,-1) && SetSRID('BOX3D(-62464.39000975 6672245.68381766 ,
> 2826898.48558904 9686088.73319662)'::box3d,-1) AND poi IN () LIMIT 20000;
>
> This is the output in verbose mode:
> $ gpsdrive -v
> DB: Using waypoints from local user file.
> DB: Using waypoints from OpenStreetMap database.
> Trying Kismet server
>
> Read 576 POI-Types from geoinfo.db
> registered datasource : postgis
> registered datasource : raster
> registered datasource : shape
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=2
> bit_depth=8 color_type=2
> bit_depth=8 color_type=6
> ### WARNING: Failed to load image file
> '/usr/local/share/icons/map-icons/classic.small/misc/landmark/forest.png':
> cannot open image file
> /usr/local/share/icons/map-icons/classic.small/misc/landmark/forest.png
> bit_depth=8 color_type=2
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> bit_depth=8 color_type=6
> size = 2
> file=/usr/local/share/mapnik/world_boundaries/world_boundaries_m
> type=shape
> Envelope(-20037400,-19929239.11,20037400,18375854.70964293)
> file_length=3334676
> shape_type=5
> datasource=0x85ad370 type=1
> size = 2
> file=/usr/local/share/mapnik/world_boundaries/world_bnd_m
> type=shape
>
> Envelope(-20037497.21084017,-19929239.11337915,20037497.21084017,18379686.99645032)
> file_length=24247658
> shape_type=5
> datasource=0x859fc78 type=1
> size = 2
> file=/usr/local/share/mapnik/world_boundaries/processed_p
> type=shape
> Envelope(-20037508,-7554415.190025273,20037508,15271501.44953631)
> file_length=180035906
> shape_type=5
> datasource=0x85ad3d8 type=1
> size = 2
> file=/usr/local/share/mapnik/world_boundaries/builtup_area
> type=shape
>
> Envelope(-19940616.76573496,-6979803.136120869,19864212.01086172,11359336.05685957)
> file_length=6689146
> shape_type=5
> datasource=0x85aaf70 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_polygon order by z_order,way_area desc) as
> leisure
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x85a7628 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_polygon where landuse='reservoir' or
> landuse='water' or "natural"='lake' or "natural"='water' or
> "natural"='land' order by z_order) as water
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x859d270 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_line where waterway IS NOT NULL or
> landuse='reservoir' or landuse='water' or "natural"='lake' or
> "natural"='water' order by z_order) as water
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x8591c58 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=
> (select * from planet_osm_line order by z_order) as roads
>
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x859da38 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=
> (select * from planet_osm_line order by z_order) as roads
>
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x858b4b0 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=
> (select * from planet_osm_roads order by z_order) as roads
>
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x85a88d8 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_line where waterway IS NOT NULL or
> landuse='reservoir' or landuse='water' or "natural"='lake' or
> "natural"='water' order by z_order) as water
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x859a5e0 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=
> (select * from planet_osm_line order by z_order) as roads
>
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x85ac1d8 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_point where amenity IS NOT NULL or railway
> is NOT NULL or "natural" is NOT NULL or man_made is NOT NULL or highway is
> NOT NULL or aeroway is NOT NULL) as amenity
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x8585f08 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_line where "power"='line' order by z_order)
> as power
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x859dff8 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_point where power is NOT NULL) as
> power_towers
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x85acef8 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=
> (select
> way,highway,landuse,"natural",man_made,waterway,tourism,learning,amenity,place,name,ref,oneway,char_length(ref)
> as length from planet_osm_line where waterway IS NULL and leisure IS NULL
> and landuse IS NULL) as roads
>
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x85acac0 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=(select * from planet_osm_polygon order by z_order,way_area desc) as
> leisure
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x85b7380 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=planet_osm_point
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x85b9af0 type=1
> size = 6
> dbname=gis
> estimate_extent=false
> extent=-20037508,-19929239,20037508,19929239
> host=/var/run/postgresql
> table=
> (select * from planet_osm_line where "boundary"='administrative'
> order by z_order) as admin
> type=postgis
> borrow 0x85d0db8
> unknown type_oid=17164
> return 0x85d0db8
> datasource=0x858bd18 type=1
> size = 2
> file=/usr/local/share/mapnik/world_boundaries/places
> type=shape
>
> Envelope(-175.2365875244141,-41.21039581298828,179.2218933105469,66.14411926269531)
> file_length=3564
> shape_type=1
> datasource=0x8509930 type=1
> /home/jskata/.gpsdrive/way.txt reloaded
>
>
> Could this "unknown type_oid" have something to do with the problem?
>
> What can I try next? Should I install the entire world map and see where I
> end up?
>
I somehow believe this has something to do with postgis or how the database
is set up. Which version of postgis are people using here? I have 1.3.3,
will try 1.3.1 later.
To set up the database I do
#> su - postgres
$> createuser jskata
$> createdb -E UTF8 -O jskata gis
$> createlang plpgsql gis
$> psql -d gis -f /usr/share/postgresql/contrib/lwpostgis.sql
$> echo "ALTER TABLE geometry_columns OWNER TO jskata; ALTER TABLE
spatial_ref_sys OWNER TO jskata;" | psql -d gis
and then as user jskata
$> ./osm2pgsql -d gis finland.osm.bz2
osm2pgsql SVN version 0.54-20080617 $Rev: 7975 $
Using projection SRS 3395 (WGS84 Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Mid: Ram, scale=100
Reading in file: ../finland.osm.bz2
Processing: Node(1823k) Way(112k) Relation(0k)
Node stats: total(1823122), max(270815983)
Way stats: total(112415), max(24922722)
Relation stats: total(370), max(17296)
Writing way(42k)
Would anyone dare to update their database with the latest extracts, using
the latest osm2pgsql and the run the latest GPSDrive?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gpsdrivers.org/pipermail/gpsdrive/attachments/20080618/eb2f3236/attachment.html>
More information about the GPSdrive
mailing list