A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (8)

3
votes
0answers
31 views

using arcpy to convert labels to annotation [duplicate]

I am trying to use ArcPy to convert a specific shapefile in my TOC to annotation in the map. I am not so much in the need for the tiled annotation tool that I've seen talked about as this is going to ...
0
votes
2answers
42 views

Change text\ font size element using Arcpy

I try to change the font size and the element xy position of text element for several maps. Right now the font size is 21.79 and the xy position is: elm.elementPositionX = 8.204 elm.elementPositionY ...
2
votes
1answer
36 views

Exceptions for invalid files/ filenames that already exist in database

The script below is functional, but it runs into issues if it comes across duplicate files (even when overwriteOutput=True) and corrupt shapefiles when running feature to feature. Are there ...
0
votes
1answer
25 views

Feature Class to Feature Class using os.walk, fnmatch and renaming

I have a script for traversing a directory tree and finding shapefiles with a particular name. The issue I'm having is that the shapefiles are named improperly for databasing i.e. 20160527_Whatever....
4
votes
1answer
107 views

Converting python script to toolbox?

I am trying to convert my plain python script to script in ArcToolbox to share, where user can set input data (in this case, feature class). Unfortunately, Converting Python (ArcPy) script into tool ...
0
votes
1answer
105 views

How so I solve FDO error: 0? How do I get code that worked in a file geodatabase to work in an SDE version?

I used python add in to make a tool bar in Arcmap that edits features on a map. It works on a file geodatabase, but not on an ArcSDE version one. I've been getting an FDO error: 0. The potential ...
1
vote
0answers
40 views

Exporting Data Driven pages as JPEG with World File

I have a script that works to export my pages as jpegs, but I want to add the world file to them. I don't want to have to do all the {df} args and whatnot, I just want to skip to the world file. How ...
5
votes
1answer
73 views

Nested Con statement arcpy

