﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
22940	[Patch] add autofix for node[type=multipolygon] and most way[type=multipolygon]	marc_marc	team	"==== What steps will reproduce the problem?
1. create a node with `natural=tree` `type=multipolygon`
2. create a way with `landuse=residential` `type=multipolygon`
3. run the validator

==== What is the expected result?
have a autofix for both

==== What happens instead?
the validator detect the issue without a autofix
https://josm.openstreetmap.de/browser/trunk/resources/data/validator/geometry.mapcss#L90
https://josm.openstreetmap.de/browser/trunk/resources/data/validator/geometry.mapcss#L139

==== proposed enhancement
{{{#!mapcss
node[type=multipolygon] {
    throwError: tr(""{0} on a node. Should be used in a relation"", ""{0.tag}"");
    fixRemove: ""type"";
}

way!:closed[type=multipolygon] {
    throwError: tr(""{0} on a way. Should be used in a relation"", ""{0.tag}""); 
    fixRemove: ""type"";
}

way:area-style[type=multipolygon] {
    throwError: tr(""{0} on a way. Should be used in a relation"", ""{0.tag}""); 
    fixRemove: ""type"";
}
}}}

I didn't combine both `way` with `way[type=multipolygon]` because some wrong usage of `way[type=multipolygon]` mean `area=yes` (for ex when converting a relation `type=multipolygon` `highway=pedestrian` into a closed way)

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-05-09 19:06:23 +0200 (Tue, 09 May 2023)
Build-Date:2023-05-10 01:30:56
Revision:18722
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18722 fr) Linux CentOS Linux release 7.9.2009 (Core)
Memory Usage: 473 MB / 1717 MB (220 MB allocated, but free)
Java version: 1.8.0_362-b08, Red Hat, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1600×900 (scaling 1.00×1.00)
Maximum Screen Size: 1600×900
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: fr.utf8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: fr_CH
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: GNOME-Classic:GNOME
Java package: java-1.8.0-openjdk:x86_64-1.8.0.362.b08
WebStart package: icedtea-web:x86_64-1.7.1
VM arguments: [-Dicedtea-web.bin.name=javaws.itweb, -Dicedtea-web.bin.location=/usr/bin/javaws.itweb]
}}}
"	enhancement	new	normal		Core validator			template_report type multipolygon	
