How do I get arcpy.Select_analysis to skip conditions that don't exist
I have data from 2007 to 2015 of various animals that I’m trying to break up by year and name. I wrote a little for loop that goes through all the items in my attribute table (gps_points). The problem...
View ArticleCreate feature datasets from group layer name
Is it possible to create feature dataset, based on the name from group layers. I have two separate codes, one for finding out the names of group layers, and other to create feature datasets....
View ArticleScript slow because of conditional statements
I have created a Python addin for ArcMap. It has two comboboxes. Combobox1: Search for facility by name. If there is one facility with that name the mxd zooms to the selected extent. Combobox2: If...
View ArticleDistance between points along polyline ArcGIS for Desktop (pt. 2)?
I read over the solution in Distance between points along polyline ArcGIS for Desktop? and I have a slight variation of that problem: I need to find the distance of each red point (transformers) from...
View ArticleHow to find identical street names with consecutively numbered addresses...
I am trying to write a python script that will only select multiple rows with the same street name if they have consecutively numbered addresses and then place those street names in a list. For...
View Articlearcpy.Intersect_analysis using Geometry object as input
Is there a way to run arcpy.Intersect_analysis using an arcpy.Geometry object as one of the input datasets? I’ve tried different variations of the following, but I can’t seem to get it to work. with...
View ArticlePython for ArcGIS: Code refuses to accept a defined variable as input
I’m learning to use arcpy, and I am starting to try and script some geoprocessing tools. While trying to use arcpy.Select_analysis, I found that the code does not accept a defined variable as input. If...
View Articlepermissions problem with creating a new text file from the python interpreter...
I’m attempting to create a .txt file as the output from a larger python script I’m running within ArcMap. The code I’m having trouble goes like this: x = open('adfd.txt', 'w'), and my error message...
View ArticleDebugging looped python script (updating picture element link)?
Can anyone help with the following script? It’s goal is to list every mxd in a folder, list picture elements in them and the change the path for a specific element. Here’s an update version of the...
View Articlearcpy raster to polygon without merges (or assign autoincrement values to...
I have a raster dataset (tiff) and I want to get a shapefile (polygons) that preserves all cells. Unfortunately, the Raster to Polygon tool automatically merges all adjacent cells with the same values....
View ArticleDissolve Management in Python
I have a simple code that is pulling together polygon shapefiles from a Windows folder and merging them together into a single shapefile. In the same code, I want to add a dissolve command. My fields...
View ArticleMonitor open sde connection
How can I monitor the open ArcSDE database connections without sdemon? I need to see at any time how many sessions are consumed from my app and if they are related to ArcGIS. I use Oracle 10.2.
View ArticleCannot get correct result for output [on hold]
The attached is my Code and explanation of what I need to do. I need to add more extra function for this and get my final output result. Here is the code and explanation. Example: GDB has [A,B,C,D] – 4...
View ArticleListing Points Within Polygon for Hadoop? [closed]
I am very familiar with a point in polygon analysis but instead of counting how many points are within each polygon. Does anyone know how to list the points within the polygon and add a field that...
View ArticleCreating button on Python AddIn toolbar to run python script when clicked?...
I need to create a button on toolbar of arcgis 10.2 who run a python 2.7 script created before when I click. Then I need to know if it’s possible in this button that script write results to an excel...
View ArticleI only know how to turn off the entire current layer. But I want off only...
I only know how to turn off the entire current layer. But I want off only some of the layers specified #turn all layers in current map doc on: print "Button2--turn on layers" mxd =...
View ArticlePass sql expression with GetParameterAsText to SelectLayerbyAttribute in .py...
With Arctoolbox and python scripting I’m creating long tool, but one of the steps is to select by attributes with SQL expression. Let’s imagine that: featureCar = arcpy.GetParameterAsText(0) is Data...
View ArticleZoom/Pan function in python addin tool
I have created one python addin tool which creates some points along a line, it works good. my problem is when my tool gets activated i am not able able to zoom/pan the map. map view just get stuck...
View ArticleTrying to make many polygons from points? [closed]
I am trying to turns points into polygons, but I encounter this challenge : My data set has 1000 entries. Each entry has 360 associated columns, each with a coordinate pair. When connected, these...
View ArticleHow can I alter the value field in a raster?
I’m using ArcGIS. I have a raster with angles in the value field. But the value field is type long integer. I would like to change it to float. Is that possible? Some more details: I’ve started with a...
View Article