poets.shape package

Submodules

poets.shape.shapes module

exception poets.shape.shapes.FipsError[source]

Bases: exceptions.Exception

class poets.shape.shapes.Shape(code, shapefile=None)[source]

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

Table Of Contents

Previous topic

poets.io package

Next topic

poets.timedate package

This Page