How can I perform an inside clip on a raster file based on another raster file?
I have a raster file that I would like to use to perform an inside clip on another raster file. I have tried using the extract by rectangle tool, but it gives me values ranging from 3.40282e+038 to...
View ArticleImprove Python script logic/structure for erasing features with arcpy
EDIT: Too big a question, I think – so, to refine it: Please help me define (and therefore, research/learn how to use) the Pythonic concept for writing a script that can take one input variable,...
View ArticleHow to update attributes of a shapefile using list values?
I am using an update cursor to update the attributes of a shapefile using values from a list. It seems very easy, but I couldn’t make it run correctly. When I run the following code, it updates all...
View ArticleArcPy add point to a FeatureServer Layer
What is the best practice to add a point to a FeatureServer Layer using arcpy? using rest services, write to db, etc? Where can I find a code sample?
View ArticleLabel Features with Arcpy
I had run the contour tool in my script to generate polylines. Contour("rectExtract", "C:/fakepath/Class1.shp", 50,0) Now I want to label the polylines with the contour-value. If I execute this script:...
View ArticleEditing symbology of contourlines with Arcpy
I just have a problem with my pythonscript. I had run the Contour-tool to generate polylines. Contour("rectExtract", "C:/fakepath/Class10.shp", 20,0) Now i want to mark the 100 meter lines in another...
View ArticlePython script to read coordinate system of an input feature class? [duplicate]
This question already has an answer here: How to set parameters for Describe() function? 1 answer
View ArticleError 000368 selectbylocation in script from model builder
Can anyone help? I created a model-has buffer,clip, selectbylocation…. I exported the model as a script but when i try to run it i get this error: Executing: IGISprogrammingscript...
View ArticleHow to search records in very large table for matching features in FGDB?
I am working on the following challenge – not sure if this is more Python or ArcGIS-specific, so starting here. I have a table with three fields: ID#, “Revenue” and “Live” – and 2.1 million records. I...
View ArticlePython select by attribute using a variable counter
I am brand new to python and trying to learn how to do some simple loops but I have hit a snag. Below is what I am working with, I am trying to select the polygon row by row, but I keep getting EOL...
View Articlecan arcpy detect whether it's running in Desktop or Server?
I’m developing some code that I want to run both as an ArcGIS Server web service and as a standalone script. I want to be able to modify the execution slightly depending on whether it’s running as an...
View ArticleArcGIS 10.1 Python script to snap points to lines
I have 2 Feature Datasets in a geodatabase. One dataset contains bus routes and the other contains bus stops for each route. I want to create a script that will snap the bus stops to the vertex of the...
View ArticleLooking for ArcPy tool for calculating statistics on field with summary field...
What I’m searching for is a tool that will sum a field by a secondary unique field AND booleans… Let’s say I have 12 table each with 4mil records and the following fields: Donation_Amount ($ amount of...
View Article'Pausing' a Python script tool to allow the user to provide input before...
I am using ArcGIS. I have written a Python script that creates various surfaces including NDVI. After the script creates those surfaces, I would like the script to stop running while the user manually:...
View ArticleWhile looping with arcpy: ERROR 010240: Could not save raster dataset
Hi I am very new to python coding and have been struggling with this for a while I cannot see the reason for this error! Any help will be greatly appreciated. Here is the code that is causing this...
View ArticleWhy does AddField give ERROR: 000732 Input Table: does not exist or is not...
I was handed off a a bunch of state shape files and wrote a script to add a few new fields and calculate some attributes. The first line in my script is –...
View ArticleHow to select among overlapping linear features by create date?
I have a table which has overlapping linear data; for example: A----------C and B---------C. Of these two records I would only like to return the record with the latest create date; in other words, the...
View ArticleHow to calculate the length of clipped lines using buffered points using...
I need to create a buffer around each point of a points feature class. I would then want to use the point buffers to clip the streets feature class to calculate the length of the clipped streets using...
View ArticleCreating sign locations from an existing database with offset & dist to...
I have a database of 22,000+ signs that contains the offset from centerline along with a distance to/from the edge of pavement to a specific intersecting road for each sign. I also have a street...
View ArticleHow to read an Excel sheet in ArcPy script
I’m writing a python code to convert X,Y points in excel to shapefile. In this process i have toread xy points from shhet1. What is the step i have to include in my process to read data from sheet1 of...
View Article