<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1452540696656_13462"><span>Thank you Mike.<br>I have no doubt this code will be useful to somebody looking for a Perl solution.<br><br>Kind regards,<br>Djordje</span></div><br><div id="yui_3_16_0_1_1452540696656_13401" class="qtdSeparateBR"><br></div><div style="display: block;" id="yui_3_16_0_1_1452540696656_13393" class="yahoo_quoted">  <div id="yui_3_16_0_1_1452540696656_13392" style="font-family: verdana, helvetica, sans-serif; font-size: 13px;"> <div id="yui_3_16_0_1_1452540696656_13391" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1452540696656_13390" dir="ltr"> <font id="yui_3_16_0_1_1452540696656_13590" size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Mike Flannigan <mikeflan@att.net><br> <b><span style="font-weight: bold;">To:</span></b> issworld2000@yahoo.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, January 12, 2016 1:26 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [gdal-dev] Reading the points from shp file<br> </font> </div> <div id="yui_3_16_0_1_1452540696656_13598" class="y_msg_container"><br><br>It appears not, but I paste the synopsis below<br>for your review.  Feel free to post to the list<br>if you want to.<br><br><br>Mike<br><br><br><br>=head1 NAME<br><br>Geo::ShapeFile - Perl extension for handling ESRI GIS Shapefiles.<br><br>=head1 SYNOPSIS<br><br>   use Geo::ShapeFile;<br><br>   my $shapefile = new Geo::ShapeFile("roads");<br><br>   for(1 .. $shapefile->shapes()) {<br>     my $shape = $shapefile->get_shp_record($_);<br>     # see Geo::ShapeFile::Shape docs for what to do with $shape<br><br>     my %db = $shapefile->get_dbf_record($_);<br>   }<br><br>=head1 ABSTRACT<br><br>The Geo::ShapeFile module reads ESRI ShapeFiles containing GIS mapping<br>data, it has support for shp (shape), shx (shape index), and dbf (data<br>base) formats.<br><br>=head1 DESCRIPTION<br><br>The Geo::ShapeFile module reads ESRI ShapeFiles containing GIS mapping<br>data, it has support for shp (shape), shx (shape index), and dbf (data<br>base) formats.<br><br>=head1 METHODS<br><br>=over 4<br><br>=item new($filename_base)<br><br>Creates a new shapefile object, the only argument it takes is the basename<br>for your data (don't include the extension, the module will automatically<br>find the extensions it supports).  For example if you have data files called<br>roads.shp, roads.shx, and roads.dbf, use 'new Geo::ShapeFile("roads");' to<br>create a new object, and the module will load the data it needs from the<br>files as it needs it.<br><br>=item type_is($numeric_type)<br><br>Returns true if the major type of this data file is the same as the type<br>passed to type_is().<br><br>=item get_dbf_record($record_index)<br><br>Returns the data from the dbf file associated with the specified record <br>index<br>(shapefile indexes start at 1).  If called in a list context, returns a <br>hash,<br>if called in a scalar context, returns a hashref.<br><br>=item x_min() x_max() y_min() y_max()<br><br>=item m_min() m_max() z_min() z_max()<br><br>Returns the minimum and maximum values for x, y, z, and m fields as <br>indicated<br>in the shp file header.<br><br>=item upper_left_corner() upper_right_corner()<br><br>=item lower_left_corner() lower_right_corner()<br><br>Returns a Geo::ShapeFile::Point object indicating the respective corners.<br><br>=item height() width()<br><br>Returns the height and width of the area contained in the shp file. Note <br>that<br>this likely does not return miles, kilometers, or any other useful <br>measure, it<br>simply returns x_max - x_min, or y_max - y_min.  Whether this data is a <br>useful<br>measure or not depends on your data.<br><br>=item corners()<br><br>Returns a four element array consisting of the corners of the area contained<br>in the shp file.  The corners are listed clockwise starting with the upper<br>left.<br>(upper_left_corner, upper_right_corner, lower_right_corner, <br>lower_left_corner)<br><br>=item area_contains_point($point,$x_min,$y_min,$x_max,$y_max)<br><br>Utility function that returns true if the Geo::ShapeFile::Point object in<br>point falls within the bounds of the rectangle defined by the area<br>indicated.  See bounds_contains_point() if you want to check if a point <br>falls<br>within the bounds of the current shp file.<br><br>=item bounds_contains_point($point)<br><br>Returns true if the specified point falls within the bounds of the current<br>shp file.<br><br>=item file_version()<br><br>Returns the ShapeFile version number of the current shp/shx file.<br><br>=item shape_type()<br><br>Returns the shape type contained in the current shp/shx file.  The ESRI spec<br>currently allows for a file to contain only a single type of shape (null<br>shapes are the exception, they may appear in any data file).  This returns<br>the numeric value for the type, use type() to find the text name of this<br>value.<br><br>=item shapes()<br><br>Returns the number of shapes contained in the current shp/shx file. This is<br>the value that allows you to iterate through all the shapes using<br>'for(1 .. $obj->shapes()) {'.<br><br>=item records()<br><br>Returns the number of records contained in the current data.  This is <br>similar<br>to shapes(), but can be used even if you don't have shp/shx files, so <br>you can<br>access data that is stored as dbf, but does not have shapes associated <br>with it.<br><br>=item shape_type_text()<br><br>Returns the shape type of the current shp/shx file (see shape_type()), but<br>as the human-readable string type, rather than an integer.<br><br>=item get_shx_record($record_index)<br>=item get_shx_record_header($record_index)<br><br>Get the contents of an shx record or record header (for compatibility with<br>the other get_* functions, both are provided, but in the case of shx data,<br>they return the same information).  The return value is a two element array<br>consisting of the offset in the shp file where the indicated record begins,<br>and the content length of that record.<br><br>=item get_shp_record_header($record_index)<br><br>Retrieve an shp record header for the specified index.  Returns a two <br>element<br>array consisting of the record number and the content length of the record.<br><br>=item get_shp_record($record_index)<br><br>Retrieve an shp record for the specified index.  Returns a<br>Geo::ShapeFile::Shape object.<br><br>=item shapes_in_area($x_min,$y_min,$x_max,$y_max)<br><br>Returns an array of integers, consisting of the indices of the shapes that<br>overlap with the area specified.  Currently this is a very oversimplified<br>function that actually finds shapes that have any point that falls within<br>the specified bounding box.  Currently it may miss some shapes that actually<br>do overlap with the specified area, if there are two points outside the area<br>that cause an edge to pass through the area, but neither of the end points<br>of that edge actually fall within the area specified.  Patches to make this<br>function more useful would be welcome.<br><br>=item <br>check_in_area($x1_min,$y1_min,$x1_max,$y1_max,$x2_min,$x2_max,$y2_min,$y2_max)<br><br>Returns true if the two specified areas overlap.<br><br>=item bounds()<br><br>Returns the bounds for the current shp file.<br>(x_min, y_min, x_max, y_max)<br><br>=item shx_handle() shp_handle() dbf_handle()<br><br>Returns the file handles associated with the respective data files.<br><br>=item type($shape_type_number)<br><br>Returns the name of the type associated with the given type id number.<br><br>=item find_bounds(@shapes)<br><br>Takes an array of Geo::ShapeFile::Shape objects, and returns a hash, with<br>keys of x_min,y_min,x_max,y_max, with the values for each of those ranges.<br><br>=back<br><br>=head1 REPORTING BUGS<br><br>Please send any bugs, suggestions, or feature requests to<br>   E<lt><a ymailto="mailto:geo-shapefile-bugs@jasonkohles.comE" href="mailto:geo-shapefile-bugs@jasonkohles.comE">geo-shapefile-bugs@jasonkohles.comE</a><gt>.<br><br>=head1 SEE ALSO<br><br>Geo::ShapeFile::Shape<br>Geo::ShapeFile::Point<br><br>=head1 AUTHOR<br><br>Jason Kohles, E<lt><a ymailto="mailto:email@jasonkohles.comE" href="mailto:email@jasonkohles.comE">email@jasonkohles.comE</a><gt><br><br>=head1 COPYRIGHT AND LICENSE<br><br>Copyright 2002,2003 by Jason Kohles<br><br>This library is free software; you can redistribute it and/or modify<br>it under the same terms as Perl itself.<br><br>=cut<br><br><br><br><br>On 1/11/2016 7:54 AM, <a ymailto="mailto:gdal-dev-request@lists.osgeo.org" href="mailto:gdal-dev-request@lists.osgeo.org">gdal-dev-request@lists.osgeo.org</a> wrote:<br>> Date: Mon, 11 Jan 2016 10:11:06 +0000 (UTC)<br>> From: Djordje Spasic<<a ymailto="mailto:issworld2000@yahoo.com" href="mailto:issworld2000@yahoo.com">issworld2000@yahoo.com</a>><br>> To: Mike Flannigan<<a ymailto="mailto:mikeflan@att.net" href="mailto:mikeflan@att.net">mikeflan@att.net</a>>,"<a ymailto="mailto:gdal-dev@lists.osgeo.org" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>"<br>>     <<a ymailto="mailto:gdal-dev@lists.osgeo.org" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>><br>> Subject: Re: [gdal-dev] Reading the points from shp file<br>> Message-ID:<br>>     <<a ymailto="mailto:1670137557.3284629.1452507066766.JavaMail.yahoo@mail.yahoo.com" href="mailto:1670137557.3284629.1452507066766.JavaMail.yahoo@mail.yahoo.com">1670137557.3284629.1452507066766.JavaMail.yahoo@mail.yahoo.com</a>><br>> Content-Type: text/plain; charset="utf-8"<br>><br>> Thank you for the reply Mr. Flannigan,<br>><br>> Sadly I have no knowledge of Perl.<br>> If its "Geo::ShapeFile" module uses the same C# GDAL bindings (or is based on them), then I might try to take a look at your Perl code.<br>> If not, then I guess I can not make use of it.<br>><br>> I respect the intention to help, though.<br>><br>> Kind regards,<br>> Djordje Spasic<br><br><br><br></div> </div> </div>  </div></div></body></html>