Commit 0142f814 authored by jayherron's avatar jayherron

Modified merged script to use "TYPE" tag

parent e4ca1954
......@@ -8,10 +8,43 @@
counter = 0;
ds.each(function(obj){
if(obj.get("building")=="yes"){ // Don't override building tag if already set by hand during merge.
if(obj.get("PtType")=="Residential") obj.set("building","house"); // Assume house.
// Use the "TYPE" tag
if(obj.get("TYPE")=="CHURCH") {
obj.set("building", "church");
obj.set("amenity", "place_of_worship");
}
else if(obj.get("TYPE")=="COMMERCIAL RETAIL") {
obj.set("building", "retail");
}
else if(obj.get("TYPE")=="COMMERCIAL SERVICES") {
obj.set("building", "commercial");
}
else if(obj.get("TYPE")=="CONDOMINIUM RESIDENCE") {
obj.set("building", "house");
}
else if(obj.get("TYPE")=="DETACHED GARAGE") {
obj.set("building", "garage");
}
else if(obj.get("TYPE")=="GENERAL OFFICE") {
obj.set("building", "office");
}
else if(obj.get("TYPE")=="PUBLIC FACILITY - CITY") {
obj.set("building", "public");
}
else if(obj.get("TYPE")=="SINGLE FAMILY RESIDENCE") {
obj.set("building", "house");
}
else if(obj.get("TYPE")=="STORAGE SHED") {
obj.set("building", "shed");
}
// Next use "PtType" tag
else if(obj.get("PtType")=="Residential") obj.set("building","house"); // Assume house.
else if(obj.get("PtType")=="Commercial") obj.set("building","commercial"); // Assume commercial.
else if(obj.get("PtType")=="Industrial") obj.set("building","industrial"); // Assume industrial.
else if(obj.get("UnitType")=="APT") obj.set("building","apartments"); // This was set in the addresses script.
// Finally, use "APT" tag set in the addresses script if duplicates were found.
else if(obj.get("UnitType")=="APT") obj.set("building","apartments");
if(obj.get("building")!="yes") counter = counter + 1; // Increment counter if it changed.
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment