<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-2044555433406398156.comments</id><updated>2012-05-07T10:19:04.712-05:00</updated><category term='raster'/><category term='install'/><category term='point'/><category term='.prj'/><category term='web'/><category term='pip'/><category term='mask'/><category term='conversion'/><category term='subset'/><category term='mapnik'/><category term='gdal'/><category term='shx'/><category term='density'/><category term='delete'/><category term='dissolve'/><category term='python'/><category term='elevation'/><category term='rasterize'/><category term='projection'/><category term='z'/><category term='image'/><category term='prj'/><category term='pyshp'/><category term='merge'/><category term='ogr'/><category term='sbx'/><category term='polygon'/><category term='shapefile'/><category term='lidar'/><category term='convert'/><category term='python3'/><category term='gis'/><category term='streams'/><category term='mapping'/><category term='ray casting'/><category term='sbet'/><category term='geometry'/><category term='newspapers'/><category term='edit'/><category term='geospatial'/><category term='python3000'/><category term='remote sensing'/><category term='spatial'/><category term='clip'/><category term='pypi'/><category term='index'/><category term='zipcodes'/><category term='sbn'/><category term='shapetype'/><category term='journalism'/><category term='zip'/><title type='text'>GeospatialPython.com</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://geospatialpython.com/feeds/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/comments/default'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/comments/default?start-index=26&amp;max-results=25'/><author><name>Joel Lawhead, PMP</name><uri>http://www.blogger.com/profile/02508246012088522732</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp2.blogger.com/_SBi37QEsCvg/SGxdublfkLI/AAAAAAAAABA/BcsG6UI814g/S220/lawhead_joel.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>92</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-4208370076120163921</id><published>2012-05-07T10:19:04.712-05:00</published><updated>2012-05-07T10:19:04.712-05:00</updated><title type='text'>Can you advise as to how to convert the GPS time o...</title><content type='html'>Can you advise as to how to convert the GPS time of week to a complete time structure like SYSTEMTIME?  Seems like the GPS week number would be needed for this but it does not seem to be recorded.  Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/3308804207482840780/comments/default/4208370076120163921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/3308804207482840780/comments/default/4208370076120163921'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/08/smoothed-best-estimate-of-trajectory.html?showComment=1336403944712#c4208370076120163921' title=''/><link rel='related' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/3308804207482840780/comments/default/3091084578047089686'/><author><name>sonar</name><uri>http://www.blogger.com/profile/09246886495115557432</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/08/smoothed-best-estimate-of-trajectory.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-3308804207482840780' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/3308804207482840780' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1641564493'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='May 7, 2012 10:19 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-2095242040594125618</id><published>2012-05-03T12:10:42.426-05:00</published><updated>2012-05-03T12:10:42.426-05:00</updated><title type='text'>There is a standard method that works every time.
...</title><content type='html'>There is a standard method that works every time.&lt;br /&gt;&lt;br /&gt;You the visual studio solution downloadable from http://www.inferentialpower.com/Bio/Ing/ObjectParser/.&lt;br /&gt;&lt;br /&gt;It contains an &amp;quot;InPolygon&amp;quot; method written in C#.&lt;br /&gt;&lt;br /&gt;The solution also contains an &amp;quot;Imprint&amp;quot; method for imprinting polygons onto bitmaps.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/2095242040594125618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/2095242040594125618'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/01/point-in-polygon.html?showComment=1336065042426#c2095242040594125618' title=''/><author><name>David Ing</name><uri>http://www.blogger.com/profile/02412043685055845045</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-TXKgBxF6zmc/AAAAAAAAAAI/AAAAAAAAAAA/-EH7NsdX2CM/s512-c/photo.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/01/point-in-polygon.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8764472954672783495' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8764472954672783495' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1883060428'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='May 3, 2012 12:10 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-8321539679623605188</id><published>2012-04-13T10:53:36.504-05:00</published><updated>2012-04-13T10:53:36.504-05:00</updated><title type='text'>bluejp - Sorry for the slow reply. That is really ...</title><content type='html'>bluejp - Sorry for the slow reply. That is really weird.  What platform are you on?  When you call Editor.save() you are calling the Writer.save() method which explicitly closes all file handles. &lt;br /&gt;&lt;br /&gt;All the Editor class does is wrap the Reader and Writer classes so you don&amp;#39;t have to explicitly create separate reader and writer objects to change a shapefile.  But of course you can do that manually.  You just create a reader and a writer and copy everything into the writer and make changes, then save over the old file.  There are several posts where I do this.&lt;br /&gt;&lt;br /&gt;Also - the Editor is not as well tested so people continually find bugs but it&amp;#39;s slowly getting better.  The Reader and Writer classes are pretty solid and should work.  I have examples of this technique in the following posts:&lt;br /&gt;http://geospatialpython.com/2011/02/merging-lots-of-shapefiles-quickly.html&lt;br /&gt;&lt;br /&gt;http://geospatialpython.com/2010/12/subsetting-shapefile-by-attributes.html&lt;br /&gt;&lt;br /&gt;I would try that and see if you get the same results.  If you&amp;#39;re using it in a web application it could be some web server behavior. But I really don&amp;#39;t know.  Let me know what you figure out and I&amp;#39;ll see if I can help troubleshoot.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/8321539679623605188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/8321539679623605188'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html?showComment=1334332416504#c8321539679623605188' title=''/><author><name>Joel Lawhead</name><uri>http://www.blogger.com/profile/15645953215148786163</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-476214723910872880' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/476214723910872880' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-539885453'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='April 13, 2012 10:53 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-8363479053123419812</id><published>2012-04-11T11:53:37.103-05:00</published><updated>2012-04-11T11:53:37.103-05:00</updated><title type='text'>This is great write-up. I want to find it out so I...</title><content type='html'>This is great write-up. I want to find it out so I&amp;#39;m looking to download it to the link you gave. Thanks. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sybiz.com/" rel="nofollow"&gt;Accounting Packages&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/5593683204237103196/comments/default/8363479053123419812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/5593683204237103196/comments/default/8363479053123419812'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/02/create-prj-projection-file-for.html?showComment=1334163217103#c8363479053123419812' title=''/><author><name>Kim Mckinley</name><uri>http://www.blogger.com/profile/16279477511227266192</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/02/create-prj-projection-file-for.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-5593683204237103196' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/5593683204237103196' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1292168327'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='April 11, 2012 11:53 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-7156955911657498064</id><published>2012-04-10T11:01:05.804-05:00</published><updated>2012-04-10T11:01:05.804-05:00</updated><title type='text'>Joel... great job you have done here. Question.. w...</title><content type='html'>Joel... great job you have done here. Question.. when working with the Editor... is there any function to close the editing operations. I experience that the Editor &amp;quot;locks&amp;quot; the files, even after closing python. Any suggestions?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/7156955911657498064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/7156955911657498064'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html?showComment=1334073665804#c7156955911657498064' title=''/><author><name>bluejp</name><uri>http://www.blogger.com/profile/07221864259489687571</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/7771/1297/1024/20731405.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-476214723910872880' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/476214723910872880' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2043967196'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='April 10, 2012 11:01 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-8371571747260138437</id><published>2012-03-22T05:05:56.920-05:00</published><updated>2012-03-22T05:05:56.920-05:00</updated><title type='text'>I would like to use the code to clip a 1-band rast...</title><content type='html'>I would like to use the code to clip a 1-band raster file based on a multi-features polygon shapefile, but some errors are happening, like:&lt;br /&gt;&lt;br /&gt;clip = srcArray[:, ulY:lrY, ulX:lrX]&lt;br /&gt;IndexError: too many indices</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/8371571747260138437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/8371571747260138437'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html?showComment=1332410756920#c8371571747260138437' title=''/><author><name>Anusha</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-1452000444369575492' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/1452000444369575492' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-256384869'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 22, 2012 5:05 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-7449779906873626152</id><published>2012-03-14T14:56:25.122-05:00</published><updated>2012-03-14T14:56:25.122-05:00</updated><title type='text'>VeeAnn - I&amp;#39;m looking into this issue.  It may ...</title><content type='html'>VeeAnn - I&amp;#39;m looking into this issue.  It may be a bug.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/7449779906873626152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/7449779906873626152'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html?showComment=1331754985122#c7449779906873626152' title=''/><link rel='related' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/7787182176182987279'/><author><name>Joel Lawhead, PMP</name><uri>http://www.blogger.com/profile/02508246012088522732</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp2.blogger.com/_SBi37QEsCvg/SGxdublfkLI/AAAAAAAAABA/BcsG6UI814g/S220/lawhead_joel.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-476214723910872880' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/476214723910872880' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1164118447'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 14, 2012 2:56 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-3457034241709889030</id><published>2012-03-14T13:37:32.536-05:00</published><updated>2012-03-14T13:37:32.536-05:00</updated><title type='text'>I would also like to know if this is possible.</title><content type='html'>I would also like to know if this is possible.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1430969532808834750/comments/default/3457034241709889030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1430969532808834750/comments/default/3457034241709889030'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/02/changing-shapefiles-type.html?showComment=1331750252536#c3457034241709889030' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/02/changing-shapefiles-type.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-1430969532808834750' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/1430969532808834750' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1529562095'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 14, 2012 1:37 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-7787182176182987279</id><published>2012-03-09T10:13:41.721-06:00</published><updated>2012-03-09T10:13:41.721-06:00</updated><title type='text'>I created what appears to be a polylineM shapefile...</title><content type='html'>I created what appears to be a polylineM shapefile. It doesn&amp;#39;t seem quite right in that none of the measurements seem to have gone over, but nonetheless, I can open with Esri and it thinks it&amp;#39;s a polylineM. However, I can&amp;#39;t seem to read the records using this method. So my problem is two-fold. I need a legitimate polylineM and I need to be able to read it. I&amp;#39;m sure I&amp;#39;m doing something wrong, but would appreciate any assistance.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/7787182176182987279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/7787182176182987279'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html?showComment=1331309621721#c7787182176182987279' title=''/><author><name>VeeAnn</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-476214723910872880' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/476214723910872880' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-556641576'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 9, 2012 10:13 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-4168089748001492541</id><published>2012-03-03T09:46:42.995-06:00</published><updated>2012-03-03T09:46:42.995-06:00</updated><title type='text'>I think I have the second algorithm figured out. I...</title><content type='html'>I think I have the second algorithm figured out. I can successfully bin my 3000 test shapefiles (randomly generated with fixed extents). I&amp;#39;m still getting some random misbins on the World Cities shapefile but I think these are due to minor errors in implementation.&lt;br /&gt;&lt;br /&gt;In a nutshell, the algorithm examines a bin and checks to see if its grandchildren contain features. If not, it pulls up any features from its child nodes.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/4168089748001492541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/4168089748001492541'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html?showComment=1330789602995#c4168089748001492541' title=''/><author><name>Marc Pfister</name><uri>http://www.blogger.com/profile/12564297701953453805</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8156621053984327020' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8156621053984327020' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1995901437'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 3, 2012 9:46 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-2460156620881065475</id><published>2012-03-02T09:14:58.934-06:00</published><updated>2012-03-02T09:14:58.934-06:00</updated><title type='text'>Francisco,

