Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.546.608 Times

Geo::ShapeFile 2.51

  Date Added: September 02, 2010  |  Visits: 1.754

Geo::ShapeFile

Report Broken Link
Printer Friendly Version


Product Homepage
Download (126 downloads)



Geo::ShapeFile is a Perl extension for handling ESRI GIS Shapefiles. SYNOPSIS use Geo::ShapeFile; my $shapefile = new Geo::ShapeFile("roads"); for(1 .. $shapefile->shapes()) { my $shape = $shapefile->get_shp_record($_); # see Geo::ShapeFile::Shape docs for what to do with $shape my %db = $shapefile->get_dbf_record($_); } ABSTRACT The Geo::ShapeFile module reads ESRI ShapeFiles containing GIS mapping data, it has support for shp (shape), shx (shape index), and dbf (data base) formats. The Geo::ShapeFile module reads ESRI ShapeFiles containing GIS mapping data, it has support for shp (shape), shx (shape index), and dbf (data base) formats. METHODS new($filename_base) Creates a new shapefile object, the only argument it takes is the basename for your data (dont include the extension, the module will automatically find the extensions it supports). For example if you have data files called roads.shp, roads.shx, and roads.dbf, use new Geo::ShapeFile("roads"); to create a new object, and the module will load the data it needs from the files as it needs it. type_is($numeric_type) Returns true if the major type of this data file is the same as the type passed to type_is(). get_dbf_record($record_index) Returns the data from the dbf file associated with the specified record index (shapefile indexes start at 1). If called in a list context, returns a hash, if called in a scalar context, returns a hashref. x_min() x_max() y_min() y_max() m_min() m_max() z_min() z_max() Returns the minimum and maximum values for x, y, z, and m fields as indicated in the shp file header. upper_left_corner() upper_right_corner() lower_left_corner() lower_right_corner() Returns a Geo::ShapeFile::Point object indicating the respective corners. height() width() Returns the height and width of the area contained in the shp file. Note that this likely does not return miles, kilometers, or any other useful measure, it simply returns x_max - x_min, or y_max - y_min. Whether this data is a useful measure or not depends on your data. corners() Returns a four element array consisting of the corners of the area contained in the shp file. The corners are listed clockwise starting with the upper left. (upper_left_corner, upper_right_corner, lower_right_corner, lower_left_corner) area_contains_point($point,$x_min,$y_min,$x_max,$y_max) Utility function that returns true if the Geo::ShapeFile::Point object in point falls within the bounds of the rectangle defined by the area indicated. See bounds_contains_point() if you want to check if a point falls within the bounds of the current shp file. bounds_contains_point($point) Returns true if the specified point falls within the bounds of the current shp file. file_version() Returns the ShapeFile version number of the current shp/shx file. shape_type() Returns the shape type contained in the current shp/shx file. The ESRI spec currently allows for a file to contain only a single type of shape (null shapes are the exception, they may appear in any data file). This returns the numeric value for the type, use type() to find the text name of this value. shapes() Returns the number of shapes contained in the current shp/shx file. This is the value that allows you to iterate through all the shapes using for(1 .. $obj->shapes()) {. records() Returns the number of records contained in the current data. This is similar to shapes(), but can be used even if you dont have shp/shx files, so you can access data that is stored as dbf, but does not have shapes associated with it. shape_type_text() Returns the shape type of the current shp/shx file (see shape_type()), but as the human-readable string type, rather than an integer. get_shx_record($record_index) =item get_shx_record_header($record_index) Get the contents of an shx record or record header (for compatibility with the other get_* functions, both are provided, but in the case of shx data, they return the same information). The return value is a two element array consisting of the offset in the shp file where the indicated record begins, and the content length of that record. get_shp_record_header($record_index) Retrieve an shp record header for the specified index. Returns a two element array consisting of the record number and the content length of the record. get_shp_record($record_index) Retrieve an shp record for the specified index. Returns a Geo::ShapeFile::Shape object. shapes_in_area($x_min,$y_min,$x_max,$y_max) Returns an array of integers, consisting of the indices of the shapes that overlap with the area specified. Currently this is a very oversimplified function that actually finds shapes that have any point that falls within the specified bounding box. Currently it may miss some shapes that actually do overlap with the specified area, if there are two points outside the area that cause an edge to pass through the area, but neither of the end points of that edge actually fall within the area specified. Patches to make this function more useful would be welcome. check_in_area($x1_min,$y1_min,$x1_max,$y1_max,$x2_min,$x2_max,$y2_min,$y2_max) Returns true if the two specified areas overlap. bounds() Returns the bounds for the current shp file. (x_min, y_min, x_max, y_max) shx_handle() shp_handle() dbf_handle() Returns the file handles associated with the respective data files. type($shape_type_number) Returns the name of the type associated with the given type id number. find_bounds(@shapes) Takes an array of Geo::ShapeFile::Shape objects, and returns a hash, with keys of x_min,y_min,x_max,y_max, with the values for each of those ranges..

Requirements: No special requirements
Platforms: Linux
Keyword: Data Esri Gis Esri Gis Shapefiles File Geoshapefile Libraries Programming Record Returns Shapefile Shp Shp File Type
Users rating: 0/10

License: Freeware Size: 276.48 KB
USER REVIEWS
More Reviews or Write Review


GEO::SHAPEFILE RELATED
Libraries  -  XML::TiePYX 0.05
XML::TiePYX is a Perl module to read or write XML data in PYX format via tied filehandle SYNOPSIS use XML::TiePYX; tie *XML,XML::TiePYX,file.xml open IN,file.xml or die $!; tie *XML,XML::TiePYX,*IN,Condense=>0; my $text=< tag...
7.17 KB  
Libraries  -  Movie::Info 0.1
SYNOPSIS my $mi = Movie::Info->new || die "Couldnt find an mplayer to usen"; foreach my $file (@ARGV) { my %info = $mi->info($file) || warn "Couldnt read info from $filen" && next; print "$file (WxH) - $info{width}x$info{height}n"; }...
19.46 KB  
Libraries  -  File::Sort 1.01
File::Sort is a Perl module to sort a file or merge sort multiple files. SYNOPSIS use File::Sort qw(sort_file); sort_file({ I => [qw(file_1 file_2)], o => file_new, k => 5.3,5.5rn, -t => | }); sort_file(file1, file1.sorted); This...
32.77 KB  
Libraries  -  File::Save::Home 0.08
File::Save::Home is a Perl module to place file safely under user home directory. SYNOPSIS use File::Save::Home qw( get_home_directory get_subhome_directory_status make_subhome_directory restore_subhome_directory_status...
18.43 KB  
Libraries  -  Bio::SAGE::Comparison 1.00
Bio::SAGE::Comparison module compares data from serial analysis of gene expression (SAGE) libraries. SYNOPSIS use Bio::SAGE::Comparison; $sage = Bio::SAGE::Comparison->new(); This module provides several tools for comparing data generated...
8.19 KB  
Book Collection Managers  -  Free Change File Data 1.6.1
ee Change File Data is a free tool that helps you change the date and time for any file. The files in the computer always have a date stamp attached to it, showing the date and time the files were created. You can change the file data and time...
2.44 MB  
Libraries  -  FLV::Header 0.03
FLV::Header is a flash video file data structure. METHODS This is a subclass of FLV::Base. $self->parse($fileinst) Takes a FLV::File instance and extracts the FLV header from the file stream. This method throws exceptions if the stream is...
737.28 KB  
Libraries  -  FLV::Body 0.03
FLV::Body is a flash video file data structure. METHODS This is a subclass of FLV::Base. $self->parse($fileinst) Takes a FLV::File instance and extracts the FLV body from the file stream. This method throws exceptions if the stream is not...
737.28 KB  
Libraries  -  FLV::Tag 0.03
FLV::Tag is a flash video file data structure. This is a subclass of FLV::Base. $self->parse($fileinst) Takes a FLV::File instance and extracts an FLV tag from the file stream. This method then multiplexes that tag into one of the subtypes:...
737.28 KB  
Utilities  -  MyGlendale, CA 1.7.3
Use myGlendale to inform City staff of any problems (e.g. potholes and graffiti) you encounter. Take a photo and well do the rest! Mapping API provided by Esri ArcGIS API for iOS. Map Data Copyright: 2009 ESRI, i-cubed, GeoEye....
15.1 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB