[OSM-dev] Importing planet.osm into api0.5 db?
brett at bretth.com
Thu Oct 4 10:28:18 BST 2007
Jon Bright wrote:
> Hi Brett,
> Brett Henderson wrote:
>> I haven't released a new version of osmosis but it is all available
>> in svn if you wish to compile it yourself. Just run ant in the
>> applications/utils/osmosis directory.
> I've done this and then set it running on the 0.5 planet, thus:
> java -jar osmosis.jar --read-xml-0.5 file="planet-api05-070927.osm"
> --write-mysql-0.5 host="..." database="..." user="..." password="..."
> I see this exception:
> Exception in thread "Thread-1-read-xml-0.5"
> com.bretth.osmosis.core.OsmosisRuntimeException: Unable to bulk insert
> nodes into the database.
> Caused by: java.sql.SQLException: Incorrect string value:
> '\xD8\xAE\xD8\xB1\xD9\x8A...' for column 'tags' at row 1 ...
> Any idea what that might be?
Unfortunately no. My first suspicion is always incorrect UTF8 data in
the planet file but I suspect that's not the problem in this case.
Was any data inserted successfully? If not I might have a problem with
the insert statement. If some was inserted successfully then perhaps
the db is not configured correctly for UTF8.
I don't have that planet available to test it out, I'll have to download
it. Can you run the following command to make sure the data in the
planet can be handled correctly? It will verify that all data in the
planet can be handled as UTF8.
java -jar osmosis.jar --read-xml-0.5 file="planet-api05-070927.osm"
More information about the dev