Quantcast
Channel: Question and Answer » arcpy
Browsing all 767 articles
Browse latest View live

Making tool in arcmap by using modelbuilder or python

I am trying to making one tool by using python. For that I already make GUI. In that i have 5 inputs. These 5 inputs are feature layers(shape files). Now I make another option field. It is multiple...

View Article


Image may be NSFW.
Clik here to view.

Script and model crashes after first iteration

I have a python script which dies after the first iteration. It dies on the second feature class to coverage. This also happened in modelbuilder, which is why I went to python hoping it would go away....

View Article


Scripting Custom data setup functionality of Business Analyst using ArcPy?

Is it possible to script the “Custom Data Setup” functionality in the “Business Analyst” extension in ArcGIS using ArcPy? This functionality basically allows one to create a “Business Analyst...

View Article

arcpy.da cursor : iteration not started

I am trying to convert cursors written in 10.0 to use the new arcpy.da module in 10.2.1. If I step through the code in debug mode, it steps into the for loop; however, when I attempt to run the code I...

View Article

Image may be NSFW.
Clik here to view.

How to count point shp inside polygon shp using Python?

This is my first time here, so I’ll try to be as specific as I can. What I’m trying to do is found out which polygon contains the most points and write the result in a text file. Here is my script :...

View Article


Getting number as parameter to use in SQL expression leads to ExecuteError:...

In my script I am using the Select tool (arcpy.Select_analysis) and in the SQL expression, I want to use a number that I call in as a parameter. I have trying to script it like: subsize =...

View Article

Pyscripter and arcpy not working together

I have installed pysripter on my machine and am not able to run any arcpy scripts from it despite being able to import arcpy. Models that work in model builder do not transition to pyscripter here is...

View Article

Exporting multiple map pages from list of apns

I use the code below to export two maps with different layers active for a single apn. The problem is I have a large list of APNs to go through so plugging in each apn at a time isn’t really feasible....

View Article


Export ArcGIS Metadata as a .pdf

I’ve been asked to automate the exporting of metadata from ESRI feature classes into .pdf files. We don’t want the .xml files, rather a .pdf version of what you see in the Description panel in Catalog....

View Article


How to create lines from points from different feature class ArcPy

I want to create lines based on two points: 1st line: point number 1 from pointFc, point number 1 from centFc 2nd line: point number 2 from pointFc, point number 2 from centFc and so on Where did I...

View Article

Why is my cursor empty?

Yesterday I set up a Python script using a cursor on a layer. Today I’ve tried running again and no matter what I run it in, the cursor is empty. I’ve tried removing the query on the layer, tried...

View Article

How do I transform values using a dictionary or lookup table?

I’m reading rows (~20 fields per row) from a database using a SearchCursor and placing them into an array. Then, I loop over the array and use an InsertCursor to insert them into a Feature Class in a...

View Article

For Loop Batch Copy Raster TIFF to BMP in ArcMap

I need to convert TIFFs to BMPs using CopyRaster from ascii to raster output TIFFs. I am not sure how to define the “outRaster” so that it will convert the rasters to BMP. I’m guessing that the line of...

View Article


Is there String Size Restriction in ArcGIS Python Script Tool parameter?

I’m trying to post a list of unique ID’s (as a string) to a Python script tool for processing by ArcGIS Desktop 10.0. The list may be 50k+ id’s long (~450kb). e.g....

View Article

Apart from “in-memory” space and physical geodatabase, is there any other...

Using the centroid of the building footprints (tagged residential), I want a count of hydrants within 135m, and a count of hydrants within 270m of every residential footprint. This would be based on a...

View Article


How to use python in arcgis to create new layer from selection and export...

I am trying to create county level maps by looping through a master file for each county. However, I get an error message when I try to run the code. I’m not sure what is wrong with my code and I would...

View Article

How to show the attribute table of selected features using arcpy?

Is there a way to show the attribute table of selected features using arcpy? Maybe in the mapping module? I would like to be able to select some features and then have an Add-In button that displays...

View Article


Image may be NSFW.
Clik here to view.

How to reduce area boundaries resolution?

I managed to plot zip codes boundaries for an entire US state using ArcGIS data and python tools such as arcpy and Bokeh. The result: The dataset has high resolution area boundaries so, I have like...

View Article

Buffer ring problem with uses of make feature layer

Im trying to create a buffer ring shape but gets me the error 210: arcgisscripting.ExecuteError: ERROR 000210: Cannot create output C:Trabajo CartoTempPrograma”capa de Ringbuff70″.shp Failed to execute...

View Article

Replacing arcpy.AddMessage() with open source?

I’ve recently inherited some old python scripts that contained ArcPy modules. I’m using version 10.0. I am looking for an error messaging system that replaces arcpy.AddMessage()?

View Article
Browsing all 767 articles
Browse latest View live