Opened 11 years ago

Last modified 11 years ago

#10351 closed enhancement

[patch] added <reference/> to replace keys, new chunk id's, comment on closed tags — at Initial Version

Reported by: frankthetankk Owned by: team
Priority: normal Milestone: 14.08
Component: Internal preset Version: tested
Keywords: reference Cc:

Description

In my attempt to make the code look better/cleaner. This patch doesn't add new code besides chunk id. I replaced some already known key values with <reference/>. Briefly here are some changes I made.

  • <reference ref="name_ref" /> under key="highway" value="unclassified", key="surveillance:type" value="camera"
  • <reference ref="name_operator" /> under key="highway" value="services", key="barrier" value="toll_booth", key="landuse" value="greenhouse_horticulture", key="landuse" value="plant_nursery", key="landuse" value="garages"
  • <reference ref="name_wikipedia" /> under key="mountain_pass" value="yes"
  • <reference ref="name_layer" /> under key="waterway" value="ditch", key="waterway" value="stream", key="waterway" value="wadi",
  • <reference ref="name_operator_oh" /> under key="amenity" value="fuel", key="information" value="terminal", key="information" value="audioguide", key="leisure" value="sauna"
  • <reference ref="name_brand_operator_oh" /> under key="shop" value="motorcycle"

added new <chunk id=""> and <reference/> with the changes below

  • <chunk id="layer"> with <reference ref="layer" /> under tunnel, living_street, pedestrian, drain, canal, river, power line, power cable, bridge
  • <chunk id="internet"> with <reference ref="internet" /> under terminal, office,
  • <chunk id="name_wikipedia_elevation"> with <reference ref="name_wikipedia_elevation" /> under mountain_pass, peak, saddle, glacier, volcano
  • <chunk id="elevation"> with <reference ref="elevation" /> under alpine_hut, guidepost,
  • <chunk id="name_leisure_type"> with <reference ref="name_leisure_type" /> under 9pin, 10pin, archery, gymnastics, shooting, cricket_nets, racquet, table_tennis
  • <chunk id="width"> with <reference ref="width" /> under unclassified, residential, bicycle_road, living_street, pedestrian, service, construction, roundabout, bridge, tracktype, path, cycleway, foot_and_cycleway_segregated, foot_and_cycleway_combined, footway, steps, tunnel, building_passage, arcade, colonnade, avalanche_protector, culvert, bus_guideway, platform_rail, platform_bus
  • <chunk id="height"> with <reference ref="height" /> under hedge, fence, tower, chimney, surveillance camera, power tower, pole, tree, bridge
  • <chunk id="length"> with <reference ref="length" /> under adit, bridge, tunnel,
  • <chunk id="incline"> with <reference ref="incline" /> under highway_yesno_incline, bridge, ford, tunnel, building passage, avalanche_protector, culvert, `
  • <chunk id="maxspeed"> with <reference ref="maxspeed" /> under highway_base, road restrictions, bridge, bridleway, speedcamera, tunnel, building passage, bus guideway
  • <chunk id="lit_check"> with <reference ref="lit_check" /> under highway_yesno_incline_oneway_lit, motorway, motorway_link, trunk, trunk_link, bicycle_road, pedestrian, parking_aisle, footway, dog_park, `
  • <chunk id="aerialway_capacity"> with <reference ref="aerialway_capacity" /> under chair_lift, drag_lift, cable_car, gondola, mixed_lift, t-bar, j-bar, platter, rope_tow, magic_carpet
  • <chunk id="aerialway_duration"> with <reference ref="aerialway_duration" /> under chair_lift, drag_lift, cable_car, gondola, mixed_lift, t-bar, j-bar, platter, rope_tow, magic_carpet, goods
  • <chunk id="aerialway_bubble"> with <reference ref="aerialway_bubble" /> under chair_lift, mixed_lift
  • <chunk id="aerialway_heating"> with <reference ref="aerialway_heating" /> under chair_lift, cable_car, gondola, mixed_lift
  • <chunk id="stars"> with <reference ref="stars" /> under hotel, motel, guest_house, chalet, hostel, caravan_site, camp_site, restaurant
  • <chunk id="capacity"> with <reference ref="capacity" /> under parking_space, car_sharing, motorcycle_parking, bicycle_parking, caravan_site, Retirement Home
  • <chunk id="operator"> with <reference ref="operator" /> too many to list, Counted 30 changes here. 1 had an extra space at defibrillator
  • <chunk id="network"> with <reference ref="network" /> too many to list, Counted 9 changes here.
  • <chunk id="name"> with <reference ref="name" /> too many to list, Counted 208 changes here.
  • <chunk id="ref"> with <reference ref="ref" /> too many to list, Counted 20 changes here.
  • <chunk id="description"> with <reference ref="description" /> under public_transport, toilets, drinking_water, farm
  • <chunk id="fee"> with <reference ref="fee" /> under motorcycle_parking, terminal, audioguide, toilets
  • <chunk id="ref_number"> with <reference ref="ref_number" /> under parking_name_type_ref, vending_machine, terminal, audioguide, post_box, `
  • <chunk id="closer_description"> with <reference ref="closer_description" /> under map, board, terminal, audioguide, information,
  • <chunk id="wikipedia"> with <reference ref="wikipedia" /> under name_wikipedia, aerodrome, zoo, museum, contact, waterway, `
  • <chunk id="smoking_wheelchair"> with <reference ref="smoking_wheelchair" /> under internet_smoking_wheelchair, nightclub, brothel
  • <chunk id="sport"> with <reference ref="sport" /> under stadium, sports_centre, pitch, track
  • <chunk id="riding_surface"> with <reference ref="riding_surface" /> under `
  • <chunk id="organic"> with <reference ref="organic" /> under marketplace, greengrocer, farm, clothes, shoes, `
  • <chunk id="website"> with <reference ref="website" /> under population_postcode_website, car_sharing, marketplace, neighbourhood, `
  • <chunk id="genus_species"> with <reference ref="genus_species" /> under hedge, tree
  • <chunk id="genus_species_taxon"> with <reference ref="genus_species_taxon" /> under plant_nursery
  • <chunk id="highway_yesno_oneway_bridge_tunnel_cutting_embankment_lit_toll"> with <reference ref="highway_yesno_oneway_bridge_tunnel_cutting_embankment_lit_toll" /> under motorway, motorway_link
  • <chunk id="highway_yesno_oneway_motorroad_bridge_tunnel_cutting_embankment_lit_toll"> with <reference ref="highway_yesno_oneway_motorroad_bridge_tunnel_cutting_embankment_lit_toll" /> under trunk, trunk_link

I also added commented out titles at the end of the group and item closing tags. I feel with the titles include in both group and item closing tags makes it easier to read while editing and maintaining it being unified. I added this because it appears to look like it was unfinished as some were labeled in some areas and some were not. There were some errors on position and misspellings on the comments within the original file that I fixed as well.

I feel like with changes like these the code will be easier to read for anyone seeing the code, maybe for the first time, that wants to contribute improving it. At the same time I was able to reduce the file size from just adding the references alone. Below are some details of the file sizes. Let me know which version is appropriate for JOSM.

  • 481,499 bytes all the references included. No comment changes. Has comment errors, misspellings. reference_7363_v1.diff
  • 488,379 bytes original 7363 defaultpresets.xml
  • 492,363 bytes all the references and comments included. reference_comments_7363_v1.diff

Change History (2)

by frankthetankk, 11 years ago

Attachment: reference_7363_v1.diff added

reference and chunk id changes onlys

by frankthetankk, 11 years ago

comments, reference and chunk id changes

Note: See TracTickets for help on using tickets.