On Tue, Jun 17, 2008 at 9:54 PM, Jan-Erik Skata &lt;<a href="mailto:jeskata@gmail.com" target="_blank">jeskata@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div></div><div>On Tue, Jun 17, 2008 at 9:10 PM, Jan-Erik Skata &lt;<a href="mailto:jeskata@gmail.com" target="_blank">jeskata@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div><div></div><div>On Mon, Jun 16, 2008 at 12:08 PM, Guenther Meyer &lt;<a href="mailto:d.s.e@sordidmusic.com" target="_blank">d.s.e@sordidmusic.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



Am Montag 16 Juni 2008 schrieb Ross Scanlon:<br>
<div>&gt; On Sun, 15 Jun 2008 20:10:30 +0300<br>
&gt;<br>
&gt; &quot;Jan-Erik Skata&quot; &lt;<a href="mailto:jeskata@gmail.com" target="_blank">jeskata@gmail.com</a>&gt; wrote:<br>
&gt; &gt; Now I have tried completely reinstalling the databases (postgres and<br>
&gt; &gt; postgis) and installing map data again using osm2pgsql, without further<br>
&gt; &gt; success.<br>
&gt; &gt; Is there any way I can check where the problem might be, in GPSDrive,<br>
&gt; &gt; Mapnik or perhaps osm2pgsql? But still, Mapnik seems to be rendering<br>
&gt; &gt; correctly.<br>
&gt;<br>
&gt; If you can render a test image using generate_image.py from Mapnik then the<br>
&gt; problem lies after this.<br>
&gt;<br>
&gt; So probably something to do with gpsdrive.<br>
&gt;<br>
&gt; I gather it&#39;s not showing the correct position in gpsdrive<br>
<br>
</div>this looks definitely like a mapnik problem or its datasources.<br>
none of the messages comes from gpsdrive.<br>
<br></blockquote></div><br><br></div></div>OK, I have restored from image and re-installed everything - still does the same. What&#39;s going on here?<br>
</blockquote></div><br></div></div>After unchecking mapnik mode I get this message:<br>db_postgis_query: an error occured while trying to read from the database!<br>query: SELECT name,poi,ASTEXT(way) AS geometry FROM planet_osm_point WHERE SetSRID(way,-1) &amp;&amp; SetSRID(&#39;BOX3D(-62464.39000975 6672245.68381766 , 2826898.48558904 9686088.73319662)&#39;::box3d,-1) AND poi IN () LIMIT 20000;<br>


db_postgis_query: an error occured while trying to read from the database!<br>query: SELECT name,poi,ASTEXT(way) AS geometry FROM planet_osm_point WHERE SetSRID(way,-1) &amp;&amp; SetSRID(&#39;BOX3D(-62464.39000975 6672245.68381766 , 2826898.48558904 9686088.73319662)&#39;::box3d,-1) AND poi IN () LIMIT 20000;<br>


<br>This is the output in verbose mode:<br>$ gpsdrive -v<div><br>DB: Using waypoints from local user file.<br>DB: Using waypoints from OpenStreetMap database.<br></div>Trying Kismet server<div><div></div><div>
<br>Read 576 POI-Types from geoinfo.db<br>registered datasource : postgis<br>
registered datasource : raster<br>registered datasource : shape<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>


bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>


bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>


bit_depth=8 color_type=2<br>bit_depth=8 color_type=2<br>bit_depth=8 color_type=6<br>### WARNING: Failed to load image file &#39;/usr/local/share/icons/map-icons/classic.small/misc/landmark/forest.png&#39;: cannot open image file /usr/local/share/icons/map-icons/classic.small/misc/landmark/forest.png<br>


bit_depth=8 color_type=2<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>


bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>


bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>


bit_depth=8 color_type=6<br>bit_depth=8 color_type=6<br>size = 2<br>file=/usr/local/share/mapnik/world_boundaries/world_boundaries_m<br>type=shape<br>Envelope(-20037400,-19929239.11,20037400,18375854.70964293)<br>file_length=3334676<br>


shape_type=5<br></div></div>datasource=0x85ad370 type=1<div><br>size = 2<br>file=/usr/local/share/mapnik/world_boundaries/world_bnd_m<br>type=shape<br>Envelope(-20037497.21084017,-19929239.11337915,20037497.21084017,18379686.99645032)<br>


file_length=24247658<br>shape_type=5<br></div>datasource=0x859fc78 type=1<div><br>size = 2<br>file=/usr/local/share/mapnik/world_boundaries/processed_p<br>type=shape<br>Envelope(-20037508,-7554415.190025273,20037508,15271501.44953631)<br>

</div>
file_length=180035906<br>shape_type=5<br>datasource=0x85ad3d8 type=1<div><br>size = 2<br>file=/usr/local/share/mapnik/world_boundaries/builtup_area<br>type=shape<br>Envelope(-19940616.76573496,-6979803.136120869,19864212.01086172,11359336.05685957)<br>


file_length=6689146<br>shape_type=5<br></div>datasource=0x85aaf70 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>
table=(select * from planet_osm_polygon order by z_order,way_area desc) as leisure<br>
type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x85a7628 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>

host=/var/run/postgresql<br>
table=(select * from planet_osm_polygon where landuse=&#39;reservoir&#39; or landuse=&#39;water&#39; or&nbsp; &quot;natural&quot;=&#39;lake&#39; or &quot;natural&quot;=&#39;water&#39; or &quot;natural&quot;=&#39;land&#39; order by z_order) as water<br>


type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x859d270 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>

host=/var/run/postgresql<br>
table=(select * from planet_osm_line where waterway IS NOT NULL or landuse=&#39;reservoir&#39; or landuse=&#39;water&#39; or&nbsp; &quot;natural&quot;=&#39;lake&#39; or &quot;natural&quot;=&#39;water&#39; order by z_order) as water<br>


type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x8591c58 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>

host=/var/run/postgresql<br>
table=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select * from planet_osm_line order by z_order) as roads<br><br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x859da38 type=1<div><br>
size = 6<br>dbname=gis<br>estimate_extent=false<br>
extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>table=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select * from planet_osm_line order by z_order) as roads<br><br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>

return 0x85d0db8<br>
datasource=0x858b4b0 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>table=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select * from planet_osm_roads order by z_order) as roads<br>


<br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x85a88d8 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>

host=/var/run/postgresql<br>
table=(select * from planet_osm_line where waterway IS NOT NULL or landuse=&#39;reservoir&#39; or landuse=&#39;water&#39; or&nbsp; &quot;natural&quot;=&#39;lake&#39; or &quot;natural&quot;=&#39;water&#39; order by z_order) as water<br>


type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x859a5e0 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>

host=/var/run/postgresql<br>
table=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select * from planet_osm_line order by z_order) as roads<br><br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x85ac1d8 type=1<div><br>
size = 6<br>dbname=gis<br>estimate_extent=false<br>
extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>table=(select * from planet_osm_point where amenity IS NOT NULL or railway is NOT NULL or &quot;natural&quot; is NOT NULL or man_made is NOT NULL or highway is NOT NULL or aeroway is NOT NULL) as amenity<br>


type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x8585f08 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>

host=/var/run/postgresql<br>
table=(select * from planet_osm_line where &quot;power&quot;=&#39;line&#39; order by z_order) as power<br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x859dff8 type=1<div>

<br>size = 6<br>
dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>table=(select * from planet_osm_point where power is NOT NULL) as power_towers<br>type=postgis<br></div>borrow 0x85d0db8<br>


unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x85acef8 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>
table=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select way,highway,landuse,&quot;natural&quot;,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<br>


<br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x85acac0 type=1<div><br>size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>

host=/var/run/postgresql<br>
table=(select * from planet_osm_polygon order by z_order,way_area desc) as leisure<br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x85b7380 type=1<div>
<br>size = 6<br>dbname=gis<br>
estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>table=planet_osm_point<br>type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x85b9af0 type=1<div>

<br>
size = 6<br>dbname=gis<br>estimate_extent=false<br>extent=-20037508,-19929239,20037508,19929239<br>host=/var/run/postgresql<br>table=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (select * from planet_osm_line where &quot;boundary&quot;=&#39;administrative&#39; order by z_order) as admin<br>


type=postgis<br></div>borrow 0x85d0db8<br>unknown type_oid=17164<br>return 0x85d0db8<br>datasource=0x858bd18 type=1<div><br>size = 2<br>file=/usr/local/share/mapnik/world_boundaries/places<br>type=shape<br>
Envelope(-175.2365875244141,-41.21039581298828,179.2218933105469,66.14411926269531)<br>
file_length=3564<br>shape_type=1<br></div>datasource=0x8509930 type=1<br>/home/jskata/.gpsdrive/way.txt reloaded<br><br><br>Could this &quot;unknown type_oid&quot; have something to do with the problem?<br><br>What can I try next? Should I install the entire world map and see where I end up?<br>


</blockquote></div><br><br>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.<br><br>To set up the database I do<br>
#&gt; su - postgres<br>$&gt; createuser jskata<br>$&gt; createdb -E UTF8 -O jskata gis<br>$&gt; createlang plpgsql gis<br>$&gt; psql -d gis -f /usr/share/postgresql/contrib/lwpostgis.sql<br>$&gt; echo &quot;ALTER TABLE geometry_columns OWNER TO jskata; ALTER TABLE spatial_ref_sys OWNER TO jskata;&quot;&nbsp; | psql -d gis<br>
<br>and then as user jskata<br>$&gt; ./osm2pgsql -d gis finland.osm.bz2<br>osm2pgsql SVN version 0.54-20080617 $Rev: 7975 $<br><br>Using projection SRS 3395 (WGS84 Mercator)<br>Setting up table: planet_osm_point<br>Setting up table: planet_osm_line<br>
Setting up table: planet_osm_polygon<br>Setting up table: planet_osm_roads<br>Mid: Ram, scale=100<br><br>Reading in file: ../finland.osm.bz2<br>Processing: Node(1823k) Way(112k) Relation(0k)<br>Node stats: total(1823122), max(270815983)<br>
Way stats: total(112415), max(24922722)<br>Relation stats: total(370), max(17296)<br><br>Writing way(42k)<br><br><br>Would anyone dare to update their database with the latest extracts, using the latest osm2pgsql and the run the latest GPSDrive?<br>