Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Sep 4, 2012
1 parent a255e77 commit e31940c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.markdown
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Usage
Using python-sld to create SLD documents is as easy as instantiating a Using python-sld to create SLD documents is as easy as instantiating a
StyledLayerDescriptor class object. StyledLayerDescriptor class object.


import sld from sld import StyledLayerDescriptor
mysld = StyledLayerDescriptor() mysld = StyledLayerDescriptor()


You may also read an existing SLD document in by passing it as a parameter: 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') mysld = StyledLayerDescriptor('mysld.sld')


Addition of most elements are performed on the parent element, since they are Addition of most elements are performed on the parent element, since they are
Expand All @@ -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 and Fill/Stroke/Font respectively). They behave as python lists, and you
can access any of their items using a python list pattern: can access any of their items using a python list pattern:


# FIXME: where does the fts var come from?
rule1 = fts.Rules[0] rule1 = fts.Rules[0]
print len(fts.Rules) print len(fts.Rules)
fts.Rules[0] = rule1 fts.Rules[0] = rule1
Expand All @@ -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 become ogc:And filters. When combined with the '|' operator, they become
ogc:Or filters. ogc:Or filters.


from sld import Filter

filter_1 = Filter(rule) filter_1 = Filter(rule)
# set filter 1 properties # set filter 1 properties


Expand Down

0 comments on commit e31940c

Please sign in to comment.