Modify

Opened 10 months ago

Last modified 9 months ago

#16262 assigned enhancement

[PATCH] Add BuildingOutsideResidentialArea test.

Reported by: marxin Owned by: marxin
Priority: normal Milestone:
Component: Core validator Version:
Keywords: Cc: qeef

Description

New validation useful for HOTOSM tasks.

Attachments (1)

0001-Add-BuildingOutsideResidentialArea-test.patch (5.4 KB) - added by anonymous 10 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 months ago by Don-vip

Only residential buildings should be checked (house, apartments, etc.). We won't raise a warning for industrial buildings, farms, etc.

I'd like to get #10391 working first so the whole test could be written in MapCSS with something like that:

*[building=house]  *[landuse=residential] {
  throwWarning: tr("{0} not inside {1}", "{0.tag}", "{2.key}");
}

comment:2 Changed 10 months ago by marxin

Owner: changed from team to marxin
Status: newassigned

comment:3 in reply to:  1 Changed 10 months ago by marxin

Replying to Don-vip:

Only residential buildings should be checked (house, apartments, etc.). We won't raise a warning for industrial buildings, farms, etc.

I'd like to get #10391 working first so the whole test could be written in MapCSS with something like that:

*[building=house]  *[landuse=residential] {
  throwWarning: tr("{0} not inside {1}", "{0.tag}", "{2.key}");
}

Fully agree with you. Looks the #10391 is open for quite some time. I will take a look whether I can implement that.

comment:4 Changed 10 months ago by marxin

I see two possible problems with usage of mapcss:

  • we consider a single standing buildings as valid to not be in a residential area
  • my current approach has a parameter that drives the proximity of buildings

comment:5 Changed 10 months ago by marxin

Cc: qeef added

comment:6 Changed 10 months ago by Don-vip

Reporter: changed from anonymous to marxin

comment:7 Changed 10 months ago by Klumbumbus

I don't know about special HOT use cases, but landuse "describe the primary use of land", so even several buildings near to each other with at least one as building=residential are fine within another landuse=* area. This can be OK.

It would be OK as info level as it could indeed reveal tagging mistakes, but I think the number of false positives would be too high as this would fit in warning level. (I didn't yet test the test though.)

comment:8 in reply to:  7 ; Changed 10 months ago by qeef

Replying to Klumbumbus:

I don't know about special HOT use cases, but landuse "describe the primary use of land", so even several buildings near to each other with at least one as building=residential are fine within another landuse=* area. This can be OK.

When considering HOT mapping, the number of buildings needed for residential area vary between 2 to 4 (depends on task instructions).

Related question - would it be possible to check out the number of buildings not in the residential area when written in MapCSS? I'm not skilled in MapCSS so just if it's even possible.

comment:9 in reply to:  8 ; Changed 10 months ago by Klumbumbus

Replying to qeef:

Related question - would it be possible to check out the number of buildings not in the residential area when written in MapCSS?

That's not possibe in mapcss afaik. (wiki:Help/Styles/MapCSSImplementation)

comment:10 in reply to:  9 Changed 9 months ago by marxin

Replying to Klumbumbus:

Replying to qeef:

Related question - would it be possible to check out the number of buildings not in the residential area when written in MapCSS?

That's not possibe in mapcss afaik. (wiki:Help/Styles/MapCSSImplementation)

There are couple of functions used in mapcss rules:
src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

One example is:

/* #12561 - building larger than Aalsmeer Flower Auction (518000) and Tesla factory (510000) */
area:closed[building][building!=no][eval(areasize()) > 520000] {
  throwError: tr("Too large building");
}

Maybe we can add function closebuildings which would return # of buildings that are 'close' to a building.

comment:11 Changed 9 months ago by marxin

Apart from that I did small experiment with MAPCSS (using work-around suggested in #10391). But it selected all buildings:

+area:closed[building][building!=no] ∈ area:closed:areaStyle[landuse=residential][landuse] {
+  set building_in_residential_area;
+}
+
+area:closed[building][building!=no]!.building_in_residential_area {
+  throwWarning: tr("XXX building outsize a residential area");
+}

Thoughts why?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain marxin.
as The resolution will be set.
to The owner will be changed from marxin to the specified user.
The owner will change to marxin
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.