original_docstring: 
      'Cleans' the vertices of a polygon, so that it has rounded coordinates.
      Attention: MULTIPOLYGON is not yet implemented!
      Parameters
      ----------
      geometry : OGRGeometry
          a polygon geometry
      decimals : int
          optional. rounding precision. default is 0.
  
      Returns
      -------
      geometry_out : OGRGeometry
          a polygon geometry with rounded vertices
      
docstring: 'Cleans' the vertices of a polygon, so that it has rounded coordinates.
  Attention: MULTIPOLYGON is not yet implemented.
  Parameters
  
  geometry : OGRGeometry
  a polygon geometry
  decimals : int
  optional. rounding precision. default is 0.
  
  Returns
  
  geometry_out : OGRGeometry
  a polygon geometry with rounded vertices
docstring_tokens: ' Cleans ' the vertices of a polygon so that it has rounded coordinates . Attention : MULTIPOLYGON is not yet implemented . Parameters geometry : OGRGeometry a polygon geometry decimals : int optional . rounding precision . default is 0 . Returns geometry_out : OGRGeometry a polygon geometry with rounded vertices
code: def round_vertices_of_polygon(geometry, decimals=0):
      """
      'Cleans' the vertices of a polygon, so that it has rounded coordinates.
      Attention: MULTIPOLYGON is not yet implemented!
      Parameters
      ----------
      geometry : OGRGeometry
          a polygon geometry
      decimals : int
          optional. rounding precision. default is 0.
  
      Returns
      -------
      geometry_out : OGRGeometry
          a polygon geometry with rounded vertices
      """
  
      ring = geometry.GetGeometryRef(0)
  
      rounded_ring = ogr.Geometry(ogr.wkbLinearRing)
  
      n_points = ring.GetPointCount()
  
      for p in range(n_points):
          lon, lat, z = ring.GetPoint(p)
          rlon, rlat, rz = [np.round(lon, decimals=decimals),
                            np.round(lat, decimals=decimals),
                            np.round(z, decimals=decimals)]
          rounded_ring.AddPoint(rlon, rlat, rz)
  
      geometry_out = ogr.Geometry(ogr.wkbPolygon)
      geometry_out.AddGeometry(rounded_ring)
  
      return geometry_out
code_tokens: def round_vertices_of_polygon ( geometry , decimals = 0 ) : ring = geometry . GetGeometryRef ( 0 ) rounded_ring = ogr . Geometry ( ogr . wkbLinearRing ) n_points = ring . GetPointCount ( ) for p in range ( n_points ) : lon , lat , z = ring . GetPoint ( p ) rlon , rlat , rz = [ np . round ( lon , decimals = decimals ) , np . round ( lat , decimals = decimals ) , np . round ( z , decimals = decimals ) ] rounded_ring . AddPoint ( rlon , rlat , rz ) geometry_out = ogr . Geometry ( ogr . wkbPolygon ) geometry_out . AddGeometry ( rounded_ring ) return geometry_out
short_docstring: 'Cleans' the vertices of a polygon, so that it has rounded coordinates.
short_docstring_tokens: ' Cleans ' the vertices of a polygon so that it has rounded coordinates .
comment: """
      'Cleans' the vertices of a polygon, so that it has rounded coordinates.
      Attention: MULTIPOLYGON is not yet implemented!
      Parameters
      ----------
      geometry : OGRGeometry
          a polygon geometry
      decimals : int
          optional. rounding precision. default is 0.
  
      Returns
      -------
      geometry_out : OGRGeometry
          a polygon geometry with rounded vertices
      """