PDA

View Full Version : Swingerclub map on Android phones



Varenne
09-26-12, 13:44
I use.

OsmAnd (http://OsmAnd.net)

Free mapping application on my Android phone, and while brothels are already a POI presets in the available maps, I always missed the chance to search and display Swinger clubs.

I found a way to display them, which is a bit tricky and has some drawbacks, but works well enough for me. I'll herewith describe the procedure, in case anybody is interested. I assume that you have the latest version of OsmAnd application already installed on your Android. I also advice to download for offline use all the regions of interest (the map of Germany is splitted into individual states, so you don't have to download the whole country unless you don't need it).

1) Create the data:

First, you must extract an up to date list of swinger clubs from OSM database. Insert the following link in your internet browser:

http://overpass-api.de/api/xapi_meta?

*[amenity%3Dswingerclub]

The processing will last a few seconds, and then you will be offered the option to save a file. Save it with name "swingerclub. Osm" (or any name you like, with. Osm extension). It's a small text file (currently 120KB).

OsmAnd doesn't know what a swinger club is; therefore we must make it think that it is some feature that it already knows. OsmAnd will then mix the swinger clubs with its POIs of this feature. So we'd better choose an uncommon feature. I found "glacier" good enough for Germany, as chances of getting a real glacier in regions of interest are small. Name and location should help in case of doubt. It's inconvenient, but I haven't yet found a better way.

Open the file "swingerclub. Osm" with any text editor and replace any occurrence of the text:

<tag k="amenity" v="swingerclub"/

With:

<tag k="amenity" v="swingerclub"/<tag k="natural" v="glacier"/

And save the modified file in plain text format. Now all the swinger clubs are also glaciers in our data.

3) Index the data for OsmAnd.

Now we must transform the data in a format that OsmAnd understands. To this purpose we use a Java application named.

OsmAnd Map Creator (http://download.OsmAnd.net/latest-night-build/OsmAndMapCreator-development.zip)

Launch the application. On the top row deselect all check boxes except "Build POI Index" and "Build Address Index". Select "File. Specify working directory." and select the folder where the result will be saved. Select "File. Create. Obf from osm file" and open the file "swingerclub. Osm". If everything goes fine, after a few seconds the "Generation data" window will inform you that the process has been completed. Press OK and close the application. In the working directory you'll find a file named "swingerclub. Obf"

4) Copy the data to Android device.

Copy the file "swingerclub. Obf" to your Android device in the "OsmAnd" folder.

5) Save a search preset for swinger clubs.

Launch OsmAnd, press the "Search" button, select "Custom filter" on top of the list, press on "Natural" and check only the check box for "Glacier". Press "Close", press the "save" button (the icon at the right of the "Filter" button) , save the preset as "Swingerclubs" (or any name you like).

6) Search for swinger clubs.

Now on the search list, will appear a favorite preset "Swingerclubs" (preceded by an asterisk). Selecting it, the application will start to search for Glaciers, which we know are really swinger clubs in disguise.

7) Displaying icons for swinger clubs over the map.

Go to the map screen. Press the "option key" (left key) on your device, press the "Define view" button, press "POI", in the list select "Swingerclubs". Now the swingerclubs appear on the map highlighted with a square greyish clickable icon.

8) Displaying information about a Swinger club.

Find the entry in the search list and press. From the dialogue which opens, press on "Show POI description": when available you'll be shown additional informations (like opening times, a short description, website, phone number).

9) Actions for a Swinger club.

Once you have found a swinger club of interest, you can perform several actions, like showing it on the map, navigating, phone calling, opening the homepage.

I find OsmAnd interface not so intuitive, so I'll spend a few words. Once you have found the club in the search list, press on it. From the dialogue which opens, press "Show on map". The map will center on the club, and a small window with a grey background will appear on top. Short press within the window and a menu of all possible actions will appear. It's also possible to make the small window with a grey background appear by long pressing on the icon on the map (a short press will instead only show a subset of the information window). But since I have a big finger I always happen to hit the wrong location, so I find it faster to pass through the search list.

Hope somebody finds this guide useful, and do let me know if you find a way to make OsmAnd recognize additional POI types. For now, be careful not to head to a real glacier thinking it's a swinger club on top of a mountain!

Varenne
10-01-13, 13:50
Open the file "swingerclub. Osm" with any text editor and replace any occurrence of the text:

<tag k="amenity" v="swingerclub"/

With:

<tag k="amenity" v="swingerclub"/<tag k="natural" v="glacier"/Sorry, just noticed that the board autocorrection mangled the text (grr!). The replacement string above is wrong and creates an invalid. Osm file. The correct replace string is:

<tag k="amenity" v="swingerclub"/><tag k="natural" v="glacier"/

Varenne
10-01-13, 22:19
I had never noticed before that Osmand supports user categories. Use of user categories is much more convenient than the stupid trick I mentioned before of forcing it into thinking that swingerclubs are glaciers. Here is how, please refer to the first message of the thread for the steps mentioned.

To make swingerclub appear under osmand "User defined" category, just replace in the file swingerclub. Osm you downloaded following step 1) any occurrence of:

<tag k="amenity" v="swingerclub"/>

With:

<tag k="amenity" v="swingerclub"/><tag k="user_defined" v='Swingerclub'/>

Then follow steps 3) and 4). Close OsmAnd (with 'exit' or pressing 'x' button on the upper right corner of main selection screen) and restart the application (this is necessary index the new file). Now you can search or display swingerclub icons on map by means of the "User defined" category.

By the way, it's also possible to add several categories under the "User defined" category.

For example, if you also want to display saunaclubs as "User defined" category:

1) download the saunaclubs data from osm from the following link:

http://overpass-api.de/api/xapi_meta?*[brothel:saunaclub%3Dyes]

And save the file as saunaclub.osm.

2) replace in saunaclub. Osm any occurrence of text.

<tag k="brothel:saunaclub" v="yes"/>

With:

<tag k="brothel:saunaclub" v="yes"/><tag k="user_defined" v='Saunaclub'/>

3) Use OsmAnd Map Creator to process saunaclub. Osm and create a file saunaclub. Obf.

4) Copy saunaclub. Obf to "OsmAnd" folder on your Android. Start the OsmAnd application, and using the "User defined" category you'll be able to search and display tha saunaclubs.

It's unconvenient that all the different kind of user defined category are shown with the same icon. If you want to search for POIs of a specific user defined category it's possible to limit the search activating the filter and typing the name of the specific user defined category you want to display results from.

For example, if you defined both the Swingerclub and the Saunaclub user defined categories, but you want to search only the Saunaclub, in the search screen select "User defined", then activate the filter (the funnel icon at the bottom of the screen) and type the "Saunaclub" string in the filter field.

To hide some of the user defined categories from the map, you need to deactivate the relevant file. Obf. To this purpose, select settings. Data management, expand Offline maps, long press of the file you want to deactivate and select "Deactivate".

I attached a few screenshots of the results, showing either both Saunaclubs and Swingerclubs, or only with Swingerclubs.