Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
12,239 additions
and
0 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,22 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
/browser | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
|
||
index.html |
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,11 @@ | ||
language: node_js | ||
node_js: | ||
- "10" | ||
- "12" | ||
script: | ||
- npm run test -- --coverage | ||
cache: | ||
directories: | ||
- node_modules | ||
after_script: | ||
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls |
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,34 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Jest Tests", | ||
"type": "node", | ||
"request": "launch", | ||
"port": 9230, | ||
"runtimeArgs": [ | ||
"--inspect-brk=9230", | ||
"${workspaceRoot}/node_modules/.bin/jest", | ||
"--runInBand", | ||
"--watch" | ||
], | ||
"runtimeExecutable": null, | ||
"console": "integratedTerminal" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Debug Jest Tests Windows", | ||
"program": "${workspaceRoot}/node_modules/jest/bin/jest", | ||
"args": [ | ||
"-i", | ||
"--watch" | ||
], | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"console": "integratedTerminal", | ||
"outFiles": [ | ||
"${workspaceRoot}/build/dist/**/*" | ||
] | ||
} | ||
] | ||
} |
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,12 @@ | ||
module.exports = { | ||
"presets": [ | ||
["@babel/env", { | ||
"useBuiltIns": "usage" | ||
}], | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
"@babel/proposal-class-properties", | ||
"@babel/proposal-object-rest-spread" | ||
] | ||
}; |
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,34 @@ | ||
const TerserPlugin = require('terser-webpack-plugin'); | ||
const path = require('path'); | ||
module.exports = { | ||
entry: ['@babel/polyfill', './src/GeoCSSStyleParser.ts'], | ||
mode: 'production', | ||
output: { | ||
filename: 'geoCSSStyleParser.js', | ||
path:path.join(__dirname, 'browser'), | ||
library: 'GeoStylerGeoCSSParser' | ||
}, | ||
resolve: { | ||
// Add '.ts' as resolvable extensions. | ||
extensions: ['.ts', '.js', '.json'] | ||
}, | ||
optimization: { | ||
minimizer: [ | ||
new TerserPlugin() | ||
] | ||
}, | ||
module: { | ||
rules: [ | ||
// All files with a '.ts' | ||
{ | ||
test: /\.ts$/, | ||
include: path.join(__dirname, 'src'), | ||
use: [ | ||
{ | ||
loader: require.resolve('ts-loader'), | ||
}, | ||
], | ||
} | ||
] | ||
} | ||
}; |
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,14 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Line with symbol'; | ||
|
||
* { | ||
stroke: symbol('circle'); | ||
stroke-width: 3; | ||
stroke-dasharray: 13 37; | ||
stroke-linecap: round; | ||
stroke-linejoin: miter; | ||
:stroke { | ||
fill: #FF0000; | ||
size: 7; | ||
} | ||
} |
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,12 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Line with external graphic'; | ||
|
||
* { | ||
stroke: url('http://geoserver.org/img/geoserver-logo.png'); | ||
stroke-rotation: 90; | ||
stroke-size: 10; | ||
stroke-width: 3; | ||
stroke-dasharray: 13 37; | ||
stroke-linecap: round; | ||
stroke-linejoin: miter; | ||
} |
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,11 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Line with offset'; | ||
|
||
* { | ||
stroke: #000000; | ||
stroke-width: 3; | ||
stroke-dasharray: 13 37; | ||
stroke-linecap: round; | ||
stroke-linejoin: miter; | ||
stroke-offset: 3; | ||
} |
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,11 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Simple line'; | ||
|
||
* { | ||
stroke: #000000; | ||
stroke-width: 3; | ||
stroke-dasharray: 13 37; | ||
stroke-linecap: round; | ||
stroke-linejoin: miter; | ||
stroke-dashoffset: 10; | ||
} |
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,15 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Simple line with label'; | ||
|
||
* { | ||
stroke: #000000; | ||
stroke-width: 3; | ||
stroke-dasharray: 13 37; | ||
label: [name]; | ||
label-offset: 0 5; | ||
font-family: 'Arial'; | ||
font-fill: #000000; | ||
font-size: 12; | ||
font-style: normal; | ||
font-weight: bold; | ||
} |
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,8 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'External graphic'; | ||
|
||
* { | ||
mark: url('http://geoserver.org/img/geoserver-logo.png'); | ||
mark-size: 10; | ||
mark-rotation: 90; | ||
} |
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,21 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Simple Point Filter'; | ||
|
||
/* @title Small populated New Yorks */ | ||
[NAME = 'New York'] | ||
[TEST_BOOL = true] | ||
[TEST is null] | ||
[TEST2 like '*York*'] | ||
[TEST1 like '*New*'] | ||
[POPULATION <= 100000] | ||
[TEST2 = '1' or TEST2 = '2'] | ||
[@sd > 10000][@sd < 20000] { | ||
mark: symbol('circle'); | ||
:mark { | ||
fill: #FF0000; | ||
stroke: #000000; | ||
stroke-width: 2; | ||
size: 6; | ||
}; | ||
} | ||
|
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,12 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Polygon Graphic Fill'; | ||
|
||
* { | ||
stroke: #FFFFFF; | ||
stroke-width: 2; | ||
stroke-dasharray: 1 0; | ||
fill: symbol('circle'); | ||
:fill { | ||
fill: #FF0000; | ||
}; | ||
} |
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,11 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Transparent Polygon'; | ||
|
||
* { | ||
fill: #000080; | ||
fill-opacity: 0.5; | ||
stroke: #FFFFFF; | ||
stroke-width: 2; | ||
stroke-opacity: 0.9; | ||
stroke-dasharray: 1 0; | ||
} |
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,12 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Raster auto channel'; | ||
|
||
/* @title Raster style */ | ||
* { | ||
raster-channels: auto; | ||
raster-contrast-enhancement: normalize; | ||
raster-gamma: 0.5; | ||
raster-opacity: 0.5; | ||
raster-color-map-type: intervals; | ||
raster-color-map: color-map-entry(#00ffff, 64, 0.4, 'label1') color-map-entry(#ff00ff, 256, 0.8, 'label2'); | ||
} |
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,12 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Raster gray channel'; | ||
|
||
/* @title Raster style */ | ||
* { | ||
raster-channels: 0; | ||
raster-contrast-enhancement: normalize; | ||
raster-gamma: 0.5; | ||
raster-opacity: 0.5; | ||
raster-color-map-type: intervals; | ||
raster-color-map: color-map-entry(#00ffff, 64, 0.4, 'label1') color-map-entry(#ff00ff, 256, 0.8, 'label2'); | ||
} |
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,12 @@ | ||
@mode 'Flat'; | ||
@styleTitle 'Raster rgb channels'; | ||
|
||
/* @title Raster style */ | ||
* { | ||
raster-channels: 0 1 2; | ||
raster-contrast-enhancement: histogram histogram histogram; | ||
raster-gamma: 0.5 0.5 0.5; | ||
raster-opacity: 0.5; | ||
raster-color-map-type: ramp; | ||
raster-color-map: color-map-entry(#00ffff, 64, 0.4, 'label1') color-map-entry(#ff00ff, 256, 0.8, 'label2'); | ||
} |
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,23 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const lineSimpleLine: Style = { | ||
name: 'Line with symbol', | ||
rules: [{ | ||
name: '', | ||
symbolizers: [{ | ||
kind: 'Line', | ||
width: 3, | ||
dasharray: [13, 37], | ||
cap: 'round', | ||
join: 'miter', | ||
graphicStroke: { | ||
kind: 'Mark', | ||
wellKnownName: 'Circle', | ||
color: '#FF0000', | ||
radius: 3.5 | ||
} | ||
}] | ||
}] | ||
}; | ||
|
||
export default lineSimpleLine; |
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,23 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const lineSimpleLine: Style = { | ||
name: 'Line with external graphic', | ||
rules: [{ | ||
name: '', | ||
symbolizers: [{ | ||
kind: 'Line', | ||
width: 3, | ||
dasharray: [13, 37], | ||
cap: 'round', | ||
join: 'miter', | ||
graphicStroke: { | ||
kind: 'Icon', | ||
image: 'http://geoserver.org/img/geoserver-logo.png', | ||
size: 10, | ||
rotate: 90 | ||
} | ||
}] | ||
}] | ||
}; | ||
|
||
export default lineSimpleLine; |
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,19 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const lineSimpleLine: Style = { | ||
name: 'Line with offset', | ||
rules: [{ | ||
name: '', | ||
symbolizers: [{ | ||
kind: 'Line', | ||
color: '#000000', | ||
width: 3, | ||
dasharray: [13, 37], | ||
cap: 'round', | ||
join: 'miter', | ||
perpendicularOffset: 3 | ||
}] | ||
}] | ||
}; | ||
|
||
export default lineSimpleLine; |
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,19 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const lineSimpleLine: Style = { | ||
name: 'Simple line', | ||
rules: [{ | ||
name: '', | ||
symbolizers: [{ | ||
kind: 'Line', | ||
color: '#000000', | ||
width: 3, | ||
dasharray: [13, 37], | ||
cap: 'round', | ||
join: 'miter', | ||
dashOffset: 10 | ||
}] | ||
}] | ||
}; | ||
|
||
export default lineSimpleLine; |
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,25 @@ | ||
import { Style } from 'geostyler-style'; | ||
|
||
const multiSimplelineLabel: Style = { | ||
name: 'Simple line with label', | ||
rules: [{ | ||
name: '', | ||
symbolizers: [{ | ||
kind: 'Line', | ||
color: '#000000', | ||
width: 3, | ||
dasharray: [13, 37] | ||
}, { | ||
kind: 'Text', | ||
color: '#000000', | ||
label: '{{name}}', | ||
font: ['Arial'], | ||
size: 12, | ||
offset: [0, 5], | ||
fontStyle: 'normal', | ||
fontWeight: 'bold' | ||
}] | ||
}] | ||
}; | ||
|
||
export default multiSimplelineLabel; |
Oops, something went wrong.