| Geo-ReadGRIB documentation | view source | Contained in the Geo-ReadGRIB distribution. |
Geo::ReadGRIB::Place - Contains the value of a one or more data type at a given time and geographic location.
This documentation refers to Geo::ReadGRIB::Place version 1.0 as returned by a call to Geo::ReadGRIB::PlaceIterator::Current()
use Geo::ReadGRIB;
$w = new Geo::ReadGRIB "grib-file";
$w->getFullCatalog;
print $w->show,"\n";
$plit = $w->extractLaLo(data_type, lat1, long1, lat2, long2, time);
die $w->getError if $w->getError;
# $plit is a Geo::ReadGRIB::PlaceIterator
while ( $place = $plit->current() and $plit->next ) {
# $place is a Geo::ReadGRIB::Place object
$time = $place->thisTime;
$latitude = $place->lat;
$longitude = $place->long;
$data_types = $place->types; # an array ref of type names
$data = $place->data( data_type );
# process data...
}
Objects of this class are returned by the current() method of a PlaceIterator object which itself has been returned by the extractLaLo() or extract() methods of a Geo::ReadGRIB object. A place object has a unique latitude and longitude for one time and has data for one or more data types.
Objects of this class are read only and all parameters may be accessed by the following methods.
There are no known bugs in this module. Please report problems through
http://rt.cpan.org
or contact Frank Cox, <frank.l.cox@gmail.com> Patches are welcome.
Frank Cox, <frank.l.cox@gmail.com>
Copyright (C) 2009 by Frank Cox
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
| Geo-ReadGRIB documentation | view source | Contained in the Geo-ReadGRIB distribution. |