Skip to content

Commit

Permalink
Merge pull request #38 from mholthausen/extract-nested-expressions
Browse files Browse the repository at this point in the history
Fixes extraction of nested expressions with more than two filter
  • Loading branch information
jansule committed May 7, 2021
2 parents aa665c6 + db2acce commit 10db2d4
Show file tree
Hide file tree
Showing 5 changed files with 2,122 additions and 1,796 deletions.
14 changes: 14 additions & 0 deletions data/mapfiles/line_set_of_expressions.map
@@ -0,0 +1,14 @@
IMAGECOLOR "#f3f3e9"
LAYER
NAME roads_inline
TYPE LINE
EXTENT -20026376.39 -20048966.10 20026376.39 20048966.10
PROJECTION
"init=epsg:3857"
END
CLASS
MAXSCALEDENOM 500000
MINSCALEDENOM 25000
EXPRESSION (('[class]' = 'railways') AND ('[service]' != 'spur') AND ('[type]' = 'rail'))
END
END
20 changes: 20 additions & 0 deletions data/styles/line_set_of_expressions.ts
@@ -0,0 +1,20 @@
import { Style } from 'geostyler-style';

const lineExpressionStyle: Style = [{
name: 'roads_inline',
rules: [
{
name: '',
filter: [
'&&',
['==', 'class', 'railways'],
['!=', 'service', 'spur'],
['==', 'type', 'rail']
],
scaleDenominator: { max: 500000, min: 25000 },
symbolizers: []
}
]
}];

export default lineExpressionStyle;

0 comments on commit 10db2d4

Please sign in to comment.