[OSM-dev] XAPI - Source code
arminus
arminus at gmail.com
Mon Jan 3 21:10:13 GMT 2011
> This sounds as if your database isn't even a PostGIS database?
No it wasn't :-/ I didn't realize that apparently (?) the osmosis
import I did after postgis enabling the db somehow wiped out the
postgis code in it ... At any rate, I don't get the errors on an empty
db anymore, but I also fail to populate the new db now. Here's what I
did:
createdb -U postgres openstreetmap
createlang -U postgres plpgsql openstreetmap
psql -U postgres -d openstreetmap -f
/usr/share/postgresql/contrib/postgis-1.5/postgis.sql
psql -U postgres -d openstreetmap -f
/usr/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql
psql -U postgres -d openstreetmap -f
/usr/share/postgresql/contrib/hstore.sql
psql -U postgres -d openstreetmap -f
osm_routing/osmosis-0.38/script/pgsnapshot_schema_0.6
psql -U postgres -d openstreetmap -f
osm_routing/osmosis-0.38/script/pgsnapshot_schema_0.6_linestring.sql
osmosis --read-xml-0.6 file="data2.osm" --write-pgsql host="localhost"
database="openstreetmap" user="postgres" validateSchemaVersion=no
and this is what I get:
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot begin
reading in Add stage, must call complete first.
at
org.openstreetmap.osmosis.core.store.RandomAccessObjectStore.initializeReadingStage(RandomAccessObjectStore.java:156)
at
org.openstreetmap.osmosis.core.store.RandomAccessObjectStore.createReader(RandomAccessObjectStore.java:181)
at
org.openstreetmap.osmosis.core.store.IndexStore.createReader(IndexStore.java:151)
at
org.openstreetmap.osmosis.core.store.IndexedObjectStore.createReader(IndexedObjectStore.java:96)
at
org.openstreetmap.osmosis.pgsnapshot.common.CompactPersistentNodeLocationStore.getNodeLocation(CompactPersistentNodeLocationStore.java:50)
at
org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.WayGeometryBuilder.createWayLinestring(WayGeometryBuilder.java:204)
(I also tried loading CreateGeometryForWays.sql before running the
osmosis import - same errors)
cheers,
Armin
--
View this message in context: http://gis.638310.n2.nabble.com/API-XAPI-caching-proxy-server-tp5825779p5886687.html
Sent from the Developer Discussion mailing list archive at Nabble.com.
More information about the dev
mailing list