parameters: (path, kml, color = simplekml.Color.white)
docstring: Add one JSON frame bounding box to the KML object
docstring_summary: Add one JSON frame bounding box to the KML object
docstring_tokens: Add one JSON frame bounding box to the KML object
function: def addJsonFileToKml(path, kml, color = simplekml.Color.white):
      '''Add one JSON frame bounding box to the KML object'''
  
      with open(path, 'r') as f:
          contents = f.read()
      parts  = json.loads(contents)
      coords = parts['geometry']['coordinates'][0]
      pol = kml.newpolygon(name=os.path.basename(path),
                           outerboundaryis=coords)
      pol.style.linestyle.color = color
      pol.style.linestyle.width = 5
      pol.style.polystyle.fill  = 0
function_tokens: def addJsonFileToKml ( path , kml , color = simplekml . Color . white ) : with open ( path , 'r' ) as f : contents = f . read ( ) parts = json . loads ( contents ) coords = parts [ 'geometry' ] [ 'coordinates' ] [ 0 ] pol = kml . newpolygon ( name = os . path . basename ( path ) , outerboundaryis = coords ) pol . style . linestyle . color = color pol . style . linestyle . width = 5 pol . style . polystyle . fill = 0