class_docstr: A geometry type representing an area that is enclosed by a linear ring.
  
  A polygon is a two-dimensional feature and has a non-zero area. It may
  have one or more negative-space "holes" which are also bounded by linear
  rings. If any rings cross each other, the feature is invalid and
  operations on it may fail.
  
  Parameters
  ----------
  shell : sequence
      A sequence of (x, y [,z]) numeric coordinate pairs or triples, or
      an array-like with shape (N, 2) or (N, 3).
      Also can be a sequence of Point objects.
  holes : sequence
      A sequence of objects which satisfy the same requirements as the
      shell parameters above
  
  Attributes
  ----------
  exterior : LinearRing
      The ring which bounds the positive space of the polygon.
  interiors : sequence
      A sequence of rings which bound all existing holes.
  
  Examples
  --------
  Create a square polygon with no holes
  
  >>> coords = ((0., 0.), (0., 1.), (1., 1.), (1., 0.), (0., 0.))
  >>> polygon = Polygon(coords)
  >>> polygon.area
  1.0
class_docstr_tok: ["A","geometry","type","representing","an","area","that","is","enclosed","by","a","linear","ring",".","A","polygon","is","a","two-dimensional","feature","and","has","a","non-zero","area",".","It","may","have","one","or","more","negative-space","``","holes","''","which","are","also","bounded","by","linear","rings",".","If","any","rings","cross","each","other",",","the","feature","is","invalid","and","operations","on","it","may","fail",".","Parameters","--","--","--","--","--","shell",":","sequence","A","sequence","of","(","x",",","y","[",",","z","]",")","numeric","coordinate","pairs","or","triples",",","or","an","array-like","with","shape","(","N",",","2",")","or","(","N",",","3",")",".","Also","can","be","a","sequence","of","Point","objects",".","holes",":","sequence","A","sequence","of","objects","which","satisfy","the","same","requirements","as","the","shell","parameters","above","Attributes","--","--","--","--","--","exterior",":","LinearRing","The","ring","which","bounds","the","positive","space","of","the","polygon",".","interiors",":","sequence","A","sequence","of","rings","which","bound","all","existing","holes",".","Examples","--","--","--","--","Create","a","square","polygon","with","no","holes",">",">",">","coords","=","(","(","0.",",","0",".",")",",","(","0.",",","1",".",")",",","(","1.",",","1",".",")",",","(","1.",",","0",".",")",",","(","0.",",","0",".",")",")",">",">",">","polygon","=","Polygon","(","coords",")",">",">",">","polygon.area","1.0"]
docstr: Returns SVG path element for the Polygon geometry.
  
  Parameters
  ==========
  scale_factor : float
      Multiplication factor for the SVG stroke-width.  Default is 1.
  fill_color : str, optional
      Hex string for fill color. Default is to use "#66cc99" if
      geometry is valid, and "#ff3333" if invalid.
  opacity : float
      Float number between 0 and 1 for color opacity. Default value is 0.6
docstr_tok: ["Returns","SVG","path","element","for","the","Polygon","geometry",".","Parameters","==========","scale_factor",":","float","Multiplication","factor","for","the","SVG","stroke-width",".","Default","is","1.","fill_color",":","str",",","optional","Hex","string","for","fill","color",".","Default","is","to","use","``","#","66cc99","''","if","geometry","is","valid",",","and","``","#","ff3333","''","if","invalid",".","opacity",":","float","Float","number","between","0","and","1","for","color","opacity",".","Default","value","is","0.6"]
code: def svg(self, scale_factor=1.0, fill_color=None, opacity=None):
      """Returns SVG path element for the Polygon geometry.
  
      Parameters
      ==========
      scale_factor : float
          Multiplication factor for the SVG stroke-width.  Default is 1.
      fill_color : str, optional
          Hex string for fill color. Default is to use "#66cc99" if
          geometry is valid, and "#ff3333" if invalid.
      opacity : float
          Float number between 0 and 1 for color opacity. Default value is 0.6
      """
      if self.is_empty:
          return "<g />"
      if fill_color is None:
          fill_color = "#66cc99" if self.is_valid else "#ff3333"
      if opacity is None:
          opacity = 0.6
      exterior_coords = [
          ["{},{}".format(*c) for c in self.exterior.coords]
      ]
      interior_coords = [
          ["{},{}".format(*c) for c in interior.coords]
          for interior in self.interiors
      ]
      path = " ".join(
          [
              "M {} L {} z".format(coords[0], " L ".join(coords[1:]))
              for coords in exterior_coords + interior_coords
          ]
      )
      return (
          '<path fill-rule="evenodd" fill="{2}" stroke="#555555" '
          'stroke-width="{0}" opacity="{3}" d="{1}" />'
      ).format(2.0 * scale_factor, path, fill_color, opacity)
  
imports: import numpy
  import shapely
  from shapely.algorithms.cga import is_ccw_impl, signed_area
  from shapely.errors import TopologicalError
  from shapely.geometry.base import BaseGeometry
  from shapely.geometry.linestring import LineString
  from shapely.geometry.point import Point
label_desc: Use image node_id 8 for calling the Polygon obj's underlying member method code with example usage: obj.svg(scale_factor, fill_color, opacity) and returns: str, str