I am trying to combine three conditions into one con statement line: ndvi_adjusted = Raster(ndvi_raw) * 0.004 - 0.08 con1 = Con(Raster(ndvi_adjusted) >= 0, ndvi_adjusted) con2 = Con(IsNull(con1), ...
0
votes
2answers
29 views

Arcpy fails to refresh page layout after changing the definitionQuery of a layer

I am trying to automate an export of map images in JPEG format. My script creates the map and exports it, but the export does not honor the changes made to the definitionQuery of the layer in the map (...
0
votes
1answer
41 views

Which is the faster way to copy data to another feature class: Feature Class to Feature Class or Insert Cursor

I have a feature class with 1 million records. Which is the faster way to copy data to another feature class: Feature Class to Feature Class or Insert Cursor?
1
vote
2answers
61 views

Why can't I open this workspace?

I used python add in to make a tool bar in Arcmap that edits features on a map. It works on a file geodatabase, but not on an ArcSDE version one. I've been getting an FDO error: 0. The solutions that ...
3
votes
1answer
49 views

arcpy label function string formatting

I have this function works totally fine. But i want to be able to change the font size def label(wah, field): for lyr in arcpy.mapping.ListLayers(mxd): if lyr.name == wah:...
0
votes
0answers
32 views

from lxml import etree; ImportError: DLL load failed: %1 is not a valid Win32 application

I am attempt to automate report writing within ArcMap with a program utilizing python-docx. Can anyone explain what this error means and how I should go about fixing it? from lxml import etree ...
0
votes
1answer
26 views

Arcpy label function

I have this function for labeling layers using arcpy This function works totally fine but I have the field hardcoded into the function def label(wah): for lyr in arcpy.mapping.ListLayers(mxd): ...
3
votes
1answer
41 views

Clear combo box in ArcMap Python Add-in

Recently created my first Python Add-In for ArcMap. It has been deployed for about a month now and the users like it. There is one thing I want to fix. The Add-in has two combo boxes: In #1 the ...
1
vote
1answer
24 views

Checking availability of ET Geowizards license

I would like to run a script that uses some tools from the ET Geowizards toolbox. I have a valid license for it but sometimes the license server at work is off. If the server is off then some of the ...
1
vote
1answer
30 views

Splitting shapefile into features and keeping attributes

I want to split a shapefile so each feature becomes its own shapefile. The below works: with arcpy.da.SearchCursor(catch10, ["FID", "SHAPE@"]) as cursor: for row in cursor: out_name = ...
1
vote
1answer
41 views

Finding correct service for arcpy.createArcSDEconnectionFile_management in ArcPy?

I'm working on a toolbar for modifying an SDE database in acrmaps. My code works in a file geodatabase so I'm trying to use this function to make it work in an ArcSDE. I've gotten every other variable ...
1
vote
1answer
30 views

Using ArcPy to compare two feature classes and export deltas

I would like to use a Python script to iterate through feature classes 1 and 2 and export the differences to a new table. So if feature class 1 contains 100 features and feature class two contains ...
1
vote
1answer
35 views

Arcpy Freezing on Field Calculation

I am trying to populate a grid with the number of features in each grid cell. I've gotten this script to work with a subset of the data, but when I try to run it on the full (52,000+) cell feature ...
1
vote
1answer
40 views

ArcGIS ArcPy update attachments table rows

Some background: We were using Collector on Android to collect data for a layer, and we found out that the pictures that were attached contained no EXIF tags at all, including the orientation tag - ...
2
votes
1answer
32 views

changing text in an MXD textbox with items from a list in ArcPy

I am trying to create a text label for a series of maps over time. I have a text box with the element name "DateBox" in my mxd. As a filler, it says "Week # here". I want to it say "Week XX", where XX ...
0
votes
0answers
33 views

Cannot get python-docx to work with Custom Tool : DLL load failed: %1 is not a valid Win32 application

I am currently using ArcMap 10.2, Python 2.7, and Anaconda aka SPYDER to make my output code populate a Microsoft word report. When I use the custom script tool this is the error message I receive: ...
0
votes
1answer
22 views

Eps files from map export are not containing a vector image

I have made a custom map export service, which exports my map in a range of formats. However I have noticed that .eps files, exported using the arcPy function: arcpy.mapping.ExportToEPS(mxd, ...
1
vote
0answers
41 views

Dynamically change labels/symbology to create multiple maps of the same dataset in ArcMap 10.1

I'm working in ArcMap 10.1. I have a data-set of multiple acreage fields that I am joining against a polygon shapefile. Let's say I have acreage fields X, Y & Z (in reality there about a dozen ...
0
votes
2answers
17 views

How to get Myriad Pro as font in ArcMap

I have an ArcPy script tool that exports a map with appropriate labels (10.1 SP1) and my coworker who made the original mxd that I'm basing it on is using Myriad Pro as the font for the text elements. ...
-4
votes
1answer
38 views

Getting nearest feature point from other features in point layer? [closed]

How i can do this Get the nearest feature point from the other features point in a point layer Point feature class and make it in script tool
3
votes
2answers
87 views

Scripting is not following the order?

I have a script that has several lines and include 3 arcpy functions such as copy features, make xy layer event, and apply symbology. Right below those tools I am trying to use the arcpy.mapping to ...
3
votes
1answer
50 views

Creating one layer through use of SQL queries for land use categories

I have a map with about 63 grids and trying to determine the land cover user category of the greatest area size in each grid. The land cover categories have been converted to polygons and I already ...
0
votes
0answers
37 views

Reverse Geocoding in ArcPy without creating new features?

I would like to reverse geocode an existing geodatabase of feature classes, but I don't want to create a new outputted feature class. I just want address attributes attached to my inputted features. ...
0
votes
0answers
23 views

Not able to apply update cursor on OS MasterMap feature classes created using OS Translator II

I am using OS Translator tool to convert OSMasterMap GZ files to PostgreSQL database. The feature classes created are query layers and cannot be edited in ArcGIS. Now I am writing a code to add new ...
0
votes
1answer
45 views

Using IPython if set ArcGIS's python as default kernel in spyder?

i install anaconda first then set the arcgis python 2.7.8 win32 as interpreter just like Importing arcpy in Spyder said,but why i cannot open my IPython then?
1
vote
1answer
100 views

error trying to create two variables Cannot acquire a lock

I am trying to create two variables one for x vertices and another for y vertices, when I leave the vertices as x, y the code runs but not when I separate the vertices into verticeX & verticeY ...
1
vote
3answers
63 views

Using arcpy.SearchCursor SQL clause?

I got a table with the name Predios like this: OBJECTID PRM_IDENTIFICA 1 4030200606130 2 403020060615 3 40302006011700 Can I use search cursor to find the records ...
1
vote
2answers
33 views

Calculate text field using python script and keeping preceding zeroes

I'm trying to calculate records in a text field to "01", keeping the preceding zero in tact using python script in ArcGis. I can do this easily using the field calculator in ArcMap or the calculate ...
5
votes
2answers
87 views

SQL MAX Subquery in arcpy.MakeFeatureLayer_management

I am having an issue with subsequent subqueries in making a feature layer in arcpy. My table has fields: OBJECTID, pointid (long), grid_code (double) I can successfully extract MAX(grid_code), ...
2
votes
1answer
51 views

Arcpy make raster layer function does not produce right output

I am trying to extract bands within rasters: import arcpy arcpy.env.workspace = 'd:/Rstack' raster_list = arcpy.ListRasters("*RADIOMETRY.tif", "TIF") list1 = [] for i in raster_list: arcpy....
0
votes
1answer
58 views

Python Script to update all feature classes/datasets in gdb with search and update cursor?

I have two geodatabases, one is a production sde database, the other is a backup in a local file geodatabase. The script runs as a task once a month and is very resource intensive. I am using ArcGIS ...
3
votes
1answer
109 views

Using erase tool in Python?

I am trying to create a python scrip to batch erase shapefiles. I have created a script that works, however, I know there is a better way and I just am not good enough at scripting to figure it out. ...
3
votes
2answers
57 views

Alternative to 'Editors Merge' feature using Arcpy

I'm looking for a work around that has had me in a pickle for sometime. It involves combining a multi-part feature polygon into a single feature. Obviously if you were editing a shape you would select ...
1
vote
0answers
29 views

Prevent ModelBuilder Tools From Running if Published to ArcGIS Server

I'm looking for a way to prevent an ArcGIS ModelBuilder tool from running if it's been published to ArcGIS Server. Or, even better, for a way to prevent the tool from being published to Server in the ...
1
vote
1answer
34 views

Is it possible to make an installer for a published tool, to install the tool to someone else's ArcGIS server?

I have a geoprocessing tool that works on my instance of ArcGIS for server. Is there a way to easily install this on someone else's Server, without having them run the tool and publish it through ...
4
votes
1answer
70 views

Time Delay in Importing ArcPy

I've got a few on demand scripts via the web that run ArcGIS in the background via Arcpy. Now, every one of these scripts takes a solid 15-30 seconds to run, which I find okay. After doing some trial ...
0
votes
1answer
21 views

Arcpy TabletoExcel input error

I have a very big dataset in a gbd. I would like to export it to an excel file. I use the following code: startingP = r"C:\Directory\ArcGIS\By_Coding.gdb\MyInput" endingP = r"C:\Directory\ArcGIS\...
3
votes
1answer
62 views

How to use search cursor in a given extent

I want to perform a selective search cursor for a feature class for a given extent. I have tried setting env.extent in the below code but it is returning the whole feature class instead of a fixed ...
-1
votes
1answer
45 views

How to aggregate a list of raster in Composite Bands arcgis

I created a list of raster using ListRaster. However, composite band tool does not support list input. I want aggregate the list of raster into one raster, is there any other tool to do it in ArcGIS(...
3
votes
1answer
37 views

Select Features within a distance and direction

Is there a way to select features in a layer by location based on their proximity to another feature and the direction? E.G., select all features within 10 meters north of current selection? I am ...
1
vote
0answers
46 views

Can a map be added to a report generated through ExportReport using Python?

I am currently able to generate a PDF report using arcpy's ExportReport that contains attribute information for records within an attribute table, but is there a way to add a map to that report, as ...
1
vote
0answers
37 views

Arcpy ApplySymbologyFromLayer color problems with extent

I am batch automating PDF maps with many overlapping layers and many different symbology colors. When the map is zoomed far out- two of the layers, lets call it line1 (the only blue layer) and line2 (...