пʼятницю, 6 березня 2009 р.

How to use your city map to add streets to openstreetmap

1. we need a scanned hi-res bitmap image of a map
2. go to http://labs.metacarta.com/rectifier/ and upload your map
3. you will see two map viewers: left - your image; right - reference map
4. click "+" sign at the right side of reference map viewer and pick a map provider (I've chosen google satellite)
5. set 5-6 control markers on both maps (I've added seven)
6. from a drop-down menu below reference map select linear or quadratic fit (seems to me that linear is faster but less accurate)
7. click "warp!"
8. download and install josm or "sudo apt-get install josm"
9. start josm. go to "edit"->"preferences"->"plugins" (fifth tab from top, the one with a plug)
10. find and check "wmsplugin". apply settings. restart josm.
(if everything is fine, next time you start josm it has to have "WMS" menu item in main menu)
11. go to openstreetmap and find the place you want to add streets to and copy the "permalink" url, e.g.
http://www.openstreetmap.org/?lat=49.54782&lon=25.59045&zoom=15&layers=B000FTF
(don't forget to sign up at OSM otherwise you won't be able to save your edits online)
11a. in josm go to "edit"->"preferences"->"network" (second tab) and enter your OSM username and password.
12. in josm go to "file"->"download from OSM"->"Bounding Box" and paste the above url into text box signed "URL from www.openstreetmap.org"->"ok"
13. you will get a "Data Layer" containing streets (make sure the "layers" pane is visible and use "select tool" to check out street names)
14. go to "WMS"->"Rectified Image...". enter your metacarta image id (just the number, e.g. if your map is located at http://labs.metacarta.com/rectifier/map/74, you enter 74)
15. now you get a new layer called "rectifier id=74". click "Data Layer" to see it on top of image layer.
16. add some streets.
17. "file"->"upload to OSM"
18. according to osm wiki - results will show up in a few days

and that's it.

четвер, 22 січня 2009 р.

Flash Switcher Ubuntu Issues

There's a really useful firefox extension for flash/flex developers called Flash Switcher there are win, mac and linux version of it so I decided to try it in Ubuntu.
The way it works is really simple:
- after installing the extension you get a flash icon in status bar with a menu listing your current flash plugin version and two more from the plugin's local repository - those are 7.0 and 9.0 by default. You set the "Firefox plugins directory" in settings to tell the extensions where is your flash plugin located. Each time you change flash plugin version - it gets rewrited by the version you chose from extension's menu.

First thing I decided to do is to add a few more:
1) current ubuntu's "flashplugin-nonfree" lib (that's the one playing sound through pulseaudio so I really need it)
2) and flashplugin developer version (the one that allows debugging you know)

for that I've created two more folders at extension's path:
~/.mozilla/firefox/.default/extensions/flash_switcher@sephiroth.it/plugins/linux/ (the folder containing linux flash plugins of different versions)

10.0 dev and 10.0 ubuntu
and copied the libflashplugin.so to each one (debug version is at adobe's site and the ubuntu's is in /usr/lib/flashplugin-nonfree)

Next thing I've been confused by was that the extension didn't switch anything according to about:plugins flash plugin was still version 10:
By default, the extension uses ~/.mozilla/plugins dir to write the flash plugin lib to, but... there is a symbolic link to /usr/lib/flashplugin-nonfree/libflashplugin.so named @flashplugin-nonfree or something like that which overrides the lib placed into .mozilla/plugins dir by the flash switcher extension... so I decided to fix it in a bit inappropriate way - I made /usr/lib/flashplugin-nonfree writable and set it a "Firefox Plugins Directory" in flash switcher's settings. That fixed the issue.