Gpsdrive with Openstreetmap

This article is outdated. They changed something that prevents Mapnik from working :-(

Will review when I have more time...

Want an open source navigation system, using open source maps? Read on!

Install the software:

sudo aptitude install postgresql postgresql-client postgresql-contrib postgresql-8.4-postgis
sudo aptitude install osm2pgsql gpsdrive

Change the password of the Postgres user (optional):

sudo -u postgres -i
psql postgres
ALTER USER postgres WITH ENCRYPTED PASSWORD 'new_password';
\q
rm .psql_history
exit

Add the following to /etc/sysctl.conf:

kernel.shmmax = 268435456

Change the following lines in /etc/postgresql/8.4/main/postgresql.conf:

shared_buffers = 128MB
checkpoint_segments = 20
maintenance_work_mem = 256MB
autovacuum = off

In Kubuntu 10.04 and later, it may be necessary to uncomment the latter 3 lines (remove the hash sign # from the beginning of the line).

Reboot for the shared memory settings (shmmax) to take effect. Check with:

sysctl -a | grep shmmax

Create the GIS database and change its owner (to you).

sudo -u postgres -i
   createuser your_username
   createdb -O your_username gis
   createlang plpgsql gis
   psql -d gis -f /usr/share/postgresql/8.4/contrib/_int.sql
   psql -d gis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
   psql -d gis
      ALTER TABLE geometry_columns OWNER TO your_username;
      ALTER TABLE spatial_ref_sys OWNER TO your_username;
      \q
   exit

Then you need to define the reference coordinate system by downloading:

http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/900913.sql

and execute it using:

psql -d gis -f 900913.sql

Now download a map from http://wiki.openstreetmap.org/index.php/Planet.osm and import it into the database using the following command:

osm2pgsql planet-nl-090221.osm.gz

Note that you need at least 1Gb of free RAM for this. If you have less, or if the command fails to allocate enough space, then use the -s option, and, if needed, the -C option. Then, however, you will need lots of disk space. In my case 6Gb was not enough, and that was just the map of the Netherlands... From the help info:

-s|--slim Store temporary data in the database. This greatly reduces the RAM usage but is much slower.
-C|--cache Only for slim mode: Use upto this many MB for caching nodes. Default is 800.

Start and quit gpsdrive, just in order to create its configuration directory. Then use the following commands to create a waypoint file if it does not exist and remove a config file before running gpsdrive in order to enable mapnik mode:

touch ~/.gpsdrive/way.txt
rm ~/.gpsdrive/osm.xml

Start gpsdrive. Enable mapnik mode and position mode. Click on the map to move it. Use the horizontal slider or Shift-LeftMB/Shift-RightMB to zoom in/out. When using gpsdrive for the first time, the cursor may be at a spot somewhere off the map. If this is the case, zoom out until you see a map and zoom into it.

Setting up the GPS device

If it is a USB device, its path will be something like /dev/ttyUSB0. If it is Bluetooth, make sure you have bluez-utils installed:

aptitude install bluez-utils

Then use the following command to find the address of your Bluetooth GPS device:

hcitool scan

Then connect it to /dev/rfcomm0:

rfcomm connect /dev/rfcomm0 xx:xx:xx:xx:xx:xx

Replace the x'es by the address of your GPS device. Test it using:

cat /dev/rfcomm0

You should see some coordinates passing by. Press Ctrl-C to quit. Now start gpsd:

gpsd /dev/rfcomm0

If you start gpsdrive now, it should find the GPS device.

References:

 

Your web journal furnished us

Your web journal furnished us with significant data to work with. Each and every tips of your post are marvelous. You're the best to share. Continue blogging.. relevant site

sl786982

This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog. chauffeur service london

Thankyou for this wondrous

Thankyou for this wondrous post, I am happy I watched this site on hurray. nonprofit jobs

Wow, cool post. I’d like to

Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though. Foods That Cause Inflammation

Wow, this is really

Wow, this is really interesting reading. I am glad I found this and got to read it. Great job on this content. I like it. autoradio gps 2017 web site click

I truly value this superb

I truly value this superb post that you have accommodated us. I guarantee this would be helpful for a large portion of the general population. latest technology

Much obliged to you for such

Much obliged to you for such an elegantly composed article. It"s brimming with quick data and engrossing portrayals. Your perspective is the best among numerous. full report

I've perused some well done

I've perused some well done here. Certainly worth bookmarking for returning to. I shock the amount of exertion you put to make such an incredible instructive site. software outsourcing costa rica

hi!! Extremely fascinating

hi!! Extremely fascinating examination happy that I went over such educational post. Keep doing awesome. Happy to be a piece of your net group. informatica

I truly like your thoughts on

I truly like your thoughts on the issue. I now have an unmistakable thought on what this matter is about.. Health Benefits of Garlic

That is truly decent to

That is truly decent to listen. much obliged to you for the upgrade and good fortunes. Friv

A debt of gratitude is in

A debt of gratitude is in order for offering pleasant data to us. i like your post and all you impart to us is uptodate and entirely useful, i might want to bookmark the page so i can come here again to peruse you, as you have made a superb showing. io games list

I am trusting the same best

I am trusting the same best exertion from you later on too. Truth be told your experimental writing aptitudes has enlivened me. cheap color copies

They did good work and aimed

They did good work and aimed to provide me with the highest level of customer service to make sure I was a satisfied customer. Glass repair

"I know it's been happening

"I know it's been happening in terms of enrollment and some say boys are getting the short shrift," Higgins said. "I don't necessarily see a problem unless it indicates an inequity in the system, and I don't think that's true." Chelsea injuries

Good composed article. It

Good composed article. It will be strong to any individual who uses it, including me. Continue doing what you are doing – can'r hold up to peruse more posts. invokana lawsuits

I might want to say this

I might want to say this online journal truly persuaded me to do it! Much obliged, great post. Mac Files

Faser Valley fencing

Faser Valley fencing contractor with in house welding shop and best prices on high quality chainlink fencing for residential and commercial fencing There contractors out there but Lencing has won t service in the Fraser Vally several times. Fraser Vally fencing

A place for developers,

A place for developers, builders, and home owners to buy building products for the commercial and or residential build or Reno project Builders Haus is a place for vendors to reach a further reach to wholesale products and make greater customer reach. engineered flooring

Thank you for another great

Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information. Language of Desire

It was a decent post surely.

It was a decent post surely. I altogether appreciated understanding it in my lunch time. Will without a doubt come and visit this blog all the more frequently. Much obliged for sharing. temporary carpet protection

Much obliged to you so much

Much obliged to you so much Love your site.. Lean Belly Breakthrough

I truly welcome the sort of

I truly welcome the sort of themes you post here. A debt of gratitude is in order for sharing us an extraordinary data that is really useful. Great day! 3d print places near me

I’ve been surfing online more

I’ve been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before. www.leesappliancerepair.com I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.

I have bookmarked your site,

I have bookmarked your site, the articles are path superior to anything other comparative websites.. a debt of gratitude is in order for an awesome web journal! Darel Lynwood Long

Much obliged to you for

Much obliged to you for peopling get the data they require. Incredible stuff not surprisingly. Keep up the considerable work!!! Questions to ask your boyfriend

https://www.9597.tw/

eliza

Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. upload to instagram from mac

Much obliged for another

Much obliged for another superb post. Where else would anybody be able to get that sort of information in such a perfect method for composing? cost of clearing a container

Excellent .. Amazing .. I’ll

Excellent .. Amazing .. I’ll bookmark your blog and take the feeds also…I’m happy to find so many useful info here in the post, we need work out more techniques in this regard, thanks for sharing. seo company for small business

I was taking a gander at some

I was taking a gander at some of your posts on this site and I imagine this site is truly enlightening! Keep setting up.. address

Extraordinary things you've

Extraordinary things you've generally imparted to us. Simply continue written work this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks gta5cash.net

I truly delighted in perusing

I truly delighted in perusing this post, huge fan. Keep doing awesome me when would you be able to distribute more articles or where would I be able to peruse more on the subject? The Magic of Making Up

I can"t envision

I can"t envision concentrating sufficiently long to research; significantly less compose this sort of article. You"ve beaten yourself with this material. This is awesome substance. damp proof membrane

This is an awesome post. I

This is an awesome post. I like this topic.This site has heaps of advantage.I discovered numerous fascinating things from this site. It helps me in numerous ways.Thanks for posting this once more. Benefits of Cucumbers

Positive site, where did u

Positive site, where did u think of the data on this posting? I'm satisfied I found it however, sick be inquiring soon to figure out what extra posts you incorporate. Hero Instinct

This is an incredible post. I

This is an incredible post. I like this topic.This site has heaps of advantage.I discovered numerous fascinating things from this site. It helps me in numerous ways.Thanks for posting this once more. blog

What a material of

What a material of un-ambiguity and preserveness of valuable familiarity on the topic of unpredicted feelings. 먹튀

I am constantly stunned by

I am constantly stunned by the measure of data accessible on this subject. What you exhibited was very much explored and eloquent so as to get your stand on this crosswise over to every one of your perusers. learn more

This web journal site is

This web journal site is really cool! How was it made ! Get The latest Gaming

Awesome things you've

Awesome things you've generally imparted to us. Simply continue composition this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks it development outsourcing

I adore this online journal!!

I adore this online journal!! The glimmer up the top is wonderful!! car detailing orlando

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. Palm Coast, FL

It is basic that we read blog

It is basic that we read blog entry precisely. I am now done it and find this post is truly astounding. AWOL Academy Inc

This article was composed by

This article was composed by a genuine speculation essayist. I concur a hefty portion of the with the strong focuses made by the essayist. I'll be back. portable ice makers

I think this is a standout

I think this is a standout amongst the most critical data for me. What's more, i'm happy perusing your article. Be that as it may, ought to comment on some broad things, The site style is flawless, the articles is truly awesome : D. Great job, here's to you turn picture into canvas print cheap

tariq

What a good blog you have here. Please update it more often. This topics is my interest. Thank you. . . http://entertainingbli28.mee.nu

internet

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.

internet

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.

Much thanks to you for the

Much thanks to you for the redesign, extremely pleasant site.. read more