A site-package created by Esri to expose many ArcObjects to Python.

learn more… | top users | synonyms (1)

0
votes
0answers
27 views

Using Spatial Join to copy a single attribute

I am attempting to use Spatial Join to combine tax parcels and zoning information, such that the parcels contain the designation of the underlying zone. However, I only want to take the "esmZONE" ...
1
vote
1answer
37 views

SelectLayerByAttribute and Where Clause

I'm trying to select the minimum value from a field to select and export that one feature to a temp shp so I can copy the field data from the point to a line. So far I have this: import arcpy from ...
0
votes
0answers
22 views

Error 010092 for FeatureToRaster in Pythonwin

would someone be able to help me with this problem. As shown the process works for three files (of approx 1000) and then throw the Error 010092: Invalid Output Extent. All the files have been ...
0
votes
0answers
33 views

Display Geoprocessing results of Python Script [on hold]

I have a python script that batch processes shapefiles to reproject them. I would like to include in my script some code that prints the processing results to the shell. I'm not sure what block of ...
-1
votes
0answers
35 views

Using Cursors in Python to Create ratio of area to length in attribute table?

I am very new to both ArcGIS and Python and I am currently working on a problem I cannot seem to figure out how to do. I am trying to insert a table which has calculated the area to length ratio ...
3
votes
2answers
54 views

Looping field name change

I need to alter all of the field names through multiple feature classes. I have a pretty good idea of which tools to use but I'm not sure how to loop them through each feature class and each field. ...
4
votes
1answer
53 views

How to randomly move points?

I have a feature class with a large amount of points. My purpose is to randomly move these points to see what happens as a result. Are there specific tools or Python programming methods to accomplish ...
0
votes
0answers
20 views

ExportToPNG with definition query for unique values?

I have a MXD with a layer that has a field that has many values. I need to export multiple layouts to PNG, applying a definition query to show the unique values for that layer. i.e. Just show the ...
0
votes
2answers
37 views

Using SQL query with ArcPy?

I'm creating a tool that when you type in the city name it will select the city, zoom in and label it. I have the zoom and label working but can't figure out the SQL Query needed to select the city I ...
0
votes
0answers
23 views

How to geocode automatically through ArcPy without runtime error?

How to geocode automatically through ArcPy? My code always runs into runtime error. # Import system modules import arcpy # Set local variables: address_table = "C:\Users\Sibo\Dropbox ...
0
votes
0answers
25 views

Error when kriging: “output variance prediction raster”

I am trying to run a python script for kriging, but keep getting a following error message. It doesn't make any sense as the output variance prediction raster is optional. The code: # Create ...
2
votes
0answers
18 views

How to run Focal Stats on specific values in python

I'm a beginning programmer and am new to the site but it has helped me quite a bit so thank you! I'm trying to recreate a raster calculator operation using python scripts but am having a hard time ...
1
vote
1answer
24 views

ArcCatalog and python crash when running ConvertTimeField_management

I have a script which reclassifies a tif file, adds a new field to the tiff, and is supposed to parse the date from the filename and add it to the new date field. Everything works as it should, ...
0
votes
1answer
54 views

Geocoding arcpy slow startup time

