gnome.utilities.shapefile_builder

Shapefile Builder

Module Contents

Classes

ShapefileBuilder

param filename:

Full path and basename of the shape file.

ParticleShapefileBuilder

param filename:

Full path and basename of the shape file.

BoundaryShapefileBuilder

param filename:

Full path and basename of the shape file.

ContourShapefileBuilder

param filename:

Full path and basename of the shape file.

Functions

area_in_meters(this_hull)

class gnome.utilities.shapefile_builder.ShapefileBuilder(filename, zip_output=True, **kwargs)

Bases: object

Parameters:
  • filename – Full path and basename of the shape file.

  • zip – If we should zip the final shapefile results.

property filename
append(sc)
write()

Actually write out the shapefile as .shp or .zip

class gnome.utilities.shapefile_builder.ParticleShapefileBuilder(filename, zip_output=True, **kwargs)

Bases: ShapefileBuilder

Parameters:
  • filename – Full path and basename of the shape file.

  • zip – If we should zip the final shapefile results.

append(sc)

Given a spill container, write out the current particle data to a data frame

write()

Actually write out the shapefile as .shp or .zip

gnome.utilities.shapefile_builder.area_in_meters(this_hull)
class gnome.utilities.shapefile_builder.BoundaryShapefileBuilder(filename, zip_output=True, **kwargs)

Bases: ShapefileBuilder

Parameters:
  • filename – Full path and basename of the shape file.

  • zip – If we should zip the final shapefile results.

append(sc, separate_by_spill=True, hull_ratio=0.5, hull_allow_holes=False)

Given a spill container, write out the current boundary data to a data frame

write()

Actually write out the shapefile as .shp or .zip

class gnome.utilities.shapefile_builder.ContourShapefileBuilder(filename, zip_output=True, **kwargs)

Bases: ShapefileBuilder

Parameters:
  • filename – Full path and basename of the shape file.

  • zip – If we should zip the final shapefile results.

append(sc, cutoff_struct=None, hull_ratio=0.5, hull_allow_holes=False)

Given a spill container, write out the contours based on the cutoffs provided

write()

Actually write out the shapefile as .shp or .zip