Commit 2caa6305 authored by jayherron's avatar jayherron

Added maps of unique building type tag values

parent 0142f814
This diff is collapsed.
......@@ -2,44 +2,37 @@
var command = require("josm/command");
var console = require("josm/scriptingconsole");
// This contains all the different values of the PtType tag on the address points
const ptTypeMap = {"Agricultural":"",
"Mixed Use":"",
var layer = josm.layers.activeLayer; // Set to the active layer.
var ds =;
counter = 0;
if(obj.get("building")=="yes"){ // Don't override building tag if already set by hand during merge.
// 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.
if(obj.get("building")=="yes"){ // Don't override building tag if already set.
// If building type wasn't set by building data or by hand in merge, use address "PtType" tag
// TODO Improve to use map up above.
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.
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