Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS styling #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
kuona
=====

Kuona is/was a micro-tasking tool to help with H.O.T. mapping of villages in Mali. It presented users with a bing imagery square, and asked them to click if they see any buildings/villages. This micro task was super-simple, and didn't even require a login. Much easier to learn than even the most simplistic editing of OpenStreetMap.

More advanced OpenStreetMap mappers could then use the results to find missing villages (which was useful across this very sparesely populated saharan landscape)

It was developed by nicolas17 (AKA "PovAddict") as quick proof of concept which was used quite effectively during the [2012 Mail Crisis](http://wiki.openstreetmap.org/wiki/2012_Mali_Crisis) response mapping.
The tool was initially deployed here: http://stuff.povaddict.com.ar/mali-crowdsource/

Output from the tool was a GPX file showing where everybody had been clicking. Intially these points were just viewed directly in JOSM. Harry developed a ruby script to eliminate points which already appeared to be mapped. Pierre G set up [a special task manager job](http://tasks.hotosm.org/job/198) using the data. This presented task squares spread out in an interesting pattern (unlike the usual grid).

The tool also had a behind-the-scenes admin interface displaying a count of how many times a tiles had been seen vs "hits" (times users had decided to click) and nicolas was able to direct attention onto re-checking tiles or looking at new ones as desired.
56 changes: 56 additions & 0 deletions kuona.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
body {
font-family: Verdana, Helvetica, Arial, sans-serif;
color: black;
}
#imagerytiles {
float:left;
margin-bottom:30px;
margin-right:30px;
padding:5px;
background:#EEE;
}

#imagerytiles table input[type=image] {
display: block;
}

#content {
padding:5px;
}
#content h1 {
font-size:3em;
margin:0px;
}
#instructions {
background:#FFE;
margin:10px;
padding:10px;
}
#instructions h2 {
font-size:1.1em;
margin:0px;
}
#instructions ul {
list-style:inside;
margin:0px;
padding:0px;
}

#footer {
clear:both;
border-top:solid 2px #EEE;
padding:5px;
text-align:right
}
#footer a {
color:#AAA;
}
#stats {
font-size: 9pt;
}

input[type=submit] {
padding:5px;
font-weight:BOLD;
font-size:1em;
}
83 changes: 55 additions & 28 deletions main.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@
#}
<html>
<head>
<meta name="viewport" content="width=275">
<style type="text/css">
table input[type=image] {
display: block;
}
</style>
<title>Kuona - Any easy way to help OpenStreetMap</title>
<meta name="viewport" content="width=275">
<link href="kuona.css" rel="stylesheet" type="text/css">
</head>
<body>
{% if got_tile %}
{% if got_tile %}
<form method="POST">
<p>Click on any buildings you see. Especially on large areas of them <small>(<a href="http://ecn.t3.tiles.virtualearth.net/tiles/a03331303231122033.jpeg?g=1145">like this</a>)</small>.</p>
<input type="hidden" name="tilex" value="{{tilex}}">
<input type="hidden" name="tiley" value="{{tiley}}">
<input type="hidden" name="zoom" value="{{zoom}}">
<table cellspacing="5">
<tr><td>


<div id="imagerytiles">
<table cellspacing="0" cellpadding="0">
<tr>
<td><input type="image" name="click0" src="{{tile_src[0]}}" width="256" height="256"></td>
Expand All @@ -34,29 +31,59 @@
<td><input type="image" name="click3" src="{{tile_src[3]}}" width="256" height="256"></td>
</tr>
</table>
</td><td>
<b>DO Mark</b><ul><li>Villages</li><li>Dams</li></ul>
<b>DO Not Mark</b><ul><li>Roads</li><li>Cattle Pens</li><li>Fields</li></ul>
</td></tr>
</table>
<p><input type="submit" name="nothing" value="There's nothing here"></p>
</form>
{% else %}
<p>There are currently no tiles to process. Come back later!</p>
{% endif %}

