Re: [OSM-dev] osm2pgsql: missing osm_polygon and osm_line data under PostgreSQL 9/PostGIS 1.5.2

2011-06-04 Thread Stefan Keller
Hi Jon,

Thank you for your work.
We have SVN Revision no. r24100 of osm2pgsql installed.
While still trying to resolve an out-of-memory issue with osm2pgsql in
slim-mode we realized that the error output goes to the usual log
output.
It would be very helpful to print the error to it's separate error
output stream in order to find more easily what's gonig wrong.

Yours, Stefan

2011/5/6 Jon Burgess jburgess...@gmail.com:
 On Fri, 2011-05-06 at 20:23 +0200, Stefan Keller wrote:
 Hi,

 We recently upgraded to PostgreSQL 9 and PostGIS 1.5.2 and hence were
 forced to rebuild osm2pgsql because of new versions of its
 dependencies (e.g., libgeos).
 Afterwards, we tried to insert Switzerland data with the following command:

 $ osm2pgsql --create --database gisdb --prefix osm --style
 /usr/local/share/osm2pgsql/default.style --username xxx --hstore-all
 switzerland.osm.bz2

 Unfortunately, only the osm_point table was filled with data,
 osm_polygon and osm_line were empty. This was not the case before the
 upgrade of the mentioned components. In the thread
 http://forum.openstreetmap.org/viewtopic.php?id=10725 somebody
 explained that this could be caused by multiple installations of
 libgeos or due to old installations of this library which is silently
 ignored by osm2pgsql and hence the tables will just not be filled.

 On our machine, I verified that this is NOT the case:

 $ ldd /usr/local/bin/osm2pgsql  | grep libgeos
     libgeos-3.2.2.so = /usr/lib/libgeos-3.2.2.so (0x7f8485065000)

 As one can see, there is only one version of the shared library that
 is used and that one has the version we need.

 Do you have any ideas what the problem could be?

 I encountered the same problem when doing a similar upgrade yesterday. I
 managed to resolve it but I have not gone back to figure out exactly
 what causes it.

 The machine originally had both the system geos library in /usr and a
 custom compiled one in /usr/local. To resolve the problem I made sure I
 erased all traces of the system geos library and header files. Then did
 a 'make clean  make' cycle and it started working correctly.

 I did a few steps to try to figure out where it was going wrong and
 identified that the getSize() call in build_geometry.cpp is always
 returning 0. This causes all of the line  polygons geometries to be
 discarded. I have a suspicion this is triggered when using the headers
 from one version of geos and then linking against a different library
 version but I can not prove this yet.

   Jon




___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql: missing osm_polygon and osm_line data under PostgreSQL 9/PostGIS 1.5.2

2011-06-04 Thread Jon Burgess
On Sun, 2011-06-05 at 01:23 +0200, Stefan Keller wrote:
 Hi Jon,
 
 Thank you for your work.
 We have SVN Revision no. r24100 of osm2pgsql installed.
 While still trying to resolve an out-of-memory issue with osm2pgsql in
 slim-mode we realized that the error output goes to the usual log
 output.
 It would be very helpful to print the error to it's separate error
 output stream in order to find more easily what's gonig wrong.
 
 Yours, Stefan
 
Can you identify what message is being sent to STDOUT instead of STDERR?

From a quick scan of the source the only ones I see going to stdout seem
to be the help text, version number and bounding box information. All of
the rest of the information, including all errors should already be
going to stderr.

   Jon



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] osm2pgsql: missing osm_polygon and osm_line data under PostgreSQL 9/PostGIS 1.5.2

2011-05-06 Thread Stefan Keller
Hi,

We recently upgraded to PostgreSQL 9 and PostGIS 1.5.2 and hence were
forced to rebuild osm2pgsql because of new versions of its
dependencies (e.g., libgeos).
Afterwards, we tried to insert Switzerland data with the following command:

$ osm2pgsql --create --database gisdb --prefix osm --style
/usr/local/share/osm2pgsql/default.style --username xxx --hstore-all
switzerland.osm.bz2

Unfortunately, only the osm_point table was filled with data,
osm_polygon and osm_line were empty. This was not the case before the
upgrade of the mentioned components. In the thread
http://forum.openstreetmap.org/viewtopic.php?id=10725 somebody
explained that this could be caused by multiple installations of
libgeos or due to old installations of this library which is silently
ignored by osm2pgsql and hence the tables will just not be filled.

