Quantcast
Channel: Question and Answer » arcpy
Browsing latest articles
Browse All 767 View Live

arcpy 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 Article


Debugging 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 Article


permissions 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 Article

Python 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 Article

arcpy.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 Article


How 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 Article

Image may be NSFW.
Clik here to view.

Distance 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 Article

Script 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 Article


Create 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 Article


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 Article
Browsing latest articles
Browse All 767 View Live