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

learn more… | top users | synonyms (1)

0
votes
1answer
60 views

How do I create a new feature class from an existing FC and a WHERE clause?

I have a feature class. I want to copy the FC and use a WHERE clause to limit the rows copied. I tried using the CopyFeatures_management but it throws an error on the CopyFeatures_management() line. ...
1
vote
1answer
33 views

How do I omit the field mapping in a Copy As Python Snippet?

I performed a task ArcMap 10.1, using the Spatial Join tool in the toolbox. Then, from the Results widows, right-click and select Copy As Python Snippet. This will be the basis for a script that will ...
1
vote
2answers
108 views

Setting field equal to raster Name ID for batch process in ArcPy

I am wanting to set an existing field called RasterID to the name of the raster for which the attribute table belongs to, but for a batch of rasters. Is there a way to do this with my current code ...
1
vote
1answer
61 views

Connect to postgresql using ARCSDESQLExecute

I'm trying to connect to a postgresql database using ARCSDESQLExecute from ArcPy. When running my script as stand alone (debug from pyscripter) it works fine. When running my script as a tool from ...
0
votes
0answers
81 views

Django with arcpy 10.3: RasterDB.dll problem

I am working on a Django application and I need to be able to work with arcpy for geoprocessing. I have installed the Anaconda python distribution to use as the python for Django, because it has conda ...
0
votes
1answer
60 views

Interpolating rasters into a mosaic from point data using LayerTime object python code

