Modify

Opened 6 years ago

Closed 6 years ago

#9516 closed enhancement (fixed)

MapCSS: add support for spatial expressions

Reported by: simon04 Owned by: team
Priority: normal Milestone: 14.01
Component: Core validator Version:
Keywords: mapcss Cc:

Description (last modified by simon04)

A good support for a spatial "element of" expression could supersede the BuildingInBuilding test and allow mappers to write specific validators (see #9414, #9311).

Attachments (0)

Change History (11)

comment:1 Changed 6 years ago by simon04

In 6607/josm:

see #9516 - MapCSS: add basic support for a "contains" expression

The current syntax is outer ∋ inner, e.g., way[building?] ∋ node[building?].

This implementation is known to be inefficient since, for every match on the right side, it checks all primitives of the dataset for a match.

Nevertheless, this implementation allows mappers to write specific MapCSS-based tests involving this spatial operator.

comment:2 Changed 6 years ago by simon04

In 6609/josm:

see #9516 - MapCSS: greatly improve performance of spatial "element of" (was: "contains") expression

The current syntax is inner ∈ outer.

The order plus symbol has been changed since now the left side is matched in the end.

comment:3 Changed 6 years ago by simon04

Description: modified (diff)
Summary: MapCSS: add support for "contains" expressionsMapCSS: add support for spatial expressions

comment:4 Changed 6 years ago by simon04

Milestone: 14.01

comment:5 Changed 6 years ago by Don-vip

The building in building test never really worked, so that's an excellent idea :-)

comment:6 Changed 6 years ago by mkoniecz

Is it possible to change this symbol to something that will not require copy-pasting from list of special symbols? Maybe simple "in" or "element of" would be better?

comment:7 Changed 6 years ago by simon04

In 6611/josm:

see #9516 - Replace BuildingInBuilding by a corresponding MapCSS test

comment:8 in reply to:  5 ; Changed 6 years ago by simon04

Replying to Don-vip:

The building in building test never really worked, so that's an excellent idea :-)

Good that the isPolygonInsideMultiPolygon code is taken from the BuildingInBuilding test ;-))

comment:9 Changed 6 years ago by simon04

In 6613/josm:

see #9516 - MapCSS: add support for crossing polygon check (area ⧉ area), replace OverlappingAreas test by a corresponding MapCSS test

comment:10 in reply to:  8 Changed 6 years ago by Don-vip

Replying to simon04:

Good that the isPolygonInsideMultiPolygon code is taken from the BuildingInBuilding test ;-))

Hem :) Maybe we could take a look to "building in building" false positive tickets, then. I can only find #9361 right now but I was pretty sure there was another, older ticket with several non-working examples.

comment:11 Changed 6 years ago by simon04

Resolution: fixed
Status: newclosed

#8873 was another issue, which fixed itself in the course of migration to MapCSS. :-)

For now, I got all spatial operations into MapCSS that I wanted.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.