[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ gpsdrive ] geoinfo.pl importing osm data
On Tuesday 02 January 2007 10:21, David wrote:
> I let the geoinfo command run through to completion and came across a
> few problems. It took about 24 hours to run and it looked to me like it
> wasn't plain I/O. More like virtual memory type of disk thrashing but I
> have no proof of that. (other programs running at the same time were
> extreemly slow)
This sounds reasonable. The geoinfo.pl currently still reads in the complete
planet.osm into memory .... and then exports its stuff to the mysql database.
I know, this has to be changed in the future ...
> There were a couple of "gast" permission errors at the top of the output
> but it had scrolled off the top of my terminal session by the time the
> script had completed.
This sounds reasonable. The default user used is gast. But the user gast has
no permission to do the two commands
sub disable_keys($)
sub enable_keys($)
these commands would disable/enable the key generation in the database and
thus make importing faster. To be able to use these two spee improvements you
have to specify a user which is allowed to do this. For example
geoinfo.pl ... --db-user=root --db-password=...
or use the environment variables:
export DBUSER=root
export DBPASS=<mysql-root-password>
> The streets db table was also empty at the end. I hadn't fiddeled with
> the database since I last did a --fill-defaults a few days ago.
This doesn't sound good
> The .osm file that was downloaded was about 900mb
Where did you get it from?
what about using a planet-xxx.osm file instead? Maybe making is smaller with
osm-subset.pl
> So it looks like the default database has some permission issues.
You could also try to test with a smaller file. Just use josm to download a
small region around your home, save it to a file named downloaded-file.osm
and then use something like:
export DBUSER=root
export DBPASS=<mysql-root-password>
echo "drop database geoinfo" | mysql -u $DBUSER -p$DBPASS
geoinfo.pl -v --create-db
geoinfo.pl -v --fill-defaults
geoinfo.pl -v --osm=downloaded-file.osm
...
> estimating 0.Writing Segment 3089000 to DB ( -8260%) -3126393 Segments
> missing; estimating -5DBD::mysql::st execute failed: ALTER command
> denied to user 'gast'@'localhost' for table 'streets'
> at /opt/gpsdrive/share/perl5/Geo/Gpsdrive/DBFuncs.pm line 759.
> Error in query 'ALTER TABLE streets ENABLE KEYS;'
This does not sound good :-(
Hopefully importing as root might help for now.
--
Jörg (Germany, Munich)
http://www.ostertag.name/
TeamSpeak2: ts2.ostertag.name, user: tweety, Channel: "GPS Drive"
Tel.: +49 89 420950304
--
This message was part of the gpsdrive mailinglist
unsubscribing can be done by sending a mail containing a body of:
-quote--
unsubscribe gpsdrive
-unquote--
to majordomo@warbase.selwerd.nl