Imports and automated edits should only be carried out by those with experience and understanding of the way the OpenStreetMap community creates maps, and only with careful

planning

and

consultation

with the local community.

See

Import/Guidelines

and

Automated Edits code of conduct

for more information. Imports/automated edits which do not follow these guidelines might be reverted!

JOSM autofixes

(242) JOSM autofix - remove the "+" in layer tag, e.g. layer=+1 -> layer=1


(5,000) JOSM autofix - remove the "m" in the ele tag, e.g. ele=10m -> ele=10


(5,000) JOSM autofix - operator=ERDF -> operator=Enedis

Unnecessary tags

(439) JOSM autofix - remove unnecessary tag "access" when "highway=proposed"


(HUGE! 116,000+) JOSM autofix - remove unnecessary tag "motor_vehicle"

see MapCSS code

. Possible JOSM bug: highway searches for substring, not exact value.

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:motor_vehicle as ?tag_1)   (false as ?val_1)
WHERE {
  VALUES ?truthy { 'yes' 'true' '1' }
  VALUES ?highway { 'motorway' 'trunk' 'primary' 'secondary' 'tertiary' 'unclassified' 'residential' 'service' 'living_street' }
  ?id osmt:motor_vehicle ?truthy ;
      osmt:highway ?highway ;
      osmm:loc ?loc .
  OPTIONAL { ?id osmt:vehicle ?vehicle }
  OPTIONAL { ?id osmt:access ?access }
  OPTIONAL { ?id osmt:bicycle_road ?bicycle_road }

  FILTER (
    (!BOUND(?vehicle) || ?vehicle != 'no') &&
    (!BOUND(?access) || ?access != 'no') &&
    (!BOUND(?bicycle_road) || ?bicycle_road != 'yes')
  )
}


(1,400) JOSM autofix - remove unnecessary tag bridge=no


(13,000) JOSM autofix - remove unnecessary tag building=no


(1,350 - small cluster) JOSM autofix - remove unnecessary tag elevation=0


(HUGE 85,000+) JOSM autofix - remove unnecessary tag layer=0


(HUGE 90,000+) JOSM autofix - remove unnecessary "area=yes" (no highway)

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:area as ?tag_1)   (false as ?val_1)
WHERE {
  VALUES ?truthy { 'yes' 'true' '1' }
  VALUES ?tags { osmt:amenity osmt:landuse osmt:leisure }
  ?id osmt:area ?truthy ;
      ?tags ?anything ;
      osmm:isClosed true ;   # closed only applies to ways
      osmm:loc ?loc .
  MINUS { ?id osmt:highway ?highway }
}


(HUGE 124,000+) JOSM autofix - remove unnecessary "area=yes"

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:area as ?tag_1)   (false as ?val_1)
WHERE {
  VALUES ?truthy { 'yes' 'true' '1' }
  VALUES ?tags { osmt:building osmt:natural osmt:shop }
  ?id osmt:area ?truthy ;
      ?tags ?anything ;
      osmm:isClosed true ;   # closed only applies to ways
      osmm:loc ?loc .
}


(1009) JOSM autofix - remove unnecessary "area=yes" for aeroways

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:area as ?tag_1)   (false as ?val_1)
WHERE {
  VALUES ?truthy { 'yes' 'true' '1' }
  VALUES ?aeroway { 'aerodrome' 'helipad' }
  ?id osmt:area ?truthy ;
      osmt:aeroway ?aeroway ;
      osmm:isClosed true ;   # closed only applies to ways
      osmm:loc ?loc .
}


(9) JOSM autofix - emergency=permissive -> emergency=yes


Wikipedia tags

(3) JOSM autofix - replace "cz" with "cs" wikipedia prefix

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (?wptag as ?tag_1)   (IRI(REPLACE(STR(?wp), '/cz.', '/cs.')) as ?val_1)
WHERE {
  VALUES ?wptag {osmt:wikipedia osmt:brand:wikipedia osmt:operator:wikipedia osmt:subject:wikipedia osmt:artist:wikipedia osmt:name:entomology:wikipedia}
  ?id ?wptag ?wp ;
      osmm:loc ?loc .
  FILTER (STRSTARTS(STR(?wp), 'https://cz.wikipedia.org/'))
}


