This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
lyr = arcpy.mapping.Layer(r'C:\Some\Arb\Folder\work.gdb\ftr_test') | |
cursor = arcpy.da.UpdateCursor(lyr, 'Name') | |
for i in xrange(10): | |
for e in ['X', 'Y']: | |
upd.next() # Increment the cursor | |
upd.updateRow(['Zone ' + str(i) + e]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@date 12/10/2015 | |
@author Cindy Williams | |
Adds a new field to layers in a map document, based | |
on a current field. | |
For use in the Python window in ArcMap. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@date 06/10/2015 | |
@author Cindy Williams | |
@version 1.0 | |
Uses an arcpy FeatureSet to allow the user to interactively create | |
points on a line which will be used to split that line into parts, | |
while retaining all attributes. | |
Requirements: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import docx | |
import xlwt | |
doc = r"C:\Some\Arb\Folder\input.docx" | |
xls = r"C:\Some\Arb\Folder\output.xls" | |
document = docx.Document(doc) | |
book = xlwt.Workbook() | |
cur_sheet = book.add_sheet("Tables") | |
row_num = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@date 15/09/2015 | |
@author Cindy Williams | |
Uses the python-docx package to write various | |
properties of a feature class to docx format. | |
''' | |
import arcpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@date 2015/09/18 | |
@author Cindy Williams | |
Converts a folder of MRSID files to TIFF files. | |
For use as a standalone script. | |
''' | |
import arcpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# @date 25/08/2015 | |
# @author Cindy Williams | |
# | |
# Prints a comparison of the specified raster | |
# properties using arcpy and numpy. | |
# | |
# For use as a standalone script. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# @date 25/08/2015 | |
# @author Cindy Williams | |
# | |
# Pans and zooms each data frame in an ArcMap document | |
# to the extent and scale of the data frame containing | |
# the data driven pages index layer before exporting. | |
# | |
# For use as a standalone script. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# @date 18/08/2015 | |
# @author Cindy Williams | |
# | |
# Converts a range of pages from a pdf to separate tiff | |
# files using the PDF to TIFF tool added at ArcGIS 10.3. | |
# For very basic conversion, with minimal error handling. | |
# | |
# For use as a standalone script. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# @date 14/08/2015 | |
# @author Cindy Williams | |
# | |
# Quickly formats the names of all the layers in a map | |
# document. In this example, the part of the name before | |
# the first full stop is removed, underscores are replaced | |
# spaces, a regex is used to insert spaces before capitals | |
# and the string is converted to proper case. | |
# |