Permalink
Browse files

Merge pull request #3 from tomkralidis/master

fix imports in documentation
  • Loading branch information...
2 parents 39011b3 + 34039e8 commit 5d51c0a9c9292a016ca58cfbe7e9b5488fbc6c64 David Zwarg committed Oct 4, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 README.markdown
View
@@ -27,12 +27,12 @@ Usage
Using python-sld to create SLD documents is as easy as instantiating a
StyledLayerDescriptor class object.
- import sld
+ from sld import StyledLayerDescriptor
mysld = StyledLayerDescriptor()
You may also read an existing SLD document in by passing it as a parameter:
- import sld
+ from sld import StyledLayerDescriptor
mysld = StyledLayerDescriptor('mysld.sld')
Addition of most elements are performed on the parent element, since they are
@@ -46,6 +46,7 @@ CssParameters. They are properties of their parent classes (FeatureTypeStyle
and Fill/Stroke/Font respectively). They behave as python lists, and you
can access any of their items using a python list pattern:
+ fts = ustyle.create_featuretypestyle()
rule1 = fts.Rules[0]
print len(fts.Rules)
fts.Rules[0] = rule1
@@ -54,6 +55,8 @@ Filter objects are pythonic, and when combined with the '+' operator, they
become ogc:And filters. When combined with the '|' operator, they become
ogc:Or filters.
+ from sld import Filter
+
filter_1 = Filter(rule)
# set filter 1 properties

0 comments on commit 5d51c0a

Please sign in to comment.