(126) JOSM autofix - fix duplicate language prefixes in wikipedia tags

see MapCSS code

view results   show query editor

https://josm.openstreetmap.de/browser/josm/trunk/data/validator/wikipedia.mapcss?rev=12493#L89", "taskId":"josm_layer_plus",  "minZoom":13 }
SELECT
  ?id  ?loc
  # keep the very last language prefix in the title
  (?wptag as ?tag_1)   (IRI(REPLACE(STR(?wp), '[a-z][a-z]\\.wikipedia\\.org/wiki/([a-z][a-z]:)*([a-z][a-z]):', '$2.wikipedia.org/wiki/')) as ?val_1)
WHERE {
  VALUES ?wptag {osmt:wikipedia osmt:brand:wikipedia osmt:operator:wikipedia osmt:subject:wikipedia osmt:artist:wikipedia osmt:name:entomology:wikipedia}
  ?id ?wptag ?wp ;
      osmm:loc ?loc .
  FILTER (REGEX(STR(?wp), 'https://([a-z][a-z])\\.wikipedia\\.org/wiki/[a-z][a-z]:'))
}


Suspicious Tag Combination

(6,194) JOSM autofix - "waterway" together with "bridge", setting bridge=aqueduct

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:bridge as ?tag_1)   ('aqueduct' as ?val_1)
WHERE {
  VALUES ?truthy { 'yes' 'true' '1' }
  ?id osmt:bridge ?truthy ;
      osmt:waterway ?waterway ;
      osmm:type 'w' ;
      osmm:loc ?loc .
  FILTER (?waterway != 'weir')
}


(504) JOSM autofix - "postal_code" together with "addr:postcode", removing "addr:postcode"

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:addr:postcode as ?tag_1)   (false as ?val_1)
WHERE {
  ?id osmt:highway ?highway ;
      osmt:postal_code ?code ;
      osmt:addr:postcode ?code ;
      osmm:type 'w' ;
      osmm:loc ?loc .
}


(98,811) !!!DO NOT RUN - it will time out!!! JOSM autofix - "highway" together with "addr:postcode", moving "addr:postcode" to "postcode"

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:addr:postcode as ?tag_1)  (false as ?val_1)
  (osmt:postal_code as ?tag_2)    (?postal_code as ?val_2)

WHERE {
  ?id osmt:addr:postcode ?addr_postcode ;
      osmt:highway ?highway ;
      osmm:type 'w' ;
      osmm:loc ?loc .

  FILTER ( ?highway != 'services' && ?highway != 'rest_area' )
  MINUS {  ?id osmt:postal_code ?postal_code . }
}


(586) JOSM autofix - natural water used for swimming pool, removing "natural"


(1,537) JOSM autofix - Same value of maxspeed:forward and maxspeed:backward, need to use maxspeed

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:maxspeed:forward as ?tag_1)   (false as ?val_1)
  (osmt:maxspeed:backward as ?tag_2)  (false as ?val_2)
  (osmt:maxspeed as ?tag_3)           (?maxspeed as ?val_3)

WHERE {
  ?id osmt:maxspeed:forward ?maxspeed ;
      osmt:maxspeed:backward ?maxspeed ;
      osmm:loc ?loc .

  OPTIONAL { ?id osmt:maxspeed ?opt_maxspeed }
  FILTER( !BOUND(?opt_maxspeed) || ?opt_maxspeed = ?maxspeed )
  
}


(600) JOSM autofix - no unisex together with female and male. Remove female and male, set unisex. Hairdresser shops only.

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:female as ?tag_1)   (false as ?val_1)
  (osmt:male as ?tag_2)     (false as ?val_2)
  (osmt:unisex as ?tag_3)   ('yes' as ?val_3)
WHERE {
  VALUES ?truthy { 'yes' 'true' '1' }
  ?id osmt:female ?truthy ;
      osmt:male ?truthy ;
      osmt:shop ?hairdresser ;
      osmm:loc ?loc .

  MINUS { ?id osmt:unisex ?unisex }
}


(49) node[leisure=park][natural=tree] delete leisure JOSM autofix -

Deprecated

(4,260) Change oneway=1 to oneway=yes per JOSM autofix -


