Tag Archives: android

Créer des cartes vectorielles pour Locus

Billet de liens et de brouillon pour créer ses cartes pour Locus avec les données OpenStreetMap et l’émévation de la NASA.

Tuto et discussions : http://forum.locusmap.eu/viewtopic.php?f=43&t=1839&start=140

Cartes toutes faites : http://www.openandromaps.org/

Mes lignes de commande (environnement win) :

# filtrage pays avec un polygone
C:\osmosis-0.40.1\bin>osmosis.bat –rx z:\osm\asia.osm –tee 1 –bp file=”z:\osm\mypolys\turkmenistan.poly” –wx z:\osm\map_sansele\turkmenistan.osm

# extraction des donnees d elevation
C:\Python27\Scripts>phyghtmap.exe –polygon=Z:\osm\mypolys\turkmenistan.poly -o Z:\osm\elevation\turkmenistan.elev –source=view3,srtm3 -s 20 -c 200,100 –start-node-id=20000000000 –start-way-id=10000000000 –write-timestamp –max-nodes-per-tile=0

# ranger les donnees (sort)
C:\osmosis-0.40.1\bin>osmosis –rx z:\osm\map_sansele\turkmenistan.osm –sort –wx z:\osm\map_sansele\turkmenistan.sorted.osm

# incorporer l elevation dans la carte pays
C:\osmosis-0.40.1\bin>osmosis –rx z:\osm\map_sansele\turkmenistan.sorted.osm –rx z:\osm\elevation\turkmenistan.elev_lon51.83_66.71lat35.12_42.86_view3.osm –merge –wx z:\osm\map_merged\turkmenistan.osm

# application du mapping xml pour le rendu vectoriel dans mapsforge
C:\osmosis-0.40.1\bin>osmosis –rx z:\osm\map_merged\turkmenistan.osm –mw file=Z:\osm\mapforge_locus\turkmenistan.ter.osm.map bbox=47.6,16.7,49.8,22.7 type=hd tag-conf-file=z:\osm\tag-mapping.xml

Launching XBMC from an Android remote on a dedicated Debian HTPC

I bought recently a HP microserver to upgrade from my previous server that was a Seagate Dockstar.

HP Proliant Microserver Seagate Dockstar

One of the goals I had in mind was to use the server not only as a NAS, webserver, etc… but also as a HTPC running XBMC (and as a gigabit switch and a 802.11N AP but more on that later). I was running Debian Squeeze for ARM on the Dockstar and went for Debian Wheezy (tesing for now) for the Proliant as it has a more recent kernel to build my AP, and XBMC Eden is available directly in Debian repositories. My idea is to set it up now and stay on Wheezy when it becomes stable so I have only minimal maintenance to do in the future.

My Microserver is plugged to my videoprojector (Acer K10 LED) by VGA. I have no other graphical application running on the microserver so I didn’t install a window manager and I’m launching XBMC with xinit.

XBMC works great on the Microserver. I’m using ALSA as my sound system and a FiiO E10 as my USB sound card. I have a mpd server running to be able to play music in my living room, controlled by an Android client Droid MPD Client (HD). XBMC or mpd are mutually exclusive in their usage of the sound card (maybe I could enhance that by tweaking ALSA settings or moving to some other audio management ?). This is the first rason why I want to be able to start or stop XBMC on demand.

Another reason is that XBMC being idle uses between 10 and 30% of CPU. My machine serves as a server 24/7 and as a HTPC around 1h per day on average (I don’t use it everyday).

I have no keyboard attached to the Microserver.

So what I did was install 2 applications to my Android smartphone:

Official XBMC Remote
Script Kitty

The XBMC remote is a very fine app to remote control your XBMC HTPC and it also can exit XBMC.

Script Kitty is an application that lets you run scripts on a server with SSH. It lets you create a simple launcher on your homescreen that directly connects to your server and runs a command on it. Perfect to launch XBMC without having to install anything more on the Microserver !

The result on my home screen looks like this:

[nggallery id=1]

To configure Script Kitty, you have to give it your SSH credentials and tell it some commands to execute. Then you go to your home screen and add a direct shortcut to the script you created.

Here is the script I run on the server:

/usr/bin/xinit /usr/bin/xbmc-standalone — :0

By default on Debian, you will not be able to use xinit from a SSH shell. This seems to be a security feature. In order to allow it, you need to run:

dpkg-reconfigure x11-common

And from the menu choose to grant anybody the right to start X.