Modify

Opened 7 years ago

Last modified 7 years 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 7 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by Don-vip, 7 years ago

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 by marxin, 7 years ago

Owner: changed from team to marxin
Status: newassigned

in reply to:  1 comment:3 by marxin, 7 years ago

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 by marxin, 7 years ago

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 by marxin, 7 years ago

Cc: qeef added

comment:6 by Don-vip, 7 years ago

Reporter: changed from anonymous to marxin

comment:7 by Klumbumbus, 7 years ago

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.)

in reply to:  7 ; comment:8 by qeef, 7 years ago

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.

in reply to:  8 ; comment:9 by Klumbumbus, 7 years ago

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)

in reply to:  9 comment:10 by marxin, 7 years ago

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 by marxin, 7 years ago

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. Next status will be 'closed'.
to The owner will be changed from marxin to the specified user. Next status will be 'new'.
Next status will be 'needinfo'. The owner will be changed from marxin to marxin.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. 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.