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

learn more… | top users | synonyms (7)

0
votes
1answer
12 views

Sublayers do not exist or are not supported in the geoprocessing tool?

I'm trying to batch export selected layers that I drag and drop in the tool that I've created by a selecting feature class. It's working when features are input from the source and layers in TOC. ...
0
votes
0answers
16 views

using arcpy.SearchCursor for multivalue field [on hold]

I need to make a multivalue field to be selected as:   Input_Features = arcpy.GetParameterAsText (0) Num_Pop = arcpy.GetParameterAsText (1) And be calculated for each field chosen Num_Pop a ...
1
vote
2answers
14 views

Arcpy label white color

I have this label expression within a function that works great. I want to turn the color to white. lblClass.expression = '"{}" + [OBJECTID] + "{}"'.format("<FNT size = '10'>","</FNT>") ...
0
votes
2answers
28 views

Arcpy Select by attributes IN operator with Tuple

I have two layers 1. Buffer zones with a string ID 2. the same buffer zones with the String ID plus an extra field call it zone B *this process is taking place within a loop already, just to give ...
0
votes
0answers
32 views

How to know when a program finished when they run in background? [on hold]

I'm using ArcGIS 10.2 to create an interface. I'm using Python 2.7 to call and run Gams in background using: import subprocess ...
2
votes
0answers
38 views

Reading Jp2 compression level using ArcPy?

Is the compression quality level used to create a JPEG2000 image stored somewhere inside the file, and how to read it? I would like to know if my images where generated using a lossless compression ...
1
vote
1answer
22 views

Zonal Statistics ArcMap 10.4

I have a problem using Zonal statistics in python using ArcMap 10.4. This is a completely random error, and I have no idea what to do. Some back ground is that I have been running a script doing ...
1
vote
1answer
30 views

Finding tool to divide polygon into specific areas in ArcGIS?

I am using ArcGIS 10.3.1 and am trying to divide a polygon into several smaller polygons based on a percentage. I have found a theoretical answer How to divide a polygon into specific sizes using ...
2
votes
0answers
94 views
+50

ArcPy - Get number of intersected points based on attribute

I am trying to get a number of points in polygons based on row values, and write them into attribute table of polygons. I have polygon (Zones), and points (Objects with fields such as schools, ...
0
votes
1answer
51 views

Update rows based on other rows as script tool?

I am trying to convert python script to tool. Tool would update row values based on other row values. For example, if in row One values are Water, Rivers, Streams, in row Two, updated values would be ...
3
votes
0answers
29 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
38 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
30 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
23 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. ...
4
votes
1answer
79 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
15 views

How so I solve FDO error: 0?

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
23 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 ...
4
votes
1answer
56 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
26 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
33 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?
0
votes
0answers
34 views

Authenticating to ArcGIS Online Server with ArcObjects / python

Below is working script that outputs a layer file from an arcgis Server feature service (AGOL or AGS) I am struggling to implement the authentication needed to access the secured services in AGOL. ...
1
vote
2answers
45 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
41 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 == ...
0
votes
0answers
22 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
23 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
35 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
20 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
28 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
30 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 ...
0
votes
0answers
17 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
32 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
33 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
24 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
28 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
21 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, ...
0
votes
0answers
17 views

Using Python to copy the “Export Data” feature [closed]

Complete newbie here looking for some assistance. I need to convert a shapefile into a KML file and as i do this often was looking at Python to automate it. The shapefile has a join to another ...
1
vote
0answers
33 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
16 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. ...
-1
votes
0answers
30 views

help in syntax arcpy.PointDistance_analysis

I can`t run this syntax in Python import arcpy arcpy.env.workspace = "C:\\Users\\aseel\\Desktop\\Project_pointDistanc\\PointDistance.gdb" in_features = "base" near_features = "dependent" ...
-4
votes
1answer
33 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
82 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
48 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
36 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
20 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
34 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
90 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
55 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
29 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
76 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
46 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: ...