forked from neo4j-contrib/spatial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackground.rb
executable file
·32 lines (23 loc) · 902 Bytes
/
background.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env ruby
# This script uses the amanzi-sld DSL to create a sample SLD file
# for styling a number of layers in a typical OSM data model.
# This example should work with a layer containing all geometries.
# useful if being run inside a source code checkout
$: << 'lib'
$: << '../lib'
$: << '../amanzi-sld/lib'
#require 'rubygems'
require 'amanzi/sld'
Amanzi::SLD::Config.config[:geometry_property] = 'the_geom'
#Amanzi::SLD::Config.config[:verbose] = true
sld = Amanzi::SLD::Document.new "Example Neo4j Spatial OSM Style"
sld.comment "A catch-all style for all ways, drawn first so it only shows if anyther style does not apply"
sld.add_line_symbolizer(:stroke => '#444444')
sld.comment "A catch-all style for all Polygons"
sld.add_polygon_symbolizer(
:fill => '#444444',
:fill_opacity => '0.4',
:stroke => '#444444',
:geometry => 'Polygon'
)
puts sld.to_xml(:tab => ' ')