Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #203 from KaiVolland/strmatches
Introduces parsing of strMatches FunctionFilter
- Loading branch information
Showing
4 changed files
with
232 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" | ||
xmlns="http://www.opengis.net/sld" | ||
xmlns:ogc="http://www.opengis.net/ogc" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<NamedLayer> | ||
<Name>Simple Point Filter</Name> | ||
<UserStyle> | ||
<Title>Simple Point Filter</Title> | ||
<FeatureTypeStyle> | ||
<Rule> | ||
<Name>Small populated New Yorks</Name> | ||
<Filter xmlns="http://www.opengis.net/ogc"> | ||
<PropertyIsLike> | ||
<Function name="strMatches"> | ||
<PropertyName>year</PropertyName> | ||
<Literal>^( )??2019,.*</Literal> | ||
</Function> | ||
<Literal>true</Literal> | ||
</PropertyIsLike> | ||
</Filter> | ||
<MinScaleDenominator>10000</MinScaleDenominator> | ||
<MaxScaleDenominator>20000</MaxScaleDenominator> | ||
<PointSymbolizer> | ||
<Graphic> | ||
<Mark> | ||
<WellKnownName>circle</WellKnownName> | ||
<Fill> | ||
<CssParameter name="fill">#FF0000</CssParameter> | ||
</Fill> | ||
<Stroke> | ||
<CssParameter name="stroke">#000000</CssParameter> | ||
<CssParameter name="stroke-width">2</CssParameter> | ||
</Stroke> | ||
</Mark> | ||
<Size>6</Size> | ||
</Graphic> | ||
</PointSymbolizer> | ||
</Rule> | ||
</FeatureTypeStyle> | ||
</UserStyle> | ||
</NamedLayer> | ||
</StyledLayerDescriptor> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const pointSimplePoint: Style = { | ||
'name': 'Simple Point Filter', | ||
'rules': [{ | ||
'filter': [ | ||
'*=', | ||
['FN_strMatches', 'year', /^( )??2019,.*/], | ||
true | ||
], | ||
'name': 'Small populated New Yorks', | ||
'scaleDenominator': { | ||
'max': 20000, | ||
'min': 10000 | ||
}, | ||
'symbolizers': [{ | ||
'kind': 'Mark', | ||
'wellKnownName': 'Circle', | ||
'color': '#FF0000', | ||
'radius': 3, | ||
'strokeColor': '#000000', | ||
'strokeWidth': 2 | ||
}] | ||
}] | ||
}; | ||
|
||
export default pointSimplePoint; |
Oops, something went wrong.