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" />underkey="highway" value="unclassified",key="surveillance:type" value="camera"<reference ref="name_operator" />underkey="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" />underkey="mountain_pass" value="yes"<reference ref="name_layer" />underkey="waterway" value="ditch",key="waterway" value="stream",key="waterway" value="wadi",<reference ref="name_operator_oh" />underkey="amenity" value="fuel",key="information" value="terminal",key="information" value="audioguide",key="leisure" value="sauna"<reference ref="name_brand_operator_oh" />underkey="shop" value="motorcycle"
added new <chunk id=""> and <reference/> with the changes below
<chunk id="layer">with<reference ref="layer" />undertunnel,living_street,pedestrian, drain,canal,river,power line,power cable,bridge<chunk id="internet">with<reference ref="internet" />underterminal,office,<chunk id="name_wikipedia_elevation">with<reference ref="name_wikipedia_elevation" />undermountain_pass,peak,saddle,glacier,volcano<chunk id="elevation">with<reference ref="elevation" />underalpine_hut,guidepost,<chunk id="name_leisure_type">with<reference ref="name_leisure_type" />under9pin,10pin,archery,gymnastics,shooting,cricket_nets,racquet,table_tennis<chunk id="width">with<reference ref="width" />underunclassified,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" />underhedge,fence,tower,chimney,surveillance camera,power tower,pole,tree,bridge<chunk id="length">with<reference ref="length" />underadit,bridge,tunnel,<chunk id="incline">with<reference ref="incline" />underhighway_yesno_incline,bridge,ford,tunnel,building passage,avalanche_protector,culvert, `<chunk id="maxspeed">with<reference ref="maxspeed" />underhighway_base,road restrictions,bridge,bridleway,speedcamera,tunnel,building passage,bus guideway<chunk id="lit_check">with<reference ref="lit_check" />underhighway_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" />underchair_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" />underchair_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" />underchair_lift,mixed_lift<chunk id="aerialway_heating">with<reference ref="aerialway_heating" />underchair_lift,cable_car,gondola,mixed_lift<chunk id="stars">with<reference ref="stars" />underhotel,motel,guest_house,chalet,hostel,caravan_site,camp_site,restaurant<chunk id="capacity">with<reference ref="capacity" />underparking_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 atdefibrillator<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" />underpublic_transport,toilets,drinking_water,farm<chunk id="fee">with<reference ref="fee" />undermotorcycle_parking,terminal,audioguide,toilets<chunk id="ref_number">with<reference ref="ref_number" />underparking_name_type_ref,vending_machine,terminal,audioguide,post_box, `<chunk id="closer_description">with<reference ref="closer_description" />undermap,board,terminal,audioguide,information,<chunk id="wikipedia">with<reference ref="wikipedia" />undername_wikipedia,aerodrome,zoo,museum,contact,waterway, `<chunk id="smoking_wheelchair">with<reference ref="smoking_wheelchair" />underinternet_smoking_wheelchair,nightclub,brothel<chunk id="sport">with<reference ref="sport" />understadium,sports_centre,pitch,track<chunk id="riding_surface">with<reference ref="riding_surface" />under `<chunk id="organic">with<reference ref="organic" />undermarketplace,greengrocer,farm,clothes,shoes, `<chunk id="website">with<reference ref="website" />underpopulation_postcode_website,car_sharing,marketplace,neighbourhood, `<chunk id="genus_species">with<reference ref="genus_species" />underhedge,tree<chunk id="genus_species_taxon">with<reference ref="genus_species_taxon" />underplant_nursery<chunk id="highway_yesno_oneway_bridge_tunnel_cutting_embankment_lit_toll">with<reference ref="highway_yesno_oneway_bridge_tunnel_cutting_embankment_lit_toll" />undermotorway,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" />undertrunk,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
referencesincluded. No comment changes. Has comment errors, misspellings. reference_7363_v1.diff - 488,379 bytes original 7363 defaultpresets.xml
- 492,363 bytes all the
referencesand comments included. reference_comments_7363_v1.diff
Change History (2)
by , 11 years ago
| Attachment: | reference_7363_v1.diff added |
|---|
by , 11 years ago
| Attachment: | reference_comments_7363_v1.diff added |
|---|
comments, reference and chunk id changes



reference and chunk id changes onlys