Skip to content

Instantly share code, notes, and snippets.

@hallahan
Created August 20, 2015 19:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hallahan/5aa6bc6909cd413989c5 to your computer and use it in GitHub Desktop.
Save hallahan/5aa6bc6909cd413989c5 to your computer and use it in GitHub Desktop.
OSM XForm Example
<?xml version="1.0" encoding="utf-8"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>Dhaka Buildings 6</h:title>
<model>
<instance>
<Dhaka-buildings6 id="Dhaka-buildings6" version="201505191555">
<formhub>
<uuid/>
</formhub>
<start/>
<end/>
<today/>
<deviceid/>
<title/>
<surveyor/>
<fp_id/>
<osm_building/>
<problem/>
<meta>
<instanceID/>
</meta>
</Dhaka-buildings6>
</instance>
<bind jr:preload="timestamp" jr:preloadParams="start" nodeset="/Dhaka-buildings6/start" type="dateTime"/>
<bind jr:preload="timestamp" jr:preloadParams="end" nodeset="/Dhaka-buildings6/end" type="dateTime"/>
<bind jr:preload="date" jr:preloadParams="today" nodeset="/Dhaka-buildings6/today" type="date"/>
<bind jr:preload="property" jr:preloadParams="deviceid" nodeset="/Dhaka-buildings6/deviceid" type="string"/>
<bind nodeset="/Dhaka-buildings6/title" readonly="true()" type="string"/>
<bind nodeset="/Dhaka-buildings6/surveyor" type="select1"/>
<bind nodeset="/Dhaka-buildings6/fp_id" type="string"/>
<bind nodeset="/Dhaka-buildings6/osm_building" type="binary"/>
<bind nodeset="/Dhaka-buildings6/problem" type="string"/>
<bind calculate="concat('uuid:', uuid())" nodeset="/Dhaka-buildings6/meta/instanceID" readonly="true()" type="string"/>
<bind calculate="'4db8a9a965ee42e6a42ad9ee7f31572a'" nodeset="/Dhaka-buildings6/formhub/uuid" type="string"/>
</model>
</h:head>
<h:body>
<input ref="/Dhaka-buildings6/title">
<label>Dhaka OpenMapKit Building Survey
Bangladesh Red Crescent Society and American Red Cross
May 2015</label>
</input>
<select1 ref="/Dhaka-buildings6/surveyor">
<label>What is your name?</label>
<item>
<label>Ahasanul Hoque</label>
<value>ahasanulhoque</value>
</item>
<item>
<label>Airin Akter</label>
<value>airinakter</value>
</item>
<item>
<label>Akhi Agatha Jetra</label>
<value>akhiagathajetra</value>
</item>
<item>
<label>Anas Uddin</label>
<value>anasuddin</value>
</item>
<item>
<label>Anik Islam</label>
<value>anikislam</value>
</item>
<item>
<label>Anwarul Alam Pintu</label>
<value>anwarulalampintu</value>
</item>
<item>
<label>Atikur Rahman</label>
<value>atikumrahman</value>
</item>
<item>
<label>Iftakhar Ahmed</label>
<value>iftakharahmed</value>
</item>
<item>
<label>Israth Jahan Rupa</label>
<value>israthjahanrupa</value>
</item>
<item>
<label>Istiak Ahmed</label>
<value>istiakahmed</value>
</item>
<item>
<label>Mahadi Hasan Shahid</label>
<value>mahadihasanshahid</value>
</item>
<item>
<label>Mahfuzur Rahman</label>
<value>mahfuzurrahman</value>
</item>
<item>
<label>Mahmud Munna</label>
<value>mahmudmunna</value>
</item>
<item>
<label>Mainul Haque Fahim</label>
<value>mainulhaquefahim</value>
</item>
<item>
<label>Mir Sadia Rashid</label>
<value>mirsadiarashid</value>
</item>
<item>
<label>Md. Abdur Karim</label>
<value>mdabdurkarim</value>
</item>
<item>
<label>Md. Alamgir Hossain</label>
<value>mdalamgirhossain</value>
</item>
<item>
<label>Md. Ariful Islam</label>
<value>mdarifulislam</value>
</item>
<item>
<label>Md. Ashif Karim</label>
<value>mdashifkarim</value>
</item>
<item>
<label>Md. Hasan</label>
<value>mdhasan</value>
</item>
<item>
<label>Md. Izazul Haa</label>
<value>mdizazulhaa</value>
</item>
<item>
<label>Mohammad Kamrul Hasan</label>
<value>mohammadkamrulhasan</value>
</item>
<item>
<label>Mohammad Mahmudul Hasan</label>
<value>mohammadmahmudulhasan</value>
</item>
<item>
<label>Md. Manjurul Islam</label>
<value>mdmanjurulislam</value>
</item>
<item>
<label>Md. Moshfaqur Rahman</label>
<value>mdmoshfaqurrahman</value>
</item>
<item>
<label>Md. Muhibur Rahman</label>
<value>mdmuhiburrahman</value>
</item>
<item>
<label>Md. Nayeem</label>
<value>mdnayeem</value>
</item>
<item>
<label>Md. Ripan Mia</label>
<value>mdripanmia</value>
</item>
<item>
<label>Md. Saiful Islam</label>
<value>mdsaifulislam</value>
</item>
<item>
<label>Md. Sajjad Hossen Sapan</label>
<value>mdsajjadhossensapan</value>
</item>
<item>
<label>Md. Sharif</label>
<value>mdsharif</value>
</item>
<item>
<label>Md. Tauhidul Islam</label>
<value>mdtauhidulislam</value>
</item>
<item>
<label>Md. Ziaul Hoq</label>
<value>mdziaulhoq</value>
</item>
<item>
<label>Nabila Ahmed</label>
<value>nabilaahmed</value>
</item>
<item>
<label>Nicholas Hallahan</label>
<value>nicholashallahan</value>
</item>
<item>
<label>Razu Ahmed</label>
<value>razuahmed</value>
</item>
<item>
<label>Roksana Amin Nodi</label>
<value>roksanaaminnodi</value>
</item>
<item>
<label>Rukaia Parveen</label>
<value>rukaiaparveen</value>
</item>
<item>
<label>Sagar Ahmed</label>
<value>sagarahmed</value>
</item>
<item>
<label>Shahadat Hossain Sujon</label>
<value>shahadathossainsujon</value>
</item>
<item>
<label>Shahrin Marzen Nipun</label>
<value>shahrinmarzennipun</value>
</item>
<item>
<label>Shamima Prodan</label>
<value>shamimaprodan</value>
</item>
<item>
<label>Shibsanker Saha</label>
<value>shibsankersaha</value>
</item>
<item>
<label>SM Sawan Shariar</label>
<value>smsawanshariar</value>
</item>
<item>
<label>Steven Rubinyi</label>
<value>stevenrubinyi</value>
</item>
<item>
<label>Subrata Biswas</label>
<value>subratabiswas</value>
</item>
<item>
<label>Sumon Kumar Sheel</label>
<value>sumonkumarsheel</value>
</item>
<item>
<label>Tahrima Hossain</label>
<value>tahrimahossain</value>
</item>
<item>
<label>Tanvia Rahman</label>
<value>tanviarahman</value>
</item>
<item>
<label>Tanvir Alam</label>
<value>tanviralam</value>
</item>
<item>
<label>Tasauf A Baki Billah</label>
<value>tasaufabakibillah</value>
</item>
<item>
<label>Tasnim Jerin</label>
<value>tasnimjerin</value>
</item>
<item>
<label>Other (Not in List)</label>
<value>other</value>
</item>
</select1>
<input ref="/Dhaka-buildings6/fp_id">
<label>Field Paper ID</label>
</input>
<upload mediatype="osm/*" ref="/Dhaka-buildings6/osm_building">
<label>Please select and tag this building on the map.</label>
<tag key="source">
<label>Select if survey with BDRCS / Red Cross</label>
<item>
<label>Data4Action BDRCS / Red Cross</label>
<value>Data4Action BDRCS / Red Cross</value>
</item>
</tag>
<tag key="building">
<label>Building</label>
<item>
<label>Yes</label>
<value>yes</value>
</item>
<item>
<label>Other/Multiple (Mixed)</label>
<value>mixed</value>
</item>
<item>
<label>Residential</label>
<value>residential</value>
</item>
<item>
<label>Commercial</label>
<value>commercial</value>
</item>
<item>
<label>Industrial</label>
<value>industrial</value>
</item>
<item>
<label>Hospital</label>
<value>hospital</value>
</item>
<item>
<label>Under Construction</label>
<value>construction</value>
</item>
<item>
<label>Warehouse</label>
<value>warehouse</value>
</item>
<item>
<label>School</label>
<value>school</value>
</item>
<item>
<label>Mosque</label>
<value>mosque</value>
</item>
<item>
<label>Hotel</label>
<value>hotel</value>
</item>
<item>
<label>Community Center (Public)</label>
<value>public</value>
</item>
<item>
<label>House (Single Unit Dwelling)</label>
<value>house</value>
</item>
<item>
<label>Shed</label>
<value>shed</value>
</item>
</tag>
<tag key="building:material">
<label>Building Material</label>
<item>
<label>Concrete</label>
<value>concrete</value>
</item>
<item>
<label>Brick</label>
<value>brick</value>
</item>
<item>
<label>Stone</label>
<value>stone</value>
</item>
<item>
<label>Tin</label>
<value>tin</value>
</item>
<item>
<label>Bamboo</label>
<value>bamboo</value>
</item>
<item>
<label>Wood</label>
<value>wood</value>
</item>
<item>
<label>Metal</label>
<value>metal</value>
</item>
<item>
<label>Plastic</label>
<value>plastic</value>
</item>
</tag>
<tag key="building:condition">
<label>Building Condition</label>
<item>
<label>Excellent</label>
<value>good</value>
</item>
<item>
<label>Good</label>
<value>average</value>
</item>
<item>
<label>Poor</label>
<value>poor</value>
</item>
</tag>
<tag key="building:levels">
<label>Number of Floors</label>
</tag>
<tag key="addr:housenumber">
<label>Holding Number</label>
</tag>
<tag key="addr:street">
<label>Street Name</label>
</tag>
<tag key="name">
<label>Building Name</label>
</tag>
<tag key="building:soft_storey">
<label>Soft Story</label>
<item>
<label>Yes</label>
<value>yes</value>
</item>
<item>
<label>No</label>
<value>no</value>
</item>
</tag>
<tag key="amenity">
<label>Type of Establishment (Amenity)</label>
<item>
<label>Mosque / Church / Temple</label>
<value>place_of_worship</value>
</item>
<item>
<label>Cafe / Tea Stall</label>
<value>café</value>
</item>
<item>
<label>Restaurant</label>
<value>restaurant</value>
</item>
<item>
<label>Fast Food</label>
<value>fast_food</value>
</item>
<item>
<label>Bank</label>
<value>bank</value>
</item>
<item>
<label>Office</label>
<value>office</value>
</item>
<item>
<label>Hospital</label>
<value>hospital</value>
</item>
<item>
<label>Clinic / Consultation Chamber / Diagnostic Center</label>
<value>clinic</value>
</item>
<item>
<label>Internet Café</label>
<value>internet_cafe</value>
</item>
<item>
<label>Pharmacy</label>
<value>pharmacy</value>
</item>
<item>
<label>Police Station</label>
<value>police</value>
</item>
<item>
<label>Fire Station</label>
<value>fire_station</value>
</item>
<item>
<label>School / Madrasa</label>
<value>school</value>
</item>
<item>
<label>College</label>
<value>college</value>
</item>
<item>
<label>University</label>
<value>university</value>
</item>
<item>
<label>Library</label>
<value>library</value>
</item>
<item>
<label>Community Center</label>
<value>community_centre</value>
</item>
<item>
<label>Theatre</label>
<value>theatre</value>
</item>
<item>
<label>Fuel / Gas Station</label>
<value>fuel</value>
</item>
</tag>
<tag key="office">
<label>Type of Office</label>
<item>
<label>Company</label>
<value>company</value>
</item>
<item>
<label>Government</label>
<value>government</value>
</item>
<item>
<label>Insurance</label>
<value>insurance</value>
</item>
<item>
<label>Law</label>
<value>lawyer</value>
</item>
<item>
<label>Real Estate</label>
<value>estate_agent</value>
</item>
<item>
<label>Telecommunication</label>
<value>telecommunication</value>
</item>
<item>
<label>Other</label>
<value>yes</value>
</item>
</tag>
<tag key="religion">
<label>Type of Religion</label>
<item>
<label>Muslim</label>
<value>muslim</value>
</item>
<item>
<label>Christian</label>
<value>christian</value>
</item>
<item>
<label>Buddhist</label>
<value>buddhist</value>
</item>
<item>
<label>Hindu</label>
<value>hindu</value>
</item>
</tag>
<tag key="shop">
<label>Type of Shop</label>
<item>
<label>Variety Shop</label>
<value>convenience</value>
</item>
<item>
<label>Supermarket</label>
<value>supermarket</value>
</item>
<item>
<label>Clothes Shop</label>
<value>clothes</value>
</item>
<item>
<label>Tailor</label>
<value>tailor</value>
</item>
<item>
<label>Beauty Parlor</label>
<value>beauty</value>
</item>
<item>
<label>Barber / Hairdresser</label>
<value>hairdresser</value>
</item>
<item>
<label>Laundry</label>
<value>laundry</value>
</item>
<item>
<label>Electronics Shop</label>
<value>electronics</value>
</item>
<item>
<label>Hardware Store (Tools)</label>
<value>hardware</value>
</item>
<item>
<label>Furniture Shop</label>
<value>furniture</value>
</item>
<item>
<label>Car Repair</label>
<value>car_repair</value>
</item>
<item>
<label>Printing / Copy Shop</label>
<value>copyshop</value>
</item>
<item>
<label>Video Shop</label>
<value>video</value>
</item>
<item>
<label>Bicycle Shop</label>
<value>bicycle</value>
</item>
<item>
<label>Car Shop</label>
<value>car</value>
</item>
<item>
<label>Chemist (Chemicals)</label>
<value>chemist</value>
</item>
<item>
<label>Shopping Mall</label>
<value>mall</value>
</item>
</tag>
</upload>
<input ref="/Dhaka-buildings6/problem">
<label>If you had a problem with tagging this building, please describe your issue.</label>
</input>
</h:body>
</h:html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment