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/08/2015 | |
# @author Cindy Williams | |
# | |
# Creates random points in each polygon feature | |
# without the need for an Advanced licence to run | |
# the Create Random Points tool. | |
# | |
# For use in the Python window in ArcCatalog. | |
# |
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. | |
# |
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 os | |
folder_assetarea = r"C:\Assets\AreaA" # The main folder for Area A | |
year = "2015" # The year to create the structure for | |
folder_year = os.path.join(fld_mun, year) | |
folder_list = [["conversion", ["cad_gis", "ftr_shp", "kml_gdb", | |
"pdf_jpg", "shp_gdb", "tbl_xls", | |
"xls_tbl",] "jpg_gis", "gps_gis", |
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/05/2015 | |
# @author Cindy Williams | |
# | |
# Creates a point feature class in memory containing | |
# random points within a predefined extent, and posts | |
# the points as ESRI JSON to a REST endpoint. | |
# | |
# 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 03/07/2015 | |
# @author Cindy Williams | |
# | |
# Sorts the TOC in ArcMap alphabetically using | |
# a temporary group layer for reference. This group | |
# layer should be empty, and can be created anywhere | |
# in the TOC. | |
# | |
# 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 01/07/2015 | |
# @author Cindy Williams | |
# | |
# Generates a file gdb table containing the paths | |
# of photos to be attached to matching points as feature | |
# attachments. | |
# | |
# For use as a standalone script. | |
# |