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 22335

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.

4 votes
2 answers
2k views

Change shapefile field names using ogr AlterFieldDefn

Here is the code I am using: Shapefile = r"C:\test.shp" driver = ogr.GetDriverByName('ESRI Shapefile') dataSource = driver.Open(Shapefile, 1) if dataSource is None: print 'Could not open %s' % ( … Shapefile) else: print 'Opened %s' % (Shapefile) layer = dataSource.GetLayer() layer_defn = layer.GetLayerDefn() for i in range(layer_defn.GetFieldCount()): print layer_defn.GetFieldDefn …
jtodd's user avatar
  • 73