Yes, that is basically the definition ...</title><content type='html'>Francisco,&lt;br /&gt;&lt;br /&gt;Yes, that is basically the definition of binary division and we have been using it for a while. You can see it in &lt;a href="http://flic.kr/p/auJNSg" rel="nofollow"&gt; this photo&lt;/a&gt; which shows the 1 integer unit seams between cells.&lt;br /&gt;&lt;br /&gt;However, if you test enough shapefiles with it you will start to find a small percentage of seam features do not end up where you expect them to be. Typically, they will be one to two levels higher in the tree. There appears to be a second (in the sense of additional, not different) algorithm that is run on the seam features, probably for some sort of optimization.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/2460156620881065475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/2460156620881065475'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html?showComment=1330701298934#c2460156620881065475' title=''/><author><name>Marc Pfister</name><uri>http://www.blogger.com/profile/12564297701953453805</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8156621053984327020' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8156621053984327020' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1995901437'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 2, 2012 9:14 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-7058300825822989695</id><published>2012-03-01T21:31:34.890-06:00</published><updated>2012-03-01T21:31:34.890-06:00</updated><title type='text'>Mark,

The seam problem is not a second algorithm....</title><content type='html'>Mark,&lt;br /&gt;&lt;br /&gt;The seam problem is not a second algorithm. I figure it out back when I was trying to understand what&amp;#39;s going on. It is not exactly a continous split, but rather a discrete one. Following these instructions you should be able to recreate the tree with no seam problem.&lt;br /&gt;&lt;br /&gt;Suppose we are doing the first vertical split, thus we have the whole shapefile bounding box, with xmin=0 and xmax=255. Then you calculate center = xmin + (xmax - xmin) / 2 + 1, where the division is an integer division, not real. As you shall see in a bit, this will always result in an even number.&lt;br /&gt;&lt;br /&gt;Suppose we have a shape and that shape.xmin and shape.xmax are the byte range for the x&amp;#39;s. Then we have shape.xmin &amp;lt; shape.xmax, even if the feature is just a point. This is because when changing the real number to a byte, the xmin gets rounded down and xmax gets rounded up.&lt;br /&gt;&lt;br /&gt;To place the shape in the proper node in the tree, do the following. If shape.xmin &amp;lt;= center and shape.xmax&amp;gt;center, then the shape bounding box is assumed to touch the vertical line, even if the not-rounded bounding box does not touch the exactly vertical line. If shape.xmin &amp;gt; center, then the shape is placed on the first child or one of its descendant, and for the next vertical split xmin=center. If shape.xmax &amp;lt;= center, then the shape is placed on the second child and for the next vertical split xmax=center-1.&lt;br /&gt;&lt;br /&gt;Suppose we start with xmin=0 and xmax=255. Then center=128. Say we now want to search on the right. Then xmin=128 and xmax=255 and center=192. Say we want to go to the left now. Then xmin=128 and xmax=191 and center=160. xmin will always be an even number and xmax an odd number, in fact the width (xmax - xmin) is always a power of 2 minus one (255, 127, 63, 31, etc), which is what causes the center to always be even.&lt;br /&gt;&lt;br /&gt;The same principle applies to horizontal splits. I followed this &amp;quot;discrete&amp;quot; splitting scheme and checked with all the features in my shapefiles, and I got them all placed in the correct bins. Please let me know if it works for you too.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/7058300825822989695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/7058300825822989695'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html?showComment=1330659094890#c7058300825822989695' title=''/><author><name>Francisco</name><uri>http://www.blogger.com/profile/04417536666973204296</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8156621053984327020' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8156621053984327020' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-876035358'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 1, 2012 9:31 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-4369688027576901600</id><published>2012-03-01T11:10:01.498-06:00</published><updated>2012-03-01T11:10:01.498-06:00</updated><title type='text'>Awesome! I was hoping you&amp;#39;d add something like...</title><content type='html'>Awesome! I was hoping you&amp;#39;d add something like this. I just started using Pyshp in the past 3 weeks.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/4369688027576901600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/476214723910872880/comments/default/4369688027576901600'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html?showComment=1330621801498#c4369688027576901600' title=''/><author><name>Trevor Blanarik</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2012/02/pyshp-shaperecords-method.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-476214723910872880' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/476214723910872880' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1604119173'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 1, 2012 11:10 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-7767124582326989477</id><published>2012-03-01T11:09:29.539-06:00</published><updated>2012-03-01T11:09:29.539-06:00</updated><title type='text'>Francisco,

Yes, it is a binary division. It&amp;#39;s...</title><content type='html'>Francisco,&lt;br /&gt;&lt;br /&gt;Yes, it is a binary division. It&amp;#39;s essentially an &amp;quot;Interval KD Tree&amp;quot; but the splits are at the midpoint of the node&amp;#39;s range, not at the median point in the set. Also, there&amp;#39;s no tree applied to the seam features.&lt;br /&gt;&lt;br /&gt;There is a splitting threshold of 8 features per cell initially. However, the tree size is fixed based on the total number of features. It selects the size of the tree so that there are 8 features or less per cell on average.&lt;br /&gt;&lt;br /&gt;Because you can only split the range of the 8 bit mapping so many times, the maximum size of the tree is fixed. How the space is split is also a bit odd. It doesn&amp;#39;t split on a single value - there&amp;#39;s actually a 1 unit &amp;quot;gutter&amp;quot; between the cells. There&amp;#39;s also padding on the cells on the low edges.&lt;br /&gt;&lt;br /&gt;Once you implement all this you&amp;#39;ll run into some strange behavior - features on the seams between splits won&amp;#39;t end up in the bins where your algorithm predicts. It appears there&amp;#39;s a second algorithm for the seam features. I&amp;#39;ve figured it out, but it only seems to apply to first 6 levels of the tree. I can see the justification for why there could be two algorithms, but I haven&amp;#39;t completely solved the problem.&lt;br /&gt;&lt;br /&gt;But we are very close.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/7767124582326989477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/7767124582326989477'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html?showComment=1330621769539#c7767124582326989477' title=''/><author><name>Marc Pfister</name><uri>http://www.blogger.com/profile/12564297701953453805</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8156621053984327020' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8156621053984327020' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1995901437'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 1, 2012 11:09 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-2317786588470568718</id><published>2012-03-01T10:04:40.830-06:00</published><updated>2012-03-01T10:04:40.830-06:00</updated><title type='text'></title><content type='html'>This comment has been removed by the author.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/2317786588470568718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/2317786588470568718'/><author><name>Francisco</name><uri>http://www.blogger.com/profile/04417536666973204296</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8156621053984327020' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8156621053984327020' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.contentRemoved' value='true'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-876035358'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 1, 2012 10:04 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-4363112024159101374</id><published>2012-03-01T10:04:14.369-06:00</published><updated>2012-03-01T10:04:14.369-06:00</updated><title type='text'>First of all thanks for what you have done so far ...</title><content type='html'>First of all thanks for what you have done so far in the reverse ingineering process of sbn file. It help me a lot with the C# library I built to read shapefiles. Here are my two cents to this process&lt;br /&gt;&lt;br /&gt;The sbn is an spatial index based on a binary tree, where each node contains one or more boxes. When a node has too many boxes it splits. The split draws a line in the middle. Any box that touches the line is kept in the node, while any box on one side of the line is sent to the first child, and any box on the other side of the line is sent to the second child. A vertical split divides the square with a vertical line into two rectangles, and its first child receives the boxes to the right of the line and the second child receives the boxes to the left of the line. A horizontal split divides the rectangle with a horizontal line into two squares. The boxes above the line are sent to the first child while the boxes below to the second child. The root is a vertical split. The children of a vertical split are always horizontal splits, while the children of a horizontal split are always vertical splits.&lt;br /&gt;&lt;br /&gt;The list of bins is an array contaning the tree. the first element is the root node, the second and third elements its children the 4th and 5th are the children of the the 2nd bin and the 6th and 7th element are the children of the third bin, and so on. If a node has not been split, then all its descendants will be empty bin records. If a node has been split, but no box touches the splitting line, then than bin will be an empty bin record.&lt;br /&gt;&lt;br /&gt;The one thing I have not figure out yet is what&amp;#39;s the splitting threshold, i.e., when a node is considered full and splitting occur. The files I have looked at have different numbers. One of them, which had a few shapes, does not have more than 30 boxes in a node, while another that has lots of shapes has no more than 700 shapes in a node. This is a problem when writing the sbn file. However is not a problem when reading it and using it. With the large file, when I read it without the index it took a few seconds to retrive the shapes that intersected certain small box, but when I started using the index file, it worked in the blink of an eye.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/4363112024159101374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8156621053984327020/comments/default/4363112024159101374'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html?showComment=1330617854369#c4363112024159101374' title=''/><author><name>Francisco</name><uri>http://www.blogger.com/profile/04417536666973204296</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/10/your-chance-to-make-gis-history.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8156621053984327020' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8156621053984327020' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-876035358'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 1, 2012 10:04 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-3472340827784045418</id><published>2012-02-22T03:06:33.966-06:00</published><updated>2012-02-22T03:06:33.966-06:00</updated><title type='text'>Very nice piece of code and very useful to merge a...</title><content type='html'>Very nice piece of code and very useful to merge a lot of tiled data.&lt;br /&gt;&lt;br /&gt;I however had to update a little bit the shapefile.py (date: 20110927, version: 1.1.4) to process my pointZ shapefiles. On line 699, I&amp;#39;ve change s.points[0][2] by s.z[0] and on line 705 s.points[0][3] by s.m. Does it seems correct?&lt;br /&gt;&lt;br /&gt;Thanks a lot,&lt;br /&gt;David</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/5463265076713283342/comments/default/3472340827784045418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/5463265076713283342/comments/default/3472340827784045418'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/02/merging-lots-of-shapefiles-quickly.html?showComment=1329901593966#c3472340827784045418' title=''/><author><name>David</name><uri>http://www.blogger.com/profile/01779138206429233968</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/02/merging-lots-of-shapefiles-quickly.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-5463265076713283342' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/5463265076713283342' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2039570121'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='February 22, 2012 3:06 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-355448186677420798</id><published>2012-02-08T09:15:01.496-06:00</published><updated>2012-02-08T09:15:01.496-06:00</updated><title type='text'>Mike,

There&amp;#39;s no conversion or measurement go...</title><content type='html'>Mike,&lt;br /&gt;&lt;br /&gt;There&amp;#39;s no conversion or measurement going on so I think this is fine for lat/long.  It should be abstract enough and works on arbitrary polygons so I think it would be ok.  Correct me if you discover otherwise.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/355448186677420798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/355448186677420798'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/01/point-in-polygon.html?showComment=1328714101496#c355448186677420798' title=''/><author><name>Joel Lawhead</name><uri>http://www.blogger.com/profile/15645953215148786163</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/01/point-in-polygon.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8764472954672783495' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8764472954672783495' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-539885453'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='February 8, 2012 9:15 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-1047704356413775565</id><published>2012-02-07T22:27:39.068-06:00</published><updated>2012-02-07T22:27:39.068-06:00</updated><title type='text'>Joel,

I would be happy to provide my script, but ...</title><content type='html'>Joel,&lt;br /&gt;&lt;br /&gt;I would be happy to provide my script, but I want to make sure I have my head on straight. Don&amp;#39;t you need to convert the lat/lon points into points on a Cartesian coordinate system for this point-in-polygon algorithm to work?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/1047704356413775565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/1047704356413775565'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/01/point-in-polygon.html?showComment=1328675259068#c1047704356413775565' title=''/><author><name>Mike</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/01/point-in-polygon.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8764472954672783495' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8764472954672783495' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-528780744'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='February 7, 2012 10:27 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-7708434065968936080</id><published>2012-02-06T14:30:09.218-06:00</published><updated>2012-02-06T14:30:09.218-06:00</updated><title type='text'>Antonio,

