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

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

Serving Software Downloads in 956 Categories, Downloaded 50.067.538 Times

Geo::ShapeFile 2.51

  Date Added: September 02, 2010  |  Visits: 2.487

Geo::ShapeFile

Report Broken Link
Printer Friendly Version


Product Homepage
Download (147 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  -  Audio::File::Type 0.10
Audio::File::Type represents an audio filetype. An instance of an object inherited from Audio::File::Type is returned by the constructor of Audio::File. This object currently provides access to the audio files information like its audio...
74.75 KB  
Desktop Utilities  -  File type determination 0.9
File type determination is a little KDE Service Menu that calls the GNU file command to retrieve Mime information from files, and presents it inside a standard KDE dialog..
 
Libraries  -  File::Type::Builder 0.22
File::Type::Builder is Perl module to parse mime-magic and generate code. SYNOPSIS my $build = File::Type::Builder->new(); while ( ) { chomp; my $parsed = $build->parse_magic($_); my $code = $build->string_start($parsed); (or...
153.6 KB  
Communication Tools  -  File Type Checker 1.0
File Type Checker checks the file data to determine the actual file type. As of this writing filetypechecker supports doc, rtf, xls, pdf, jpg, jpeg, and gif. more file support will be added soon.
47.05 KB  
Utilities  -  What's This File Type 1.4
Tells you what a file is, and what program created it. All you have to do is right-click on the file, and select 'Bloody Hell! What's this File Type?' (other text available if you're sensitive). If you have a file extension and you have no idea...
414 KB  
Multimedia & Graphics  -  Thuban for Windows 1.2.2
Thuban is an interactive geographic data viewer (GIS viewer) which features methods to visualize, explore, and analyze geographic information. Thuban is an Interactive Geographic Data Viewer with the following features: # Vector Data...
11.22 MB  
Multimedia & Graphics  -  Thuban for Linux 1.2.2
Thuban is an interactive geographic data viewer (GIS viewer) which features methods to visualize, explore, and analyze geographic information. Thuban is an Interactive Geographic Data Viewer with the following features: # Vector Data...
1.18 MB  
Libraries  -  File::MMagic 1.27
File::MMagic is a Perl module to guess file type. SYNOPSIS use File::MMagic; use FileHandle; $mm = new File::MMagic; # use internal magic file # $mm = File::MMagic->new(/etc/magic); # use external magic file # $mm =...
21.5 KB  
Networking  -  Exclude File Type Requests 1.0
If you use the pretty permalinks feature of WordPress, any request that doesn't match to a file on the server will be passed to WordPress for handling. This results in 404 hits having more load on your server than a traditional 404 request. In...
10 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  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
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