示例#1
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   eg = self.factory.createExternalGraphic(self.url, self.format)
   g = util.graphic(sym)
   g.setMarks([])
   if g:
     g.graphicalSymbols().add(eg)
示例#2
0
 def __init__(self, property, font=None, color=None):
   Symbolizer.__init__(self)
   self.property = Property(property)
   self.color = Color(color) if color else None
   self._font = Font(font) if font else None
   self._halo = None
   self._placement = None
示例#3
0
  def __init__(self, url, format=None):
    Symbolizer.__init__(self)
    self.url = toURL(url)

    if not format:
      format = mimetypes.guess_type(url)[0]
    
    self.format = format
示例#4
0
 def __init__(self, color=None, size=6, type='circle', opacity=1.0, rotation=0):
   Symbolizer.__init__(self)
   self.color = Color(color) if color else None
   self.size = Expression(size)
   self.type = type
   self.opacity = Expression(opacity)
   self.rotation = Expression(rotation)
   self._stroke = None
示例#5
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   g = util.graphic(sym)
   g.setSize(self.size.expr)
   if self.rotation != None and self.rotation.expr != None:
       g.setRotation(self.rotation.expr)
   g.graphicalSymbols().clear()
   g.graphicalSymbols().add(self._mark())
示例#6
0
 def __init__(self, color='#000000', width=1, dash=None, cap=None, join=None):
   Symbolizer.__init__(self)
   self.color = Color(color)
   self.width = Expression(width)
   self.dash = dash
   self.cap = Expression(cap) if cap else None
   self.join = Expression(join) if join else None
   self._hatch = None
示例#7
0
文件: icon.py 项目: ecor/geoscript-py
    def __init__(self, url, format=None, size=None):
        Symbolizer.__init__(self)
        self.url = toURL(url)

        if not format:
            format = mimetypes.guess_type(url)[0]

        self.format = format
        self.size = Expression(size) if size else None
示例#8
0
文件: icon.py 项目: ecor/geoscript-py
 def _apply(self, sym):
     Symbolizer._apply(self, sym)
     eg = self.factory.createExternalGraphic(self.url, self.format)
     g = util.graphic(sym)
     if self.size:
         g.size = self.size.expr
     g.setMarks([])
     if g:
         g.graphicalSymbols().add(eg)
示例#9
0
  def __init__(self, name, stroke=None, size=None):
    Symbolizer.__init__(self)
    self.name = name
    if not stroke:
      from geoscript.style.stroke import Stroke
      stroke = Stroke()

    self.stroke = stroke 
    self.size = Expression(size if size else 8)
示例#10
0
 def __init__(self, fill=None, radius=1):
   Symbolizer.__init__(self)
   if fill:
     if not isinstance(fill, Fill):
       fill = Fill(Color(fill))
   else:
     fill = Fill('#ffffff')
   self.fill = fill
   self.radius = Expression(radius)
示例#11
0
    def __init__(self, name, stroke=None, size=None):
        Symbolizer.__init__(self)
        self.name = name
        if not stroke:
            from geoscript.style.stroke import Stroke
            stroke = Stroke()

        self.stroke = stroke
        self.size = Expression(size if size else 8)
示例#12
0
文件: icon.py 项目: bakk/geoscript-py
  def __init__(self, url, format=None, size=None):
    Symbolizer.__init__(self)
    self.url = toURL(url)

    if not format:
      format = mimetypes.guess_type(url)[0]

    self.format = format
    self.size = Expression(size) if size else None
示例#13
0
 def __init__(self, property, font=None, color=None, priority=None, 
              options=None):
   Symbolizer.__init__(self)
   self.property = Property(property)
   self.color = Color(color) if color else None
   self.priority = Property(priority) if priority else None
   self.options = options if options else {}
   self._font = Font(font) if font else None
   self._halo = None
   self._icon = None
   self._placement = None
示例#14
0
文件: font.py 项目: bakk/geoscript-py
  def __init__(self, font=None, style='normal', weight='normal', size=10, 
               family='serif'):
    Symbolizer.__init__(self)
    
    self.style = style
    self.weight = weight
    self.size = size
    self.family = family

    if font:
      self._parse(font)
示例#15
0
  def _apply(self, sym):
    Symbolizer._apply(self, sym)
    sym.setLabel(self.property.expr)

    if self._font:
      self._font._apply(sym)
    if self._halo:
      self._halo._apply(sym)

    if self.color:
      sym.setFill(Fill(self.color)._fill())

    if self._placement:
      sym.setLabelPlacement(self._placement)
示例#16
0
 def __init__(self,
              property,
              font=None,
              color=None,
              priority=None,
              options=None):
     Symbolizer.__init__(self)
     self.property = Property(property)
     self.color = Color(color) if color else None
     self.priority = Property(priority) if priority else None
     self.options = options if options else {}
     self._font = Font(font) if font else None
     self._halo = None
     self._icon = None
     self._placement = None