When scripting with arcpy.GeocodeAddress_geocoding (http://resources.arcgis.com/en/help/main/10.2/index.html#//002600000006000000), there's always a major lag to start up the geocoder. The issue here ...
1
vote
1answer
15 views

Keeping layer name when exporting to CAD?

I am trying to export selected features from layers from SDE into a DXF using python, but it does not retain the layer name. But if I do it manually using the ArcToolbox tool, it does work. Example ...
0
votes
0answers
32 views

Perfom SQL queries in Python and process the result

I query column names from a PostGIS table with following Python code: colnames = [] sql_getcolumns = "select column_name from information_schema.columns where table_name='shp2py';" ...
-2
votes
1answer
83 views

Python script with ArcPy cursors won't stop looping?

I am running my script in ArcGIS 10.2 for Desktop and it doesn't stop processing. The process is overwriting itself because I have to shut down ArcMap manually. How can I stop the overwriting as its ...
0
votes
0answers
18 views

How to set floating point raster values to NoData when raster does not have valid statistics

I have a raster with some values of 99999 that I want to set to NoData in Arc 10.2.2. I've tried using the SetNull dialogue box, the SetNull arcpy function, and the Raster Calculator dialogue box as ...
3
votes
0answers
29 views

Field Calculator convert text to integer then populate new field with sum

I have a .dbf with about 50 text fields containing numerals, I would like to convert those to integers and then sum them all in a new double field I created, is there an easy field calculation that ...
1
vote
1answer
39 views

Add Item and Publish Service with ArcREST or ArcPy

I would like to have an automated process which does the following: Adds a CSV to our portaL/AGOL organization account. Publishes the item as a hosted feature service. Consumes hosted feature back ...
1
vote
1answer
14 views

Time.Sleep between arcpy.mapping.ExportToTIFF in Data Driven Pages

I'm building a code in Python to export in geotiff my imagery. I need specific spots so I created a Data Driven Pages with polygons. Everything works fine, except that my imagery layer takes a long ...
0
votes
0answers
28 views

arcpy fails to retrieve queried data from a layer using arcpy.da.SearchCursor

I am attempting to retrieve rows of data from an attribute table using arcpy. I have used a definition query on the data in ArcMap so that only one feature is present in the attribute table. I then ...
0
votes
2answers
41 views

Using Arcpy to search geodatabase for feature with smallest number of rows and export as .SHP

I have created a bunch of grids for a city boundary area. I would like to know how to use the Arcpy module to look through a geodatabase and find the grid with the smallest number of rows (assuming ...
0
votes
1answer
25 views

Find and Replace python script to replaces values in attribute table? [duplicate]

I am working on a stand alone script in python that will allow to me to specify a shapefile and being able to find a value and replace it with a new value. Does anyone know what code will allow me to ...
1
vote
2answers
42 views

Add folder name as attribute to all shapefiles in that folder

I have many folders with shapefiles in each of them. I want to use python to go through each folder, add a new field to all the shapefiles containing the folder name. Any ideas?
3
votes
0answers
22 views

Set picture marker symbol for a layer with arcpy (ArcGIS)

I have an ArcGIS map document with one layer symbolized with Categories > Unique values. I want to update symbology for this layer by specifying a path to a picture marker symbol for every unique ...
0
votes
0answers
16 views

Using a layer file from dropbox in ArcPy

Im wondering if anyone has had any luck using a layer file in ArcPy that is hosted remotely on something like Dropbox I'm trying to do myLayer = ...
-1
votes
1answer
60 views

searchcursor only takes first value in field

My script ArcGIS 10.2 is using the searchcursor to read the mLanduse feature class to return the value in lField, but it is only returning the first value in lField to populate the sField in mSoils. ...
0
votes
1answer
33 views

Using arcpy.mapping.ListLayers() with no filter, but some layers are missing in list

I am trying to use arcpy.mapping.ListLayers() to access and change some of the properties on specific layers in my mxd prior to printing to PDF. Here is a screen cap of my layer list: When ...
1
vote
2answers
36 views

Create Statewide Hydrologic Soil Group Map

This may be better for Engineering? Not sure. Background: Previously I have downloaded SSURGO soil data for the state of Pennsylvania by downloading each county and merging the shapefiles. I then ...
0
votes
1answer
49 views

Creating multiple fields with ranks using ArcPy?

While figuring out what I have to do, practically creating a field for each arrondise, and in each, rank each FID (which are part of the respective arrondise) by the size of its shape area. ...
-1
votes
0answers
47 views

Different ArcPy behavior in tools between ArcGIS Pro and ArcGIS for Desktop? [on hold]

I'm using ArcGIS Pro and ArcGIS 10.3 for Desktop. I made a python script where I projected several rasters with arcpy.ProjectRaster_management . Before projection the script set an extent (env.extent ...
0
votes
3answers
22 views

Ranking values by shape area using ArcPy

I'm trying to make a script that performs the following: it creates a new field that will hold values based on size of the shape area (from 1 to end of table), basically ranking them. I have a few ...
3
votes
1answer
37 views

When are the Workspace and its subfolders accessible in arcpy tools

I am wondering when I can access the workspace and its subfolders with Arcpy tools (using ArcGis 10.2). I have a raster in following directory: E:/folder/sub1/sub2/sub3/raster.tif Now I set the ...
0
votes
3answers
39 views

Creating layers for each attribute value via Arcpy script

I'm having some trouble starting this script. Not sure how to start, as I have to create/output layers for each attribute value from a certain column named that has integers. They are all unique ...
1
vote
1answer
44 views

Spatially Joining Many Shapefiles. Use Spatial Join or UpdateCursor?

I have a large number of tree records in 100s of point shapefiles. Each shapefile contains a number of trees that fall within 10-50 parcels. The parcel layer contains ~60,000 shapes. For each point ...
0
votes
1answer
35 views

Removing Slivers/Holes From Polygons using ArcGIS for Desktop?

I have a village level shapefile. Using Dissolve_management, I collapse the villages to district level. I also use Multi_Part option to prevent multiple entries for same polygon and so the resulting ...
0
votes
0answers
10 views

RuntimeError: ERROR 010240: Could not save raster dataset to G:\GHY_568\project\FlowDir_beth1 with output format GRID

import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") env.workspace = r"G:\GHY_568\project" #mystery_creek = r"G:\GHY_568\project\Mystery_Creek.shp" ...
0
votes
1answer
32 views

How to change output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script found in this post? import_path = r"..." # Path of .mxd ...
0
votes
1answer
17 views

How to specify raster name and how to designate the saved name of a created raster

import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") env.workspace = r"G:\GHY_568\project" mystery_creek = r"G:\GHY_568\project\Mystery_Creek.shp" ...
2
votes
0answers
54 views

arcpy.Delete_management does not delete the directory

I got a problem with Delete_management when I use the FeatureclassToCoverage_conversion function. I don't know why in the gdb I use (arcpy.env.scratchGDB), while the Delete_management is working, the ...
0
votes
1answer
40 views

Extracting from attribute tables by arcpy

I'm having some trouble connecting ideas on how to solve a problem. What I have is a shapefile from which I have to extract from one field, which contains 3 types of attributes (BS, RS, BRN). For each ...
0
votes
0answers
40 views

Functionality from Arcinfo to ArcSDE [closed]

If i have a polygon with attributes, when i cut the polygon in to two. the each polygon has to contain same attribute and a label has to be in the centroid of the polygon. example if I have a land ...
0
votes
1answer
58 views

Python geoprocessing tool for ArcGIS online

I am looking to create a geoprocessing tool using python in arcGIS 10.2 that will be used in the ArcGIS online web app builder. This will be my first tool for a web application and I would like some ...
-1
votes
4answers
127 views

arcpy search cursor not working

Im running my script in ArcGIS 10.2 and the dialog window says completed, but the empty fields in the 'SoilsType' row of the 'mSoils' Feature Class aren't getting populated with the values from the ...
1
vote
0answers
42 views

Import shapefiles into PostGIS using Python with psycopg2

I want to import shapefiles to PostGIS using Python with arcpy & psycopg2 to connect to PostGIS. I don't want to use the existing shapefile loader nor ogr, just write my own import tool. My steps ...
1
vote
1answer
22 views

Using “calculate field” in python script fails to display Arabic characters correctly

Using “calculate field” in python script fails to display Arabic characters correctly. I have exported the modelbuilder to python script, but unfortunately the Arabic characters cannot by displayed ...
4
votes
0answers
21 views

How to check spotheight in closed polyline contour data using ModelBuilder or ArcPy?

I'm new in using ModelBuilder or Python script. So, i have a set of contour data and a good contour data should contain a spotheight* in every closed polyline contour data. Is there any solution to ...
0
votes
1answer
21 views

Multiple SQL Queries in One Search Cursor (ArcPy) [closed]

I'm trying to make a search cursor which will take a compound SQL query, and while the search cursor continues to work, only the second part of the statement ("Population" >= 3000000) is being used to ...
1
vote
1answer
27 views

Using layer file to apply symbology to shapefile with ArcPy?

I have code that doesn't work at the moment: # Import arcpy module import arcpy # Script arguments Input = arcpy.GetParameterAsText(0) if Input == '#' or not Input: Input = "frame" # provide a ...