Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 14614

A vector data storage format for storing the location, shape, and attributes of geographic features. Often referred to as 'an ESRI shapefile', as ESRI developed it.

2 votes

Cropping a Shapefile into a Rectangular Box with Python pyshp

Non-Python solution ogr2ogr -f "ESRI Shapefile" pr-roads.shp roadl_usa.shp -clipsrc -67.5 17.8 -65.1 18.6 …
john mangual's user avatar
1 vote
3 answers
2k views

Cropping a Shapefile into a Rectangular Box with Python pyshp

. >> import shapefile >> sf = shapefile.Reader("roadl_usa") >> len(sf.records()) 193504 Not familiar with the writing object but hoping it's easy since I am not building from scratch. … How do I select only those records in the bounding box [-67.5, -65.0] and [17.8, 18.6] and write a new shapefile? What is the output like? …
john mangual's user avatar