The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME SVG::Shapefile

SYNOPSIS

        my $shp = SVG::Shapefile->new( %options );
        $shp->render('filename.svg');

METHODS

new( %args )

new() takes the following arguments:

ShapeFile

Path to the ESRI shapefile to parse. The .shx and .dbf components should be in the same directory.

PolygonID

If defined, the name of the column from the .dbf component that should be used as the identifier for each polygon. If undefined, the ID is borrowed directly from the shapefile.

DataFile

The XBase (DBF), Excel, or CSV file to read data values from.

DataTable

If DataFile is an Excel spreadsheet, the name of the worksheet to read data values from.

KeyColumn

The column from DataFile containing the polygon IDs.

ValueColumn

The column from DataFile containing the values to be mapped.

Scale

A constant multiplier applied to all vertices in the ShapeFile. Used to scale up ShapeFile coordinates to something displayable in SVG. Defaults to 1,000,000 if not specified.

Colors

A list of two lists, each containing an [R, G, B] triplet. The first triplet is the RGB color assigned to the minimum data value, the second triplet is the color assigned to the maximum.