Re: .osm Datei mittels Osm2pgsql | osmosis in die DB
Geschrieben von allapow (Gast) am 26. Mai 2013 13:00:33: [flux]
Als Antwort auf:
.osm Datei mittels Osm2pgsql | osmosis in die DB
geschrieben von
allapow
(Gast)
am
25. Mai 2013 18:36:
danke, das half.
dann hatte ich http://lists.openstreetmap.org/pipermai … 22995.html
...und musste nur die Datei (/usr/share/osm2pgsql/default.style) an den richtigen Ort (/usr/share/default.style) schieben.
Aber jetzt bekomme ich noch das:
Using␣projection␣SRS␣900913␣(Spherical␣Mercator) Setting␣up␣table:␣planet_osm_point NOTICE:␣␣table␣"planet_osm_point"␣does␣not␣exist,␣skipping NOTICE:␣␣table␣"planet_osm_point_tmp"␣does␣not␣exist,␣skipping PREPARE␣get_way␣(int4)␣AS␣SELECT␣AsText(way)␣FROM␣planet_osm_point␣WHERE␣osm_id␣=␣$1; failed:␣ERROR:␣␣function␣astext(geometry)␣does␣not␣exist LINE␣1:␣PREPARE␣get_way␣(int4)␣AS␣SELECT␣AsText(way)␣FROM␣planet_osm... ^ HINT:␣␣No␣function␣matches␣the␣given␣name␣and␣argument␣types.␣You␣might␣need␣to␣add␣explicit␣type␣casts.
Error␣occurred,␣cleaning␣up
Der ERROR muß weg, die NOTICE können ja bleiben.
...welches wohl mit http://www.postgis.org/docs/PostGIS_FAQ.html#legacy_faq zu beheben ist.
Zitat:
3.1.
My applications and desktop tools worked with PostGIS 1.5,but they don't work with PostGIS 2.0. How do I fix this?
A lot of deprecated functions were removed from the PostGIS code base in PostGIS 2.0. This has affected applications in addition to third-party tools such as Geoserver, MapServer, QuantumGIS, and OpenJump to name a few. There are a couple of ways to resolve this. For the third-party apps, you can try to upgrade to the latest versions of these which have many of these issues fixed. For your own code, you can change your code to not use the functions removed. Most of these functions are non ST_ aliases of ST_Union, ST_Length etc. and as a last resort, install the whole of legacy.sql or just the portions of legacy.sql you need.
Aber wo finde ich die legacy.sql?
edit:
Xubuntu 12.04 legacy.sql
/usr/share/postgresql/9.1/contrib/postgis-2.0/legacy.sql
psql␣-U␣postgres␣-d␣dbname␣-f␣/usr/share/postgresql/9.1/contrib/postgis-2.0/legacy.sql
...ausführen.
nächster ERROR (ganz unten):
Using␣projection␣SRS␣900913␣(Spherical␣Mercator) Setting␣up␣table:␣planet_osm_point NOTICE:␣␣table␣"planet_osm_point"␣does␣not␣exist,␣skipping NOTICE:␣␣table␣"planet_osm_point_tmp"␣does␣not␣exist,␣skipping Setting␣up␣table:␣planet_osm_line NOTICE:␣␣table␣"planet_osm_line"␣does␣not␣exist,␣skipping NOTICE:␣␣table␣"planet_osm_line_tmp"␣does␣not␣exist,␣skipping Setting␣up␣table:␣planet_osm_polygon NOTICE:␣␣table␣"planet_osm_polygon"␣does␣not␣exist,␣skipping NOTICE:␣␣table␣"planet_osm_polygon_tmp"␣does␣not␣exist,␣skipping Setting␣up␣table:␣planet_osm_roads NOTICE:␣␣table␣"planet_osm_roads"␣does␣not␣exist,␣skipping NOTICE:␣␣table␣"planet_osm_roads_tmp"␣does␣not␣exist,␣skipping Mid:␣pgsql,␣scale=100,␣cache=800MB,␣maxblocks=102401*8192 Setting␣up␣table:␣planet_osm_nodes ***␣WARNING:␣intarray␣contrib␣module␣not␣installed ***␣The␣resulting␣database␣will␣not␣be␣usable␣for␣applying␣diffs. NOTICE:␣␣table␣"planet_osm_nodes"␣does␣not␣exist,␣skipping NOTICE:␣␣CREATE␣TABLE␣/␣PRIMARY␣KEY␣will␣create␣implicit␣index␣"planet_osm_nodes_pkey"␣for␣table␣"planet_osm_nodes" Setting␣up␣table:␣planet_osm_ways NOTICE:␣␣table␣"planet_osm_ways"␣does␣not␣exist,␣skipping NOTICE:␣␣CREATE␣TABLE␣/␣PRIMARY␣KEY␣will␣create␣implicit␣index␣"planet_osm_ways_pkey"␣for␣table␣"planet_osm_ways" Setting␣up␣table:␣planet_osm_rels NOTICE:␣␣table␣"planet_osm_rels"␣does␣not␣exist,␣skipping NOTICE:␣␣CREATE␣TABLE␣/␣PRIMARY␣KEY␣will␣create␣implicit␣index␣"planet_osm_rels_pkey"␣for␣table␣"planet_osm_rels"
Reading␣in␣file:␣/home/allapow/zeug/OSM_GIS/HagenZentrum-map.osm WARNING:␣Found␣Out␣of␣order␣node␣994740242␣(3068578,18)␣-␣this␣will␣impact␣the␣cache␣efficiency Processing:␣Node(34k)␣Way(6k)␣Relation(253)␣␣parse␣time:␣7s
Node␣stats:␣total(34945),␣max(2136197385) Way␣stats:␣total(6840),␣max(222812607) Relation␣stats:␣total(253),␣max(2825698)
Going␣over␣pending␣ways processing␣way␣(4k)
Going␣over␣pending␣relations
node␣cache:␣stored:␣25203(72.12%),␣storage␣efficiency:␣1.29%,␣hit␣rate:␣66.73% Stopping␣table:␣planet_osm_nodes Stopping␣table:␣planet_osm_ways Stopping␣table:␣planet_osm_rels Stopped␣table:␣planet_osm_nodes Stopped␣table:␣planet_osm_rels Committing␣transaction␣for␣planet_osm_point Committing␣transaction␣for␣planet_osm_roads Stopped␣table:␣planet_osm_ways Sorting␣data␣and␣creating␣indexes␣for␣planet_osm_roads Committing␣transaction␣for␣planet_osm_line Committing␣transaction␣for␣planet_osm_polygon Sorting␣data␣and␣creating␣indexes␣for␣planet_osm_point Sorting␣data␣and␣creating␣indexes␣for␣planet_osm_polygon Sorting␣data␣and␣creating␣indexes␣for␣planet_osm_line CREATE␣INDEX␣planet_osm_roads_index␣ON␣planet_osm_roads␣USING␣GIST␣(way␣GIST_GEOMETRY_OPS)␣TABLESPACE␣pg_default; failed:␣ERROR:␣␣operator␣class␣"gist_geometry_ops"␣does␣not␣exist␣for␣access␣method␣"gist"
Error␣occurred,␣cleaning␣up
...aber ich habe Daten in der Tabelle 🙂