You shouldn&amp;#39;t have to extract the po...</title><content type='html'>Antonio,&lt;br /&gt;&lt;br /&gt;You shouldn&amp;#39;t have to extract the polygons to separate files.&lt;br /&gt;&lt;br /&gt;This script could be modified to do that.  Instead of &amp;quot;poly = lyr.GetNextFeature()&amp;quot;, you would build and array of polygons for each feature in the shapefile.&lt;br /&gt;&lt;br /&gt;And then you would need to put the &amp;quot;Map Points to Pixels&amp;quot; section in a loop to apply each polygon to the clipping mask.  &lt;br /&gt;&lt;br /&gt;I haven&amp;#39;t tried this trick but it should work.&lt;br /&gt;&lt;br /&gt;When I have more time I can try to create an example.  If you get it working let me know.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/7708434065968936080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/7708434065968936080'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html?showComment=1328560209218#c7708434065968936080' title=''/><author><name>Joel Lawhead</name><uri>http://www.blogger.com/profile/15645953215148786163</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-1452000444369575492' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/1452000444369575492' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-539885453'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='February 6, 2012 2:30 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-3162373816645405496</id><published>2012-02-06T14:13:00.270-06:00</published><updated>2012-02-06T14:13:00.270-06:00</updated><title type='text'>Mike,