Geometry

(15,434) rename source:geometry to source:position on nodes per JOSM autofix -

see MapCSS code

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:source:geometry as ?tag_1)   (false as ?val_1)
  (osmt:source:position as ?tag_2)   (?value as ?val_2)
WHERE {
  ?id osmt:source:geometry ?value ;
      osmm:type 'n' ;
      osmm:loc ?loc .
}


Wikipedia / Wikidata cleanup

De-duplicate identical wikidata and brand:wikidata

Remove duplicate wikidata tag when an identical brand:wikidata exists. If wikipedia tag is also set, it must match brand:wikipedia.

(more info)

. TODO: handle when wikipedia tag exists, but brand:wikipedia does not.

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:wikidata as ?tag_1)   (false as ?val_1)
  (osmt:wikipedia as ?tag_2)  (false as ?val_2)
WHERE {  
  # Get OSM features where tags wikidata = brand:wikidata
  ?id osmt:wikidata ?wd ;
         osmt:brand:wikidata ?wd ;
         osmm:loc ?loc .
  
  OPTIONAL { ?id osmt:wikipedia ?wp }
  OPTIONAL { ?id osmt:brand:wikipedia ?bwp }
  
  # Either wikipedia tag is missing, or it must be the same as brand:wikipedia
  FILTER (!BOUND(?wp) || (BOUND(?bwp) && ?wp = ?bwp))

  # TODO: Handle wikipedia tag:
  # If no brand:wikipedia:  if wikipedia tag matches wikidata tag, move it to brand:wikipedia.
  # If brand:wikipedia exists, ensure that it also matches wikidata, and if so, delete wikipedia tag.
  
  # Get labels for the Wikidata entry, and for all occupations
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,de,fr,it,pl,ru,es,sv,nl" .
    ?wd rdfs:label ?wdLabel .
  }
}


Convert natural=marsh → natural=wetland + wetland=marsh


Proposed fixes

Tag renames

amenity=sanatorium ⟶ leisure=resort + resort=sanatorium

view results   show query editor

SELECT
  # Generate output fields - id of the object, mark location, and the changeset comment
  ?id  ?loc 

  # Delete existing amenity tag by setting ?val_1 to false
  (osmt:amenity as ?tag_1)   (false as ?val_1)

  # Set leisure tag to the value 'resort'
  (osmt:leisure as ?tag_2)   ('resort' as ?val_2)

  # Set resort tag to the value 'sanatorium'
  (osmt:resort as ?tag_3)    ('sanatorium' as ?val_3)

WHERE {
  # Must have amenity=sanatorium and a location.
  ?id osmt:amenity 'sanatorium' ;
      osmm:loc ?loc .

  # Ignore if leisure tag already exists, and not set to 'resort'
  OPTIONAL { ?id osmt:leisure ?leisure }
  FILTER (!BOUND(?leisure) || ?leisure = 'resort')

  # Ignore if resort tag already exists, and not set to 'sanatorium'
  OPTIONAL { ?id osmt:resort ?resort }
  FILTER (!BOUND(?resort) || ?resort = 'sanatorium')
}


religion=christian

Cleanup religion=christian

Convert religion=Christian to religion=christian

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:religion as ?tag_1)   ('christian' as ?val_1)
WHERE {
  VALUES ?religion { 'Christian' }
  
  ?id osmt:religion ?religion ;
      osmm:loc ?loc .
}


Cleanup religion=christian, denomination=mormon/anglican

Convert religion=mormon/anglican/... to religion=christian and denomination=...

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:religion as ?tag_1)       ('christian' as ?val_1)
  (osmt:denomination as ?tag_2)   (?religion as ?val_2)
WHERE {
  VALUES ?religion { 'mormon' 'anglican' }
  
  ?id osmt:religion ?religion ;
      osmm:loc ?loc .

  # Ignore if denomination tag already exists, and not set to the needed value
  OPTIONAL { ?id osmt:denomination ?denomination }
  FILTER (!BOUND(?denomination) || ?denomination = ?religion)
}


Cleanup religion=christian, denomination=catholic

view results   show query editor

