Use "nonsquare" instead of "nosquare" for marking unsquare ways as physically unsquare (re: #6332)

This commit is contained in:
Quincy Morgan
2019-05-09 19:11:11 -04:00
parent 05b77318ab
commit ad744a75ef
4 changed files with 9 additions and 4 deletions
+4
View File
@@ -507,6 +507,10 @@
"old": {"natural": "waterfall"},
"replace": {"waterway": "waterfall"}
},
{
"old": {"nosquare": "*"},
"replace": {"nonsquare": "$1"}
},
{
"old": {"office": "real_estate"},
"replace": {"office": "estate_agent"}
+1
View File
@@ -1854,6 +1854,7 @@
{"key": "mining_resource", "description": "🄳 ➜ resource=*"},
{"key": "natural", "value": "marsh", "description": "🄳 ➜ natural=wetland + wetland=marsh"},
{"key": "natural", "value": "waterfall", "description": "🄳 ➜ waterway=waterfall"},
{"key": "nosquare", "description": "🄳 ➜ nonsquare=*"},
{"key": "office", "value": "real_estate", "description": "🄳 ➜ office=estate_agent"},
{"key": "oneway", "value": "1", "description": "🄳 ➜ oneway=yes"},
{"key": "oneway", "value": "alternate", "description": "🄳 ➜ oneway=alternating"},
+2 -2
View File
@@ -22,10 +22,10 @@ export function actionOrthogonalize(wayID, projection, vertexID, ep, degThresh)
var way = graph.entity(wayID);
way = way.removeNode(''); // sanity check - remove any consecutive duplicates
if (way.tags.nosquare) {
if (way.tags.nonsquare) {
var tags = Object.assign({}, way.tags);
// since we're squaring, remove indication that this is physically unsquare
delete tags.nosquare;
delete tags.nonsquare;
way = way.update({tags: tags});
}
+2 -2
View File
@@ -26,7 +26,7 @@ export function validationUnsquareWay() {
if (!isBuilding(entity, graph)) return [];
// don't flag ways marked as physically unsquare
if (entity.tags.nosquare === 'yes') return [];
if (entity.tags.nonsquare === 'yes') return [];
var isClosed = entity.isClosed();
if (!isClosed) return []; // this building has bigger problems
@@ -95,7 +95,7 @@ export function validationUnsquareWay() {
var entityId = this.issue.entityIds[0];
var entity = context.entity(entityId);
var tags = Object.assign({}, entity.tags); // shallow copy
tags.nosquare = 'yes';
tags.nonsquare = 'yes';
context.perform(
actionChangeTags(entityId, tags),
t('issues.fix.tag_as_unsquare.annotation')