Geo::GD::Image - Perl extension to draw Well Known Binary (WKB) blobs directly into a GD::Image
use Geo::GD::Image; my $img = Geo::GD::Image->newTrueColor(); # same as GD::Image # set up colors etc $img->draw_wkb( $wkb_blob, $gd_color, $offsetx, $offsety, $ratiox, $ratioy);
Geo::GD::Image is a subclass of GD::Image and currently only adds 2 methods. You should read GD
$img->draw_wkb($wkb_blob, $gd_color, $offsetx, $offsety, $ratiox, $ratioy);
Draw a well known binary shape into the image. Polygons are inserted as filled polygons, linestrings are inserted as open polygons or lines and points are inserted as single pixels.
Combined types (multipolygon, multilinestring and geometrycolection) are also supported.
Arguments: $wkb_blob: a Well Know Binary string, $gd_color: a GD color number.
$offsetx, $offsety, $ratiox, $ratioy are used to calculate pixel coordinates (0,0 = top-left) from WKB coordinates:
$pixelx = $ratiox * ( $wkb_x - $offsetx ) $pixely = $ratioy * ( $wkb_y - $offsetx )
my $alpha = $img->alpha($gd_color);
Get the alpha channel value of a gd color. The method should arguably be part of GD.
GD.
OpenGIS® Implementation Specification for Geographic information - Simple feature access - Part 2: SQL option: http://www.opengeospatial.org/standards/sfs
Joost Diepenmaat, Zeekat Softwareontwikkeling. http://zeekat.nl/ - joost@zeekat.nl
joost@zeekat.nl
Copyright 2006, Toutatis Internet Publishing Software. All rights reserved. http://toutatis.com/
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See the "Artistic License" in the Perl source code distribution for licensing terms.
Portions of the WKB parsing code have been taken from mapserver, Copyright (c) 1996-2005 Regents of the University of Minnesota.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'OpenGIS®'. Assuming UTF-8
To install Geo::GD::Image, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::GD::Image
CPAN shell
perl -MCPAN -e shell install Geo::GD::Image
For more information on module installation, please visit the detailed CPAN module installation guide.