<div style="font-size: 8pt; width:50em; text-align: justify;">
{% if confirmation %}
<p>Currently verifying already-seen tiles.</p>
{% endif %}
{% if remaining %}
<p>Pictures remaining: {{remaining}}</p>
{% endif %}
</div>

<div id="content">
<h1>Kuona</h1>

<div id="instructions">
<h2>Mali building mapping</h2>
<p>
Click on any buildings you see. Especially on large areas of them
<small>(<a href="http://ecn.t3.tiles.virtualearth.net/tiles/a03331303231122033.jpeg?g=1145">like this</a>)</small>
</p>

<b>DO Mark</b>
<ul>
<li>Villages</li>
<li>Dams</li>
</ul>
<br>
<b>DO Not Mark</b>
<ul>
<li>Roads</li>
<li>Cattle Pens</li>
<li>Fields</li>
</ul>
</div>

<p><input type="submit" name="nothing" value="There's nothing here" /></p>


<div id="stats">
{% if confirmation %}
<p>Currently verifying already-seen tiles.</p>
{% endif %}
{% if remaining %}
<p>Pictures remaining: {{remaining}}</p>
{% endif %}

{#<p>This application is currently running on my home computer,
on a residential Internet con&shy;nec&shy;tion. Lately it's being <i>very</i> unreliable.
If you get a connection error, just reload the page.</p>
<p>I will try to move it to an OpenStreetMap dev server soon.</p>#}

</div>

</div>

{% else %}
<p>There are currently no tiles to process. Come back later!</p>
{% endif %}

<p id="footer">
<a href="https://github.com/nicolas17/kuona">kuona on github</a>
</p>
</body>
</html>
{# vim: set filetype=jinja: #}
7 changes: 7 additions & 0 deletions missingplaces/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Missing places script

This was Harry's weird way of solving a simple buffering geo-calculation as a script which could be re-run repeatedly.

We fetch the latest OSM data on places (Mali villages) using fetchplaces.sh

...and then we read in the GPX file of places people have clicked, and write out a GPX file of places which seem to be missing in OSM.
46 changes: 46 additions & 0 deletions missingplaces/fetchplaces.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
set -0

# Bash script to fetch villages data in Mali
# - fetched as several .osm files for different data types
# - merged into one using osmconvert
# - centroid nodes only using osmconvert
# - converted to CSV using osmconvert
#
# ...but the whole thing couldve been done by Overpass

#These steps can actually be done as
# one magical OverpassAPI query.

#xapi="http://jxapi.osm.rambler.ru/xapi/api/0.6/*"
#xapi="http://jxapi.openstreetmap.org/xapi/api/0.6/*"
xapi="http://www.overpass-api.de/api/xapi?*"

#mali
bbox="[bbox=-12.46545,9.4758,6.34314,25.74516]"

# test region
#bbox="[bbox=-4.7010513,14.5520723,-4.5533712,14.637127]"

echo "calling xapi for places"
wget $xapi[place=*]$bbox -O "places.osm"
echo "calling xapi for residential landuse"
wget $xapi[landuse=*]$bbox -O "landuse.osm"
wget $xapi[building=*]$bbox -O "buildings.osm"
wget $xapi[barrier=*]$bbox -O "barriers.osm"


#echo "adding fake version=1"
#./osmconvert places.osm --fake-version > places-fv.osm
#./osmconvert residential.osm --fake-version > residential-fv.osm

./osmconvert places.osm landuse.osm buildings.osm barriers.osm -o=places-ways-nodes.osm


echo "converting to nodes"
./osmconvert places-ways-nodes.osm --all-to-nodes >places-nodes.osm
#./osmconvert places-ways-nodes.osm --all-to-nodes | grep -v "<node .*/>" >places-nodes.osm

echo "converting to CSV"
./osmconvert places-nodes.osm --csv="@lat @lon name" >places.csv

echo "DONE places.csv"
Loading