Sorry for the slow reply.  I don&amp;#39;t have...</title><content type='html'>Mike,&lt;br /&gt;&lt;br /&gt;Sorry for the slow reply.  I don&amp;#39;t have anything coded up but here&amp;#39;s some pretty straight forward math that may help:&lt;br /&gt;&lt;br /&gt;http://tinyurl.com/7cqzwdw&lt;br /&gt;&lt;br /&gt;If you implement this in Python please let me know.  I&amp;#39;d love to share that with the community.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/3162373816645405496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/3162373816645405496'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/01/point-in-polygon.html?showComment=1328559180270#c3162373816645405496' title=''/><author><name>Joel Lawhead</name><uri>http://www.blogger.com/profile/15645953215148786163</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/01/point-in-polygon.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8764472954672783495' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8764472954672783495' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-539885453'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='February 6, 2012 2:13 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-2654102077988936093</id><published>2012-02-03T20:00:53.875-06:00</published><updated>2012-02-03T20:00:53.875-06:00</updated><title type='text'>Joel: Do you have any suggestions for determining ...</title><content type='html'>Joel: Do you have any suggestions for determining (with Python) if a convex or concave polygon runs clockwise? Your script works well, but the set of polygons I have are a mixture of clockwise and counterclockwise. Thank you in advance.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/2654102077988936093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/8764472954672783495/comments/default/2654102077988936093'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/01/point-in-polygon.html?showComment=1328320853875#c2654102077988936093' title=''/><author><name>Mike</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/01/point-in-polygon.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-8764472954672783495' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/8764472954672783495' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-528780744'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='February 3, 2012 8:00 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-512285907299271282</id><published>2012-02-03T12:04:23.428-06:00</published><updated>2012-02-03T12:04:23.428-06:00</updated><title type='text'>Thank you for the post,