While trying to run the ArcGIS provided python script to interpolate a bunch of rasters on a time-enabled point feature class file I get the following error: Runtime error Traceback (most recent ...
0
votes
1answer
103 views

Changing data source of ArcSDE layers to replace connection and names in thousands of MXDs?

I am facing a situation in wich our GIS data provider changed the path to their SDE Data server, and also changed the names of the the layers in their SDE Data. Need to do changes on thousands of ...
4
votes
1answer
57 views

Arcpy describe raster colormap

Does anyone know a way to use arcpy.describe to see if there is a colormap on a raster? Can't find anything in the help.
3
votes
2answers
133 views

Using ArcPy to zoom to Y,X (string) coordinate pair copy/pasted from Google Maps?

I frequently use google maps to find locations, and paste the coordinates into the "go to XY" toolbar in decimal degrees. It's a bit repetitive to paste the latitude into one box, and the longitude ...
1
vote
2answers
134 views

Prevent arcpy.Append from crashing if data is too long for field

We're appending a bunch of information from somebody else's database into ours. Much of it is text information, and the origin database doesn't appear to have much limit on the length of those ...
1
vote
0answers
29 views

Equivalent method to arcpy.Raster(), but for a TIN [closed]

I am creating a Python script in a toolbox in ArcGIS 10.0. When the input dataset is a raster, I can use: myRaster = arcpy.Raster('elevation') What should I do when the input dataset is a TIN? Is ...
1
vote
1answer
67 views

Accessing advanced symbol levels with python in ArcMap

Does anyone know if it is possible to access the symbolgy levels in ArcGIS10 with python? I have a layer "temp" that I print to a pdf. The symbology is printed correctly but is drawn in the wrong ...
1
vote
1answer
81 views

Cause of ERROR 000732: Input Layer: Dataset plan does not exist or is not supported?

I have several mxds (located in C:\Project ) that have 250 layers each. All the layers as the same name- "plan" and they all in group layers like that (added picture for example): I try to change ...
0
votes
1answer
64 views

How to apply the 'Integrate' tool (data management) using arcpy

I try to integrate two features (shapes) with their ranks using arcpy. -- arcpy.Integrate_management() -- I don't get a clue from the explanation/example in ArcGIS help. It's straight forward, ...
0
votes
1answer
76 views

ArcGIS Spatial Analyst in arcpy - FATAL ERROR (INFDEF) DIRECTORY FULL

I have been running into this error in several geoprocessing scripts I've written lately. When I call a spatial analyst function I return this error: FATAL ERROR (INFDEF) DIRECTORY FULL import ...
0
votes
2answers
24 views

Arcpy/python Syntax Error. Variable Creation

I'm having a problem when trying to create a new variable within python. i = datetime.datetime.now() tme = i.strftime('%d/%m/%Y') print tme This portion of the code creates a date variable (tme) in ...
6
votes
1answer
65 views

Is the column order returned by arcpy.ListFields() always the same?

I'm using arcpy.ListFields() to get a list of fields in my Feature Class. Based on my limited testing of several geodatabases and tables, the order of fields returned is the field order specified in ...
0
votes
1answer
55 views

Select by location and copy to new shape and name based on attribute

I have a point features and polygon features. I need to: Select points that intersect the polygons Copy the points to a new shapefile Name this new point shapefile using an attribute of the polygon ...
0
votes
1answer
71 views

Finding Pseudo Nodes using ArcGIS for Desktop?

Trying to write a python scrip to find and dissolve pseudo nodes for a large dataset. Anyone have any code to perform such a task? For example, I have a road line with several end/start nodes ...
0
votes
1answer
169 views

Error in python code for loop using SearchCursor, selectlayerbyattribute, and copyfeatures tools

I am fairly new to python scripting for ArcGIS. I am trying to create maps where each county is selected and then copied into a new layer with only that county's data. Then, I used ApplySymbologyFrom ...
2
votes
1answer
221 views

How to check if an ArcGIS extension has already been checked out manually in arcpy?

I've written a python script that uses a Spatial Analyst function and hence requires the Spatial Analyst extension to be enabled. I would like to be able to check out the extension only if it hasn't ...
0
votes
0answers
17 views

Importing XML Schema, Update/Delete Field Names

Presently, I am trying to write a script to import a XML workspace that contains the outline of schema. I want to create a tool/script that allows the user to import it, specify the number of certain ...
0
votes
2answers
126 views

RuntimeError: Underlying DBMS error ORA-00936: missing expression schema.tableName STATE_ID is not column in table?

I created a search cursor to retrieve some data from a feature class. The broken example shown below is used successfully in other scripts I created. The only difference that comes to mind is I'm ...
2
votes
2answers
61 views

How to flip a polyline based on a separate polyline feature class being left or right to it

Can't go into detail about what these features actually are but I will just refer to them as the green line and the black line. The black lines are not able to ever overlap the blue polygons. Black ...
0
votes
1answer
57 views

GetParameterAsText(arcpy) does not work

I am new in this area. I was practicing the function GetParameterAsText(). I know that when you run the code (for example in PythonWin) it works like the function raw_input(), therefore it should ...
1
vote
1answer
202 views

Error: 'NoneType' object is not iterable (arcpy.ListRasters)

I am trying to extract a raster through a particular shapefile. import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") env.overwriteOutput = True ...
0
votes
1answer
91 views

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 ...
2
votes
1answer
114 views

How to list items in a raster catalog?

I have a managed raster catalog in a file geodatabase that is comprised of 12 images. The screenshot shows the raster catalog footprint with the names of the tiff images that make up the raster ...
0
votes
1answer
76 views

Merge Feature Records with Identical Parameters in Two Different Fields using ArcPy or SQL [SOLVED]

I'm trying to merge feature records based on identical parameters in two different fields using Python or SQL. I have a polygon feature class with ~800 records, that I've intersected with another ...
0
votes
1answer
68 views

FeatureClassToFeatureClass_conversion taking too long

I wrote a python script in order to get all features near a point and its distances. To reach that, I'm using LocateFeaturesAlongRoutes_lr, then performing a join with a feature layer and finally ...
0
votes
1answer
47 views

Update Cursor not updating field correctly [closed]

I've got an issue with an update cursor not working correctly. The kicker is that when I dissolve by the field that isn't updating correctly, the output is actually correct. I have the same syntax on ...
1
vote
1answer
82 views

How to define NoData values in the ArcPy Clip raster tool?

I'm clipping some rasters with the ArcPy Clip tool (from the raster toolset) and a polygon feature and I'm having some problems with nodata values. The script I'm using is based on the code from ...
2
votes
1answer
99 views

Why does thumbnail on one MXD not update?"

I want to make modification on multi-mxd properties, I try Arcpy script with a loop like " for mxd in mxdList:" , but I always have same results, Thumbnails are not created... import arcpy,os ...
1
vote
2answers
112 views

Intersection point of polygon and the line created by two points ArcPy

I have polygon layer. I selected the most distant vertex from centroid (picture: point A). (How to do that is in the answer here: Select the most distant vertex from polygon's centroid using ...
2
votes
1answer
303 views

Recomendations about graphic interface for arcpy/python script

I have done some scripting using arcpy and python, and I want to make some interface to select some .shp. What are the best graphic tool for python to make this? I dont need high detailed graphics.
1
vote
2answers
629 views

arcpy.mapping.ListLayers() without calling current mxd document

my question is how can I use the arcpy.mapping.ListLayers() function without calling the current mxd? I'm hoping to run the python script without having an ArcMap document open. My setsymbology code ...
1
vote
0answers
38 views

Issues in projection while defining data frame extent by coordinates

I'm trying to set the following coordinates to a dataframe: custom_extent = {1:-87.678956, 2: -87.611652, 3:41.867129, 4:41.954932} where 1 is key for XMin, 2 is key for XMax, 3 is key for YMin, ...
1
vote
2answers
45 views

Creating Multiple Field Indexes Using Arcpy

I want to create a code that will take a feature class' fields and create indexes for each of them (because it is tedious to do it by hand). I'm trying to use arcpy.ListFields to get the fields and ...
0
votes
1answer
185 views

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 ...
0
votes
0answers
24 views

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. ...
1
vote
2answers
81 views

How to search by attribute using each row with Python?

I am trying to write a script to select each individual neighborhood using one FC, then use select by location to see the number of lots from another FC that are in the neighborhood and store that ...
2
votes
0answers
44 views

Updating Cursor to Include Newly Created Features

I am using ArcMap 10.1 and python to create cursor that starts at the one and only row of a polyline shapefile, some code runs to create a new feature based on the position of the exisiting feature, ...
0
votes
0answers
78 views

ArcGIS Execute error - Cannot Delete - May be locked

I have a problem deleting rasters from an outputfolder if I run the same script 2 times, because the code of my script is very long I tried to narrow down the possible problems by writing this little ...
2
votes
0answers
54 views

Invalid MXD Filename error in one script, but not the other

I have created 2 geometric trace models for a project, one to pick a spot on the network and run an isolation, and the other to choose from a list of buildings, then then run a trace to find features ...
1
vote
1answer
53 views

Field Calculator Python Issues [closed]

How can I adapt the following expression in the ArcGIS field calculator? Below is the python code: import arcpy fc = "2014_2" keyField = "ID_segment" affectedField = "KKN2" maxVal = 2500 cnt = 1 ...
0
votes
1answer
51 views

Copying similar files from geodatabases into single geodatabase using ArcPy?

I'm trying to copy files form multiple geodatabses into a single database. I'm looking for two subclasses. Here's the code so far, it isolates the feature classes but when I try to run the search ...
2
votes
2answers
458 views

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 ...
4
votes
3answers
141 views

Select the most distant vertex from polygon's centroid using ArcPy

I have a poligon and the polygon's centroid. I want to select the most distant vertex from centroid (picture: point A). I used arcpy.FeatureVerticesToPoints_management to create a feature class ...
0
votes
0answers
62 views

how to apply automatically current visualization option in NetCDF files using arcpy.mapping?

I am trying to create a time series animation automatically from NetCDF files, containing each file monthly data for the whole planet for periods of 10 years. I am writing a python script that reads ...
1
vote
0answers
62 views

Group contiguous polygons by sum of values [duplicate]

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous ...