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

learn more… | top users | synonyms (1)

1
vote
1answer
40 views

Arcpy - handling intermediate raster files

I have 8,760 (24*365) GRID rasters in a directory. I'd like to use use FocalStatistics analysis to reassign cells to the maximum of a 5x5 window/kernel and extract the resultant values at points ...
2
votes
1answer
116 views

Making Python Add-In using tools built in ModelBuilder?

I have made a set of tools in a toolbox using ArcGIS 10.2 using the model builder. I would like to distribute them as a tool bar, and so created a ArcGIS Python Add-In I was hoping that I could ...
4
votes
1answer
91 views

Buffering Points Directionally

I have about 10,000 points that I want to apply a partial circular buffer to based on an angle, from -30 to 135°. A similar question for polygons seems to have been answered here, but I cannot make ...
0
votes
0answers
36 views

Python script can't find custom module in ArcSDE

I've been working on a python script for some time. Its working well but I'm having trouble running it in SDE. My main issue is that the python script, when run in SDE, cannot find any of the ...
1
vote
1answer
32 views

arcpy.GetCount_managment not returning result in dialog window

I am having trouble with GetCount to work in my script. It is not printing the GetCount arcpy.AddMessage in the geoprocessing window dialog; # Get the spatial reference spatialRef = ...
0
votes
1answer
88 views

Select by location-arcpy

i work with arcview 10.3 on 20 mxd's (each mxd has 25 layers) and i try to do select by location (with arcpy) and want to see a layers that are visible in the current map extent only. All Other layers ...
0
votes
1answer
51 views

Arcpy - Updating fields using time.localtime()

My objective is to change the values under field "DATE_IMPOR" which are currently set at to the current time using time.localtime function. I'm having some problems getting there, above all one line ...
1
vote
1answer
38 views

Clipping rasters

We are clipping one raster to another and our teacher gave us this hint for the 2nd parameter "Remember that the Describe function returns an object. The Clip tool will need the string representation ...
0
votes
0answers
36 views

Import addresses from an Excel file via Python for route optimisation

relative newbie here. Apologies if this is very obvious or basic! I have created a route optimisation model through ArcGIS modelbuilder, then exported the Python script. Within the model I had a ...
2
votes
2answers
50 views

Assigning Default Value Using ModelBuilder?

Task: add several new fields to a feature class table and assign a default value to one of the fields. Software/Environment: Using ArcMap 10.2 (Advanced License) and Python 2.7. Data is stored in ...
0
votes
0answers
40 views

Error when loading ST_Geometry into SQLite

I have created a new .sqlite database running the arcpy code in ArcGIS 10.3 (with Python x86): import arcpy sqlite_database_path = 'C:/Data/Counties.sqlite' ...
0
votes
2answers
63 views

Placing message in geoprocessing progress dialog?

I am after a way on using arcpy.GetMessage to achieve the following message in the geoprocessing dialog result window?; The above 4 datasets have been reprojected to: WGS Web Mercator (auxiliary ...
1
vote
3answers
62 views

Shapefile list gone missing in dialog window

I have updated my script in ArcGIS 10.3 to include the copyFeatures_management geoprocessing tool because I want to only copy the features that already have the same projection, not reproject them; ...
0
votes
0answers
5 views

Turn-off layers in Arcscene using python [duplicate]

I am trying to turn off the layers in ArcScene when a sxd file is opened. sxd files are not supported by arcpy mapping. Is there any other way to use python for the same? Previously I was doing this ...
0
votes
1answer
65 views

AttributeError: Result object has no attribute save (when trying to save output in separate directory)?

I am trying to convert more than 100 ascii files to raster using python code. All the lines (except Last two) in my code presented below is successfully converting Ascii to tif format in the working ...
2
votes
1answer
118 views

DBSCAN gives “AttributeError: NoneType has no attribute issparse”

I am running a Python script invoking the DBSCAN tool to cluster feature points. When I open ArcMap, load the feature layer, and run the script, it works the way I expect it to. But if I run it ...
0
votes
1answer
66 views

Using the mouse to select records in ArcPy

I am running ArcGIS 10.1 Basic license with Python 2.7.2. I have a two spatial files: the first listing vessel positions and the second activity on board. I also have a collection of reports in ...
2
votes
1answer
84 views

ArcSDE reconcile versions and keep edit version in its current state

Reconciling versions makes both target and source(s) point to the same state. I have an arcpy script that essentially will create a version from a parent of the db - in a state that is empty - adds ...
0
votes
0answers
15 views

Manually chosing a record in ArcPy [duplicate]

I am running ArcGIS 10.1 Basic license with Python 2.7.2. I have a two spatial files: the first listing vessel postions and the second activity on board. I also have a collection of reports in Excel ...
2
votes
0answers
68 views

Python Script to iterate numerous, single-band rasters for arcpy.CompositeBands

I have a large collection of single-band geotiffs (NIR, Green, and Red) that I would like to composite using a Python script. The goal is to iterate through multiple folders in a main directory, ...
0
votes
1answer
42 views

A script that only deletes fields within an attribute table specified by the user

I would like a script that will be executed in ArcGIS that only deletes fields within an attribute table that are specified by the user. As I understand it, this can be done in Modelbuilder but was ...
0
votes
2answers
73 views

Add in copyfeatures into script

I am having trouble with CopyFeatures in my script. The files went being copied to the output folder. Can someone please assist. Here's a snippet of my script for ArcGIS 10.3; #Loop through shapfiles ...
0
votes
2answers
62 views

Combine string and OBJECT ID

I would like to update the Map_Feature_ID field with a String " WP_" and then follow the "WP_" with the OBJECTID field. So I will end up with "WP_1", "WP_2" all the way to the end in the Map Feature ...
1
vote
4answers
248 views

Using Python new line (\n) with ArcGIS geoprocessing progress dialog? [closed]

I am currently using in my ArcGIS 10.3 toolbox script; # Get the spatial reference spatialRef = arcpy.Describe(template).spatialReference.name #Loop through shapfiles in folder and reproject for fc ...
-1
votes
1answer
101 views

Rewriting VB codeblock as Python for ArcGIS Field Calculator?

I am looking for assistance to rewrite my VB codeblock into Python. Im on Win7, Arc10.2 and Python 2.7 The code below works fine for me, I am simply looking to port it to Python so i can progress down ...
1
vote
0answers
75 views

Batch Convert GRID to TIFF with colormap and RGB

There are lots of questions on here regarding raster conversion, but I can't find anything specific to my needs (involving output as RGB and using a Colormap). I have a folder full of ESRI GRID ...
1
vote
3answers
81 views

Removing filepath from ArcGIS geoprocessing result?

This is my python script code in ArcGIS 10.3; projectResult = arcpy.Project_management(fc, outFolder + "\\" + fc, template) #Name of shapefiles re-projected arcpy.AddMessage(projectResult) ...
1
vote
2answers
64 views

Adding shapefile names in message to progress window/dialog of ArcGIS for Desktop from ArcPy?

How do you use python in a ArcGIS 10.3 script to list/print the shapefiles with a message from the result of a geoprocessing tool in the progress window/dialog box. For example; abc.shp 1234.shp ...
0
votes
1answer
47 views

MakeFeatureLayer_management where_clause input by the user

I want to convert a script into a toolbox and one of the parameters is selecting cities with a population > than 500000 hab. I'm using the function MakeFeatureLayer_management. How can I do to ...
0
votes
2answers
73 views

How to remove layers that are not in visible df extent

I am working on ArcMap 10.3 and I have a map with 50 layers in it. I am trying to check if layers are in a data frame. Unlike How to check if layers in a dataframe with Arcpy, I want to define the ...
0
votes
0answers
19 views

why when I use python to program the exact same command as netcdf make a table tool, the table is empty? [duplicate]

If I use the ArcGIS tool "create a table view from netcdf file" eveything works great, but I need to automate a marge larger program. When I use the exact same tool in python, the table it creates is ...
0
votes
1answer
64 views

Using Python parser of ArcGIS Field Calculator to populate values in one field based on those in another?

I am trying to populate a field with a sorting code that represents the value of another field. Example: EXPCODE|SORT| S4DNN2 |3.5 H2BNN2 5.0 EXPCODE is a field with a value like "S4DNN2." SORT ...
1
vote
2answers
93 views

Syntax error running script in PythonWin after success in ArcPy

I am building a script to automate a water outage map(I'm new to Python). In the ArcGIS Desktop 10.1 window the script runs fine. However in Pythonwin and IDLE I get syntax errors(In Pythonwin reads: ...
2
votes
0answers
116 views

ArcGIS python toolbox: GPFeatureLayer parameter “loses” symbology type

I'm pretty new at ArcGIS python toolboxes. Here is one problem I've been fighting with for a while. I want to create an output layer (GPFeatureLayer) with a specific symbology (GRADUATED_COLORS) and ...
1
vote
0answers
45 views

netcdf python error

I am basically copying and pasting the code provided on Esri's website and every time I try to run it in ipython, the program crashes and needs to restart the kernels. The code is below, does anyone ...
1
vote
3answers
72 views

Project only required shapefiles in folder

I have 8 shapefiles in a folder with shapefile 1 and 8 in the same projection and the others (shapefile 2-7) if different projections. Is there a way to use python to use shapefile 1 as the ...
0
votes
0answers
54 views

Progress dialog box of ArcGIS Python script tool stealing focus from TKinter GUI?

I created a script tool in the custom toolbox, it runs like this: But the default progress dialog keep stealing focus from the Tkinter GUI, that makes me so hard to move/resize the OpenFileDialog, ...
0
votes
2answers
140 views

Multiprocessing with arcpy and Solar Analyst (spatial analyst)

I need help getting multiprocessing to work with the spatial analyst tool - Solar Analyst. I have tested the multiprocessing bit and it works fine. This sample is passing it a file containing 2 lines ...
2
votes
1answer
63 views

Using a for loop to execute a query in arcpy

I'm trying to provide the breakdown of fire detection for an area by sorting of confidence levels. The dataset has 12 files (one for each month in a year) with fire records which all have a column ...
0
votes
1answer
96 views

Updating field in feature class using ArcPy cursor?

I want to update a field in my feature class. I tried to use a da.SearchCursor (code below) but was quickly reminded that tuples are immutable... I ran the code but it failed with a TypeError: 'tuple' ...
-1
votes
1answer
37 views

How do I create a point buffer?

I have a collection of points. The goal is to create a buffer around each point. The radius maybe different for each point and is based on a series of calculations. Some wells might have 10+ ...
2
votes
2answers
54 views

Clipping raster python script stops abruptly?

I have created a tool in ArcGIS based on a python script that will clip a large raster dataset into smaller tiles based on a fishnet polygon feature class. The script iterates through each feature in ...
2
votes
1answer
48 views

Multiple Ring Buffer in ArcPy Generates Single Ring

I'm running a simple multiple ring buffer using ArcPy. My goal is to generate a multi ring buffer for each pond in my dataset of 50,000. Here's the line of code: ...
0
votes
1answer
28 views

is it possible to export map as png without having the webmap JSON?

I want to export the image of a map from a page that I don't have a map available. In other words I need to call a service where I will provide the definition expression of a feature layer, retrieve ...
3
votes
1answer
96 views

Number of items in a Combo Box

I'm developing a Combo Box for an ArcMap toolbar, that at present simply lists all of the layers that are in the table of contents. However the height of the drop-down menu is very small, and I cannot ...
1
vote
1answer
40 views

Saving each file in for loop gives ERROR 000872?

I am beginner to Python programming. I know, I am asking a really silly question. I am trying to extract DEM for each watershed from a bigger DEM. Therefore, I am using extract by mask. The bigger DEM ...
1
vote
1answer
133 views

Using Zonal Statistics As Table for overlapping polygons in ArcPy?

I'm using ArcGIS 10.2 for Desktop and would like to calculate the population within a specific distance from bus stops. My input layers are: census block (polygon) with population undissolved bus ...
0
votes
1answer
34 views

update cursor datetime if start date greater end date

I have 2 date fields in my feature class. If the start date is greater than the end date, I want to add 24 hours to the end date. I am getting a SetValue error. cursor = arcpy.UpdateCursor("PolyFc") ...
1
vote
1answer
56 views

Python - Projecting different shapefiles in the same folder

I have a few shapefiles in one folder with different coordinate systems but would like to use one of them as a template dataset. Is there a way to use python to filter out the shapefiles already in ...
1
vote
2answers
122 views

Using where clause to query date ranges in ArcPy

I would like to query a feature classes date range. For instance, if there is data within a 2 day range then I would like to print true or do something else. I thought arcpy.Exist would do the job, ...