SELECT
  # Generate output fields - id of the object, mark location, and the change set comment
  ?id  ?loc
  (osmt:religion as ?tag_1)      ('christian' as ?val_1)
  (osmt:denomination as ?tag_2)  (?denomination as ?val_2)
WHERE {

  BIND ('catholic' as ?denomination)
  VALUES ?religion { 'catholic' 'catolica' }
  VALUES ?religion2 { 'catholic' 'catolica' }

  ?id osmt:religion ?religion ;
      osmm:loc ?loc .

  # Ignore if denomination tag already exists, and not set to the needed value
  OPTIONAL { ?id osmt:denomination ?den }
  FILTER (!BOUND(?den) || ?den = ?religion2)
}


religion=muslim

Cleanup religion=muslim

Convert religion=islam to religion=muslim

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:religion as ?tag_1)   ('muslim' as ?val_1)
WHERE {
  VALUES ?religion { 'Islam' 'islam' }
  
  ?id osmt:religion ?religion ;
      osmm:loc ?loc .
}


Multiple Choice Challenges

Replace sport=diving with either sport=scuba_diving or sport=cliff_diving

Fix deprecated

sport=diving

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:sport as ?tag_a1)  ('scuba_diving' as ?val_a1)
  (osmt:sport as ?tag_b1)  ('cliff_diving' as ?val_b1)
WHERE {
  ?id osmt:sport 'diving' .
  ?id osmm:loc ?loc .
}


Make amenity=education more specific

Fix deprecated

amenity=education

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:amenity as ?tag_a1)  ('college'    as ?val_a1)
  (osmt:amenity as ?tag_b1)  ('school'     as ?val_b1)
  (osmt:amenity as ?tag_c1)  ('university' as ?val_c1)
  (osmt:amenity as ?tag_d1)  (false        as ?val_d1)
  (osmt:office  as ?tag_d2)  ('tutoring'   as ?val_d2)
WHERE {
  ?id osmt:amenity 'education' .
  ?id osmm:loc ?loc .
}


Make shop=furnace more specific

Fix deprecated

shop=furnace

- This tag is confusing. A furnace is a big oven used for melting metals; some people also applied this tag for shops selling cooking stoves.

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:shop  as ?tag_a1)  ('houseware' as ?val_a1)
  (osmt:shop  as ?tag_b1)  ('heating'   as ?val_b1)
  (osmt:shop  as ?tag_c1)  (false       as ?val_c1)
  (osmt:craft as ?tag_c2)  ('plumber'   as ?val_c2)
WHERE {
  ?id osmt:shop 'furnace' .
  ?id osmm:loc ?loc .
}


Make amenity=nursery and amenity=creche more specific

Fix deprecated

amenity=nursery

and

amenity=nursery

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:amenity as ?tag_a1)  ('childcare'    as ?val_a1)
  (osmt:amenity as ?tag_b1)  ('kindergarten' as ?val_b1)
WHERE {
  VALUES ?amenity { 'creche' 'nursery' }
  ?id osmt:amenity ?amenity .
  ?id osmm:loc ?loc .
}


Make landuse=farm more specific

Fix deprecated

landuse=farm

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:landuse as ?tag_a1)  ('farmyard' as ?val_a1)
  (osmt:landuse as ?tag_b1)  ('farmland' as ?val_b1)
WHERE {
  ?id osmt:landuse 'farm' .
  ?id osmm:loc ?loc .
}


Make power=station more specific

Fix deprecated

power=station

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:power as ?tag_a1)  ('substation' as ?val_a1)
  (osmt:power as ?tag_b1)  ('plant'      as ?val_b1)
  (osmt:power as ?tag_c1)  ('generator'  as ?val_c1)
WHERE {
  ?id osmt:power 'station' .
  ?id osmm:loc ?loc .
}


Make landuse=wood more specific

Fix deprecated

landuse=wood

view results   show query editor

SELECT
  ?id  ?loc
  (osmt:landuse as ?tag_a1)  ('forest' as ?val_a1)
  (osmt:natural as ?tag_b1)  ('wood'   as ?val_b1)
  (osmt:landuse as ?tag_b2)  (false    as ?val_b2)
WHERE {
  ?id osmt:landuse 'wood' .
  ?id osmm:loc ?loc .
}