
XML::Generator::SVG::ShapeFile - Generate SAX2 events for an SVG rendering of an ESRI shapefile.

use PerlIO::gzip;
use XML::SAX::Writer;
use XML::Generator::SVG::ShapeFile;
# see CAVEATS below
open SVGZ, ">:gzip", "/path/to/my/output.svgz"
|| die "do the right thing, luke";
my $writer = XML::SAX::Writer->new(Output => \*SVGZ);
my $svg = XML::Generator::SVG::ShapeFile->new(Handler=>$writer);
$svg->set_width(1024);
$svg->set_decimals(1);
$svg->set_title("You are here");
$svg->set_stylesheet("foo.css");
$svg->add_point({lat=>"123",long=>"456"});
$svg->render("/path/to/shapefile");

Generate SAX2 events for an SVG rendering of an ESRI shapefile.

Depending on your input data, this package may generate huge SVG files if left uncompressed.

+ svg
+ metadata
+ rdf:Description [@rdf:about = '...']
~ dc:title
~ dc:description
~ dc:publisher
~ dc:language
- dc:date
- dc:format
+ g [@id = 'map']
- rect [@id = 'canvas']
- path (+)
~ g [@id = 'locations']
+ g [@id = '...'] (+)
- title
-circle

Inherits from XML::SAX::Base, so constructor arguments are the same.

Required
Required
Set the URI used to identify the document in RDF metadata section.
Default is '#'
Set the title for the document's RDF metadata section.
Set the description for the document's RDF metadata section.
Set the publisher for the document's RDF metadata section.
Set the language for the document's RDF metadata section.
Set the URI for the document's CSS stylesheet.
Points are added as SVG circle elements.
Valid arguments are :
The latitude, in decimal form, of the point you are adding.
Required
The longitude, in decimal form, of the point you are adding.
Required
Default is 'id-<lat>-<long>', where decimal points are replaced by '-'
A label for the point you are adding.
The radius of the point you are adding.
Default is '1'
CSS stylings specific to the point you are adding.
Generate SAX2/SVG events for an ESRI shapefile.

0.2

$Date: 2004/08/21 04:13:28 $

Aaron Straup Cope <ascope@cpan.org>

http://www.webmapper.net/svg/create/
(these are the nice people who did most of the hard work for this package)

Copyright (c) 2004 Aaron Straup Cope. All rights reserved.
This is free software, you may use it and distribute it under the same terms as Perl itself.