|
NAMEGeo::ShapeFile::Shape - Geo::ShapeFile utility class.SYNOPSISuse Geo::ShapeFile::Shape::Index; my $index = Geo::ShapeFile::Shape->new; # $pt1 and $pt2 are point objects in this example. my $segment = [$pt1, $pt2]; # example of something to pack into the index. my @bbox = ($x_min, $y_min, $x_max, $y_max); $index->insert($segment, @bbox); ABSTRACTThis is a utility class for L<Geo::ShapeFile> that indexes shape objects. DESCRIPTIONThis is a 2-d block-based index class for Geo::ShapeFile::Shape objects. It probably has more generic applications, of course.It uses a flat 2-d structure comprising a series of blocks of full width which slice the shape along the y-axis (it should really also use blocks along the x axis). The index coordinates are simply the number of blocks across and up from the minimum coordinate specified in the new() call. These are stoed as strings jpoined by a colon, so 0:0 is the lower left. Negative block coordinates can occur if data are added which fall outside the speficied bounds. This should not affect the index, though, as it is merely a relative offset. It is used internally by Geo::ShapeFile::Shape, so look there for examples. The method names are adapted from Tree::R to make transition easier during development, albeit the argument have morphed so it is not a drop-in replacement. EXPORTNone by default.METHODS
REPORTING BUGSPlease send any bugs, suggestions, or feature requests to <https://github.com/shawnlaffan/Geo-ShapeFile/issues>.SEE ALSOGeo::ShapeFile::ShapeAUTHORShawn Laffan, <shawnlaffan@gmail.com>COPYRIGHT AND LICENSECopyright 2014 by Shawn LaffanThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |