Re: [OSM-dev] Osm2pgsql not importing routes?
Le 26/02/2012 23:00, Jon Burgess a écrit : On Sun, 2012-02-26 at 18:31 +0100, yvecai wrote: I use ubuntu 10.04, postgresql 8.4.10, postgis 2.0, libgeos 3.2.2. Find here the complete osm2pgsql install and output: http://www.pistes-nordiques.org/download/osm2pgsql.out A while back there were a few reports of a similar issue and it turned out to be due to having multiple versions of Geos installed. I think the root cause was that the code compiled using the headers from one library version but then linked against a different one. This only effects the part of osm2pgsql which uses geos to build the relation geometries. There are some signs in your compile logs which suggest you have a locally compiled version of Geos in /usr/local so you may have hit the same issue. If you want to be sure you compile using your copy in /usr/local then try removing the system libgeos-dev package and rebuild osm2pgsql. Jon I removed libgeos-dev, but no cigar. Then I removed everything and installed back libgeos 3.2.2 from ubuntu-gis ppa, then rebuild osm2pgsql, still no relations. ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
Le 26/02/2012 23:00, Jon Burgess a écrit : On Sun, 2012-02-26 at 18:31 +0100, yvecai wrote: I use ubuntu 10.04, postgresql 8.4.10, postgis 2.0, libgeos 3.2.2. Find here the complete osm2pgsql install and output: http://www.pistes-nordiques.org/download/osm2pgsql.out A while back there were a few reports of a similar issue and it turned out to be due to having multiple versions of Geos installed. I think the root cause was that the code compiled using the headers from one library version but then linked against a different one. This only effects the part of osm2pgsql which uses geos to build the relation geometries. There are some signs in your compile logs which suggest you have a locally compiled version of Geos in /usr/local so you may have hit the same issue. If you want to be sure you compile using your copy in /usr/local then try removing the system libgeos-dev package and rebuild osm2pgsql. Jon Then I installed osm2pgsql 0.66 from ubuntu repo and it works. Any luck to have an up to date osm2pgsql in next Ubuntu LTS ? Yves ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
Le lundi 27 février 2012 20:25:02, yvecai a écrit : Then I installed osm2pgsql 0.66 from ubuntu repo and it works. Any luck to have an up to date osm2pgsql in next Ubuntu LTS ? Are you using the same style file (-S ./style) with the two versions or are you using the default style for each ? I just checked two osm2pgsql db I have access to (both were built with the same 2 month old osm2pgsql version) the first as the relation you are searching for while the other hasn't. The one having it has this in the style file : node,way routetext linear In the other it's commented out (on purpose) aren't you missing this line ? -- sly (sylvain letuffe) ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
Le 27/02/2012 22:25, sly (sylvain letuffe) a écrit : Le lundi 27 février 2012 20:25:02, yvecai a écrit : Then I installed osm2pgsql 0.66 from ubuntu repo and it works. Any luck to have an up to date osm2pgsql in next Ubuntu LTS ? Are you using the same style file (-S ./style) with the two versions or are you using the default style for each ? I just checked two osm2pgsql db I have access to (both were built with the same 2 month old osm2pgsql version) the first as the relation you are searching for while the other hasn't. The one having it has this in the style file : node,way routetext linear In the other it's commented out (on purpose) aren't you missing this line ? I tested with both, but I think Jon was right, it may have been an issue with libgeos. Then I was confused by the: Process 0 finished processing 0 relations in 0 sec in osm2pgsql output and I did not checked in the database, but the relations were probably successfully imported before I rebuilt everything twice :(. Yves ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
On 2/27/2012 4:56 PM, yvecai wrote: Then I was confused by the: Process 0 finished processing 0 relations in 0 sec in osm2pgsql output and I did not checked in the database, but the relations were probably successfully imported before I rebuilt everything twice :(. Yeah, that line is talking about Relations that were marked Pending during the original Node/Way/Relation pass. You're looking for output lines that contain Stats: not rate. The following is output from applying updates, but the same stuff comes out of an original planet import. Node stats: total(555913), max(1650259295) in 2664s Way stats: total(47995), max(152189759) in 6128s Relation stats: total(968), max(2055178) in 13845s vs 33297 Pending ways took 3252s at a rate of 10.24/s 2476 Pending relations took 7881s at a rate of 0.31/s Lynn (D) - KJ4ERJ ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
With route_name or not in default.style, in slim or non-slim mode, with or without hstore, still no relations in planet_osm_line ! I just added the following entry in default.style: waypiste:typetextlinear way route_name text linear If I take the hstore option (-k), I have the relation in planet_osm_rels: select * from planet_osm_rels where id = 1401913; id| way_off | rel_off |parts| members | tags | pending -+-+-+-+-++- 1401913 | 0 | 2 | {48769799,97599611} | {w97599611,,w48769799,} | {type,route,route,ski,piste:type,nordic,name,Haute Joux,color,green} | f However, it is not in_planet_osm_line. select * from planet_osm_line where osm_id = -1401913; - null To make this test, I directly get a small extract from the export page to be sure my osm file is ok, if somebody is cool enough to test, it's available here (1.6MB) http://www.pistes-nordiques.org/download/map.osm. I use ubuntu 10.04, postgresql 8.4.10, postgis 2.0, libgeos 3.2.2. Find here the complete osm2pgsql install and output: http://www.pistes-nordiques.org/download/osm2pgsql.out Yves ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
On Sun, 2012-02-26 at 18:31 +0100, yvecai wrote: I use ubuntu 10.04, postgresql 8.4.10, postgis 2.0, libgeos 3.2.2. Find here the complete osm2pgsql install and output: http://www.pistes-nordiques.org/download/osm2pgsql.out A while back there were a few reports of a similar issue and it turned out to be due to having multiple versions of Geos installed. I think the root cause was that the code compiled using the headers from one library version but then linked against a different one. This only effects the part of osm2pgsql which uses geos to build the relation geometries. There are some signs in your compile logs which suggest you have a locally compiled version of Geos in /usr/local so you may have hit the same issue. If you want to be sure you compile using your copy in /usr/local then try removing the system libgeos-dev package and rebuild osm2pgsql. Jon ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
yvecai yve...@gmail.com wrote: Which contains 49 relations according to osm2pgsql output, but the following requests find nothing: select count(*) from planet_osm_line where osm_id = -1401913; select count(*) from planet_osm_line where osm_id 0; and the column route_name does not exists. You might consider importing using a hstore column for test purposes. name will be changed to route_name during import and _only_ routes with a type=route tag (well, not the routes themselves, just their members) get imported at all. I just tested on a full planet Database featuring hstore and using the most recent Version of osm2pgsql. Looks fine IMO: osm= select count(*) from planet_osm_line where osm_id = -1401913; count --- 1 (1 Zeile) osm= select tags from planet_osm_line where osm_id = -1401913; tags --- color=green, piste:type=nordic, route_name=Haute Joux, route_pref_color=0 (1 Zeile) Regards Sven -- Das Internet wird vor allem von Leuten genutzt, die sich Pornografie ansehen, während sie Bier trinken, es ist daher für Wahlen nicht geeignet (Jaroslaw Kaczynski) /me is giggls@ircnet, http://sven.gegg.us/ on the Web ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
I've read that osm2pgsql doesn't really import everything from an OSM file into the DB. Specifically, http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema says: Notice that relations are not imported directly. Ways which are members of relations are imported in a special manner (see description for planet_osm_line), but there is no easy way to establish a relationship between a relation and its members, or to get tags associated with a relation (unless they have ways as members). Also: Note that the mechanism of creating additional rows for each relation membership, with the tags of the relation, does *not* apply to nodes. That is, with the current scheme, there is no way to get parent relation data for a given node. which, conjunction with the following from http://wiki.openstreetmap.org/wiki/Osm2pgsql#From_source_.28generic.29, may explain the lack of the route_name column. The default style for osm2pgsql does not import all tags from an .OSM file to a pgsql database. see http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/default.style for a list of what keys are imported. I wonder if that's part of what you're running into? Lynn (D) - KJ4ERJ - Author of APRSISCE for Windows Mobile and Win32 On 2/23/2012 3:20 PM, yvecai wrote: Sorry, I took the subject from an old topic. Here an extract of my osm file: relation id=1401913 version=1 timestamp=2011-01-31T21:31:42Z changeset=7149413 uid=171657 user=yvecai member type=way ref=48769799 role=/ member type=way ref=97599611 role=/ tag k=color v=green/ tag k=name v=Haute Joux/ tag k=piste:type v=nordic/ tag k=route v=ski/ tag k=type v=route/ /relation Which contains 49 relations according to osm2pgsql output, but the following requests find nothing: select count(*) from planet_osm_line where osm_id = -1401913; select count(*) from planet_osm_line where osm_id 0; and the column route_name does not exists. osm2pgsql SVN version 0.80.0 ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
Hi, On 02/23/2012 09:20 PM, yvecai wrote: Which contains 49 relations according to osm2pgsql output, but the following requests find nothing: Have you read and understood the thread beginning with: http://lists.openstreetmap.org/pipermail/dev/2011-July/023112.html I think you will have to uncomment the route_name entry in your default.style as well. Bye Frederik -- Frederik Ramm ## eMail frede...@remote.org ## N49°00'09 E008°23'33 ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev
Re: [OSM-dev] Osm2pgsql not importing routes?
Le 23/02/2012 21:44, Frederik Ramm a écrit : Hi, On 02/23/2012 09:20 PM, yvecai wrote: Which contains 49 relations according to osm2pgsql output, but the following requests find nothing: Have you read and understood the thread beginning with: http://lists.openstreetmap.org/pipermail/dev/2011-July/023112.html I think you will have to uncomment the route_name entry in your default.style as well. Bye Frederik No luck with or without route_name in my default.style. However, I just managed to have the relations when running an old osm2pgsql make deep lost in my home directory. But I soon as I run a make install from this directory, I lost them again Yves ___ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev