set_width($int)
set_decimals($int)
set_uri($str)
set_title($str)
set_description($str)
set_publisher($str)
set_language($str)
set_stylesheet($str)
add_point(\%args)
render($path)
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
new(\%args)
Inherits from XML::SAX::Base, so constructor arguments are the same.
set_width($int)
Required
set_decimals($int)
Required
set_uri($str)
Set the URI used to identify the document in RDF metadata section.
Default is '#'
set_title($str)
Set the title for the document's RDF metadata section.
set_description($str)
Set the description for the document's RDF metadata section.
set_publisher($str)
Set the publisher for the document's RDF metadata section.
set_language($str)
Set the language for the document's RDF metadata section.
set_stylesheet($str)
Set the URI for the document's CSS stylesheet.
add_point(\%args)
Points are added as SVG circle elements.
Valid arguments are :
Required
Required
Default is '1'
render($path)
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.