示例#17
0
    def __init__(self,
                 font=None,
                 style='normal',
                 weight='normal',
                 size=10,
                 family='serif'):
        Symbolizer.__init__(self)

        self.style = style
        self.weight = weight
        self.size = size
        self.family = family

        if font:
            self._parse(font)
示例#18
0
 def __init__(self,
              color='#000000',
              width=1,
              dash=None,
              cap=None,
              join=None,
              opacity=1.0):
     Symbolizer.__init__(self)
     self.color = Color(color)
     self.width = Expression(width)
     self.opacity = Expression(opacity)
     self.dash = dash
     self.cap = Expression(cap) if cap else None
     self.join = Expression(join) if join else None
     self._hatch = None
     self._icon = None
示例#19
0
  def _apply(self, sym):
    Symbolizer._apply(self, sym)
    sym.setLabel(self.property.expr)

    if self._font:
      self._font._apply(sym)
    if self._halo:
      self._halo._apply(sym)
    if self._icon:
      self._icon._apply(sym)

    if self.color:
      sym.setFill(Fill(self.color)._fill())

    if self.priority:
      sym.setPriority(self.priority.expr)

    if self._placement:
      sym.setLabelPlacement(self._placement)
    else:
      sym.setLabelPlacement(None)
示例#20
0
    def _apply(self, sym):
        Symbolizer._apply(self, sym)
        sym.setLabel(self.property.expr)

        if self._font:
            self._font._apply(sym)
        if self._halo:
            self._halo._apply(sym)
        if self._icon:
            self._icon._apply(sym)

        if self.color:
            sym.setFill(Fill(self.color)._fill())

        if self.priority:
            sym.setPriority(self.priority.expr)

        if self._placement:
            sym.setLabelPlacement(self._placement)
        else:
            sym.setLabelPlacement(None)
示例#21
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   sym.setFill(self._fill())
   
   if self._icon:
     self._icon._apply(sym)
示例#22
0
 def __init__(self, color=None, opacity=1.0):
   Symbolizer.__init__(self)
   self.color = Color(color) if color else None
   self.opacity = Expression(opacity)
   self._icon = None
   self._hatch = None
示例#23
0
    def _apply(self, sym):
        Symbolizer._apply(self, sym)
        sym.setFill(self._fill())

        if self._icon:
            self._icon._apply(sym)
示例#24
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   sym.setColorMap(self._colormap())  
示例#25
0
 def __init__(self, *parts):
     Symbolizer.__init__(self)
     self.parts = parts
示例#26
0
 def __init__(self, value=1.0):
     Symbolizer.__init__(self)
     self.value = Expression(value)
示例#27
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   sym.setOpacity(self.value.expr)
示例#28
0
 def __init__(self, value=1.0):
   Symbolizer.__init__(self)
   self.value = Expression(value)
示例#29
0
 def __init__(self, fn):
     Symbolizer.__init__(self)
     self.function = Function(fn)
示例#30
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   g = util.graphic(sym)
   g.setSize(self.size.expr)
   g.graphicalSymbols().clear()
   g.graphicalSymbols().add(self._mark())
示例#31
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   sym.setStroke(self._stroke())
示例#32
0
 def __init__(self, fn):
   Symbolizer.__init__(self)
   self.function = Function(fn)
示例#33
0
 def _apply(self, sym):
     Symbolizer._apply(self, sym)
     sym.setOpacity(self.value.expr)
示例#34
0
  def _apply(self, sym):
    Symbolizer._apply(self, sym)
    sym.setStroke(self._stroke())

    if self._icon:
      self._icon._apply(sym)
示例#35
0
    def _apply(self, sym):
        Symbolizer._apply(self, sym)
        sym.setStroke(self._stroke())

        if self._icon:
            self._icon._apply(sym)
示例#36
0
 def _apply(self, sym):
   Symbolizer._apply(self, sym)
   h = self.factory.createHalo(self.fill._fill(), self.radius.expr)
   sym.setHalo(h)
示例#37
0
 def __init__(self, values, interpolate='ramp'):
   Symbolizer.__init__(self)
   self.values = values
   self.interpolate = interpolate
示例#38
0
 def _apply(self, sym):
     Symbolizer._apply(self, sym)
     sym.setColorMap(self._colormap())
示例#39
0
 def __init__(self, values, interpolate='ramp'):
     Symbolizer.__init__(self)
     self.values = values
     self.interpolate = interpolate
示例#40
0
 def __init__(self, color=None, opacity=1.0):
     Symbolizer.__init__(self)
     self.color = Color(color) if color else None
     self.opacity = Expression(opacity)
     self._icon = None
     self._hatch = None
示例#41
0
 def __init__(self, *parts):
   Symbolizer.__init__(self)
   self.parts = parts
示例#42
0
 def __init__(self, color=None, size=6, type='circle'):
   Symbolizer.__init__(self)
   self.color = Color(color) if color else None
   self.size = Expression(size)
   self.type = type