Using sublime text for Arcgis or Arcpy?
I have installed python 27 in one directory c:program filespython27 and arcgis 10.2 in another directory c:program filesarcgis, and within this folder there is c:program filesarcgisdesktop10.2arcpy....
View ArticleExpressing a Raster Calculator expression with Math Toolset
So here’s the problem. I have two rasters containing bathymetry data: one containing the bathymetry of the sea floor, we’ll call this raster1, and another containing the difference between two previous...
View ArticlePrint Feature Class Location with ArcPy
I would like to know the path of a feature class that is in my TOC in ArcMap, how can this be done with ArcPy?
View ArticleSort and subset feature classes using Python script
Here’s my situation: I’ve got multiple utility feature classes, and each fc is subtyped according to one the primary attributes, which is a String. Each fc has at least 12 attribute fields, and each...
View ArticleHow to extract,stack and calculate Standard Deviation from a NetCDF (.nc) to...
I have a NetCDF file for several years of monthly Climate data ( Precipitation,PET,Temp,etc) data from CRU 3.22 (Climate Research Unit). I want to extract a subset of the dataset namely 2000-2010. And...
View ArticleCreating a ValueTable with a column that has dependency
I am creating a python tool which looks like the figure below. Input feature: It asks for a input feature class. Valuetable(Lookup tables): It has two columns – one for look up tables and another for...
View ArticleHow to Dissolve Polygons Inside a Feature Class Based on Attribute Conditions
I have a large shapefile (saleArea.shp) which includes hundreds of small adjacent polygons. I would like to dissolve the polygons based on some conditions from tValues field into 5 bigger groups like...
View ArticleHow do you use the setErrorMessage(message:string) within the ToolValidator...
The Programming ToolValidor Class ArcGIS Help menu states that: the following method: setErrorMessage(message:string) “Marks the parameter as having an error (a red X) with the supplied message. Tools...
View ArticleCreating arc segment between two points with common field using Python?
I need to create Arc Segments between multiple points with like data using half the distance between the two like points as the radius of the arc segment. I would prefer to use python to accomplish...
View ArticleConverting large rasters to NumPy
I have a geodatabase that contains a large number of raster datasets – there are two rasters for each country in the world, and they are very large, in some cases up to 3GB per raster dataset. I need...
View Articlearcpy.da.SearchCursor, cannot read preceding zeros from csv
I’m using arcpy.da.SearchCursor to read a csv that has a column with preceding zeros, e.g.: myCSVColumn 0124578 12598 04589 012568 ... When using the arcpy.da.SearchCursor it returns the value w/o the...
View ArticleClosest Facility
wonder if anyone can help me. I make a network analyst (Closest Facility) analysis. I will be driving from “Incidents” to “Facilities”. My “Facilities” is the population center in a municipality. In...
View ArticlePoint to raster conversion works as a tool in arcmap but fails when attempted...
I’m working on a script that will automate a stream delineation protocol given a DEM and a culvert layer. I was having difficulty troubleshooting problems with the point to raster conversion tool so I...
View Articlepython script for splitting a polygon feature into equal parts
Is there a python script for splitting a polygon feature into equal parts in arcgis 10.1 . I know arcgis 10.3 has a segmentalongline function but I m looking for Arcgis 10.1 functionality. THis is what...
View ArticleExecuteError: ERROR 000358 – Using a variable within arcpy.Select_analysis()...
This question already has an answer here: How to include variable in where clause of arcpy.Select_analysis? 3 answers
View ArticleUpdate record based on series of conditionals using Python
I have a feature class which I’ve been using a relate to compare duplicate field values and was thinking of a way to eliminate the manual process of checking these duplicate values and making a...
View ArticleWhat is the difference between data access's “SHAPE@XY” and...
Data Access Search Cursor. What, if anything, is the difference between the tokens "SHAPE@XY" and "SHAPE@TRUECENTROID"? They returned the same coordnates on a test polygon: >>> cursor =...
View ArticleHow do I transfer one field name from text file to a new field name in...
I am working on a script that involves incidents of fire. I’m taking my values from a text file that is comma delimited. The first line of the text file contains the field names...
View ArticleCan I use my SearchCursor in Select by Location
I am trying to select the largest polygon that contains each feature in a feature class but none of the features in another feature class. I have written the code that seems logical to me but (of...
View ArticleName file based on column information, data driven pages
I am using data driven pages to export 300 maps into PNG-files. I would like to name every exported PNG-file based on information from a column in the attribute table. What is the code for that? The...
View Article