poets.shape package — poets 0.1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- poets 0.1.0 documentation »
- poets package »

# poets.shape package

## Submodules

## poets.shape.shapes module

exception `poets.shape.shapes.` `FipsError`

  Bases: `exceptions.Exception`

class `poets.shape.shapes.` `Shape`(code, shapefile=None)

  Bases: `object`

  Provides geography information of a region/country given as shapefile.

  Parameters: | code : str Identifier of the records in the shapefile; uses the first argument returned by shapefile.Reader as identifier, for the default shapefile, this would be the FIPS country code. shapefile : str, optional Path to shape file, uses “world country admin boundary shapefile” by default.

  Attributes

  code | (str) Identifier of the selected record in the shapefile; uses the first argument returned by shapefile.Reader as identifier, for the default shapefile, this would be the FIPS country code.
  name | (str) Name of the selected record in the shapefile; uses the second argument returned by shapefile.Reader as identifier, for the default shapefile, this would be the FIPS country code.
  shpfile | (str) Path to the source shapefile.
  bbox | (tuple) Bounding box of the country.
  polygon | (list of tuples) Country boundary polygon.

## Module contents

### Navigation

- index
- modules |
- next |
- previous |
- poets 0.1.0 documentation »
- poets package »