If I have a single shapef...</title><content type='html'>Thank you for the post,&lt;br /&gt;&lt;br /&gt;If I have a single shapefile with several polygons inside it how can I make several clips for each of that polyon? I have to extract them from a shapefile and iterate over them?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/512285907299271282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/512285907299271282'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html?showComment=1328292263428#c512285907299271282' title=''/><author><name>Antonio Rodriges</name><uri>http://www.blogger.com/profile/17722626177771761006</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-1452000444369575492' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/1452000444369575492' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1347022891'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='February 3, 2012 12:04 PM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-1992525035473375448</id><published>2012-01-25T11:10:12.825-06:00</published><updated>2012-01-25T11:10:12.825-06:00</updated><title type='text'>Does anyone know how to do this in R?</title><content type='html'>Does anyone know how to do this in R?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/1992525035473375448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/1452000444369575492/comments/default/1992525035473375448'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html?showComment=1327511412825#c1992525035473375448' title=''/><author><name>Tiffany</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/02/clip-raster-using-shapefile.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-1452000444369575492' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/1452000444369575492' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1802943204'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='January 25, 2012 11:10 AM'/></entry><entry><id>tag:blogger.com,1999:blog-2044555433406398156.post-886807954474717486</id><published>2012-01-17T10:39:45.826-06:00</published><updated>2012-01-17T10:39:45.826-06:00</updated><title type='text'>oops, not the shp file, the error said the dbf is ...</title><content type='html'>oops, not the shp file, the error said the dbf is corrupt or does not have same number of objects as the shx file, run your program and it works, pretty simple, I wonder why its not working properly though, any ideas?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/581642971733810726/comments/default/886807954474717486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2044555433406398156/581642971733810726/comments/default/886807954474717486'/><link rel='alternate' type='text/html' href='http://geospatialpython.com/2011/11/generating-shapefile-shx-files.html?showComment=1326818385826#c886807954474717486' title=''/><author><name>MAT</name><uri>http://www.blogger.com/profile/12025782394403983013</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://geospatialpython.com/2011/11/generating-shapefile-shx-files.html' ref='tag:blogger.com,1999:blog-2044555433406398156.post-581642971733810726' source='http://www.blogger.com/feeds/2044555433406398156/posts/default/581642971733810726' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-435787129'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='January 17, 2012 10:39 AM'/></entry></feed>