On our machine, I verified that this is NOT the case:

$ ldd /usr/local/bin/osm2pgsql  | grep libgeos
libgeos-3.2.2.so = /usr/lib/libgeos-3.2.2.so (0x7f8485065000)

As one can see, there is only one version of the shared library that
is used and that one has the version we need.

Do you have any ideas what the problem could be?

Thanks,
Michael and Stefan

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql: missing osm_polygon and osm_line data under PostgreSQL 9/PostGIS 1.5.2

2011-05-06 Thread Jon Burgess
On Fri, 2011-05-06 at 20:23 +0200, Stefan Keller wrote:
 Hi,
 
 We recently upgraded to PostgreSQL 9 and PostGIS 1.5.2 and hence were
 forced to rebuild osm2pgsql because of new versions of its
 dependencies (e.g., libgeos).
 Afterwards, we tried to insert Switzerland data with the following command:
 
 $ osm2pgsql --create --database gisdb --prefix osm --style
 /usr/local/share/osm2pgsql/default.style --username xxx --hstore-all
 switzerland.osm.bz2
 
 Unfortunately, only the osm_point table was filled with data,
 osm_polygon and osm_line were empty. This was not the case before the
 upgrade of the mentioned components. In the thread
 http://forum.openstreetmap.org/viewtopic.php?id=10725 somebody
 explained that this could be caused by multiple installations of
 libgeos or due to old installations of this library which is silently
 ignored by osm2pgsql and hence the tables will just not be filled.
 
 On our machine, I verified that this is NOT the case:
 
 $ ldd /usr/local/bin/osm2pgsql  | grep libgeos
 libgeos-3.2.2.so = /usr/lib/libgeos-3.2.2.so (0x7f8485065000)
 
 As one can see, there is only one version of the shared library that
 is used and that one has the version we need.
 
 Do you have any ideas what the problem could be?

I encountered the same problem when doing a similar upgrade yesterday. I
managed to resolve it but I have not gone back to figure out exactly
what causes it. 

The machine originally had both the system geos library in /usr and a
custom compiled one in /usr/local. To resolve the problem I made sure I
erased all traces of the system geos library and header files. Then did
a 'make clean  make' cycle and it started working correctly.

I did a few steps to try to figure out where it was going wrong and
identified that the getSize() call in build_geometry.cpp is always
returning 0. This causes all of the line  polygons geometries to be
discarded. I have a suspicion this is triggered when using the headers
from one version of geos and then linking against a different library
version but I can not prove this yet.

   Jon



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql: missing osm_polygon and osm_line data under PostgreSQL 9/PostGIS 1.5.2

2011-05-06 Thread Sven Geggus
Stefan Keller sfkel...@gmail.com wrote:

 Unfortunately, only the osm_point table was filled with data,
 osm_polygon and osm_line were empty. This was not the case before the
 upgrade of the mentioned components.

Hm looks like I broke something :(

I did not try --hstore-all anymore after adding the new hstore
behaviour because it did not seem to make sense anyway. However
--hstore seems to work fine. I will try to figure out what causes the
problem.

Regards

Sven

-- 
Das allgemeine Persönlichkeitsrecht (Art. 2 Abs.1 i.V.m. Art.1 Abs. 1GG)
umfasst das Grundrecht auf Gewährleistung der Vertraulichkeit und Integrität
informationstechnischer Systeme. (BVerfG, 1BvR 370/07)
/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: missing osm_polygon and osm_line data?under PostgreSQL 9/PostGIS 1.5.2

2011-05-06 Thread Sven Geggus
Sven Geggus li...@fuchsschwanzdomain.de wrote:

 Hm looks like I broke something :(

Puh, fortunately it looks like I did not :)

planet_osm_polygon and planet_osm_line are fine in either case here:
--hstore, --hstore-all and no hstore.

Just 4TR:

I'm running a custom backport of postresql 9.0 and postgis.

Output of select PostGIS_Full_Version():
POSTGIS=1.5.2 GEOS=3.2.0-CAPI-1.6.0 PROJ=Rel. 4.7.1, 23 September 2009 
LIBXML=2.7.8 USE_STATS

The geos Version is the one that ships with Debian stable.

I _do_ have some unrelated trouble with this version related to
update speed. See my other post for this.

Sven

-- 
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety (Benjamin Franklin)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev