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 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. | |
# |
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 04/08/2015 | |
# @author Cindy Williams | |
# | |
# Creates segments along a selected line feature | |
# by splitting it according to a table of measures | |
# and saving it in a new feature class. | |
# | |
# 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 28/07/2015 | |
# @author Cindy Williams | |
# | |
# Converts all the sheets in a spreadsheet | |
# to file gdb tables and displays the XY | |
# coordinates in ArcMap. | |
# | |
# Assumes the spreadsheet has been formatted | |
# according to GIS standards. |
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.management.MakeFeatureLayer(r"C:\Some\Arb\Folder\work.gdb\ftr_wrp_Pipe") | |
field = "GIS_ID" | |
def getWhereQry(exp): | |
return """ "{0}" IS {1} """.format(field, exp) | |
# Gets the previous highest GIS ID value. Set n = 0 for new feature class | |
n = max(int(row[0].split("-")[1]) for row in arcpy.da.SearchCursor(lyr, field, where_clause=getWhereQry("NOT NULL"))) |
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 13/07/2015 | |
# @author Cindy Williams | |
# | |
# Sorts a polygon feature class by descending X and ascending Y, | |
# to obtain the spatial order of the polys from left to right, | |
# top to bottom. Bypasses the Advanced licence needed to | |
# do this in the Sort tool. | |
# | |
# 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 13/07/2015 | |
# @author Cindy Williams | |
# | |
# Intersects feature layers with the index layer | |
# for selected data driven export to a multi-page | |
# PDF with embedded layers. | |
# | |
# For use as a standalone script. | |
# |