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

learn more… | top users | synonyms (1)

0
votes
0answers
5 views

“select by attribute” error, when using getParameter

I'm developing an ArcGIS tool by Python. Below is a part of the inputs: StudyArea = arcpy.GetParameterAsText(0) LandCover = arcpy.GetParameterAsText(1) gridcode = arcpy.GetParameterAsText(2) ...
0
votes
1answer
14 views

Align and reshape polygons based on surrounding polylines

I am trying to use a shapefile with polygons and I am trying to align it to a road network, that the polygons align themselves to surrounding streets. Is there a way to automatize alignments between ...
1
vote
0answers
20 views

ArcGIS python add in to call python script for importing mdb data

im trying to change from a .net toolbar to a python toolbar in ArcGIS 10.2 and am having some difficulty. I have some stand alone python script which i know works and does what i need to do but i ...
0
votes
0answers
25 views

Insert NULL value in Arcgis table with python

I want to insert python tuples into an arcgis table. As you can see below pylist has some empty values (' ') which is basically 'String' type. These should be inserted as NULL in arcgis table field. ...
0
votes
2answers
31 views

How to get the parameter defined in one tool to another tool in same python toolbox?

This is what I am looking for: Create two tools in Python Toolbox: Tool1 and Tool2 (I am able to do that) I want to define a parameter in Tool2 whose value depends on parameter entered by user in ...
0
votes
0answers
19 views

How to dynamically create new parameters based on previously entered parameter in python toolbox?

This is what I am looking to create in a python toolbox: Create a parameter to get geodatabase (.gdb) file from the user. (the .gdb file has some number of feature classes) After user enters the gdb ...
1
vote
3answers
81 views

arcpy.mapping.MapDocument(“CURRENT”) fails when running python script in background as tool

The engineers I work with have requested an autosave feature for ArcGIS, so I thought I'd make them a python tool that routinely saves. The script works fine when run in the foreground, but fails when ...
0
votes
1answer
15 views

Update Description of Feature Class in SDE or GDB

I need to add a Description to a Feature Class using arcpy. The feature class lives in our enterprise geodatabase. The Feature Class does not live in an MXD file, nor will it ever for this script's ...
3
votes
4answers
57 views

Debugging ArcGIS Python scripts

I am new to Python and coding generally, and I cannot figure out how to set up a debugger that will work with Arcpy. I am trying to use PyCharm, but it always gets caught up with the fact that it ...
1
vote
1answer
35 views

Arcpy.da.SearchCursor to retrieve the min and max measure values from Polyline-M shape

Is there a way to use a search cursor in ArcGIS to read the minimum measure and maximum measure values of a linear referenced route layer using arcpy? My goal is to build a route event using the start ...
0
votes
1answer
25 views

Copy shapefile to SDE feature class using arcpy

Is it possible to copy shapefiles to SDE geodatabases using ArcPy? I have tried using Copy_management, but it says that it cannot copy between different workspaces. Is there a different function that ...
1
vote
1answer
58 views

Check fields data type before insertion to table

I am trying to insert a python list of tuples to arcgis table. there is type mismatch which is obvious. Each Value in tuples have different type and fields in table have different data types. So, ...
2
votes
1answer
34 views

Calculate Row if Row Value Equals Value in List

I have a folder of photos named with a building ID that corresponds to a building ID in a building footprints feature class. Not all rows in the footprints feature class have a corresponding photo. ...
1
vote
1answer
22 views

How do I batch input alias names from a table for a large dataset in ArcMap or ArcCatalog?

I would like to populate the alias names for the fields in the ACS 2014 5 year estimates file geodatabase (all 11439 of them). The ACS fgdb comes with the short_name and long_name in the metadata ...
0
votes
2answers
35 views

How do I go from the results of Calculate UTM Zone (Cartography) to a spatial reference object?

Calculate UTM Zone (Cartography) assigns a UTM zone to each feature within a feature class as a field value. The value returned is a 'UTM spatial reference string', which is a long string that looks ...
2
votes
1answer
60 views

Convert feature class names to lower case?

I'm simply trying to loop through the first immediate set of folders in a directory, then the GDB's, and finally the feature classes, however, now I get "ERROR 000840: The value is not a Data Element. ...
0
votes
0answers
45 views

Creating a point file with python from a pdf file

I have a 1500 pdf document that I need to extract latitude and longitude coordinates from. The Lat and long are formatted as one attribute so they need to be split plus there are a few other columns. ...
3
votes
1answer
94 views

How do I figure out the length of polyline features in a feature class with a WGS 1984 coordinate system?

I'm trying to figure out lengths of polyline features in a feature class with a WGS 1984 coordinate system. Here's code to list lengths: >>> import arcpy >>> inFc = ...
0
votes
0answers
25 views

Create individual feature classes for every record in a single feature class [duplicate]

I have arc desktop 10.3. I have a feature class (nycd) with 59 records in it. I'm trying to create a simple map with an inset that shows where each community district is located in that borough. I'd ...
0
votes
0answers
5 views

What is the default mosaic_method value for MakeMosaicLayer_management?

What is the default mosaic_method for MakeMosaicLayer_management (see help here)? Usually, the docs say This is the default after the default value. And that is usually first option listed. Is the ...
2
votes
0answers
46 views

Creating python script to split selected lines at a set length

I have been having trouble trying to come up with a python script that will go through a polyline feature class representing a river system and split all the streams intersecting with a central river ...
3
votes
1answer
73 views

Why does arcpy.ListFeatureClasses() take so incredibly long?

I'm having an issue where calling arcpy.ListFeatureClasses() in a workspace with 400 shapefiles takes a very long time (more than 10 minutes). Using the os module to achieve the same effect takes ...
0
votes
0answers
12 views

How do you use the setErrorMessage(message:string) within the ToolValidator Class?

The Programming ToolValidor Class ArcGIS Help menu states that: the following method: setErrorMessage(message:string) "Marks the parameter as having an error (a red X) with the supplied message. Tools ...
3
votes
0answers
30 views

Creating arc segment between two points with common field using Python?

I need to create Arc Segments between multiple points with like data using half the distance between the two like points as the radius of the arc segment. I would prefer to use python to ...
2
votes
0answers
40 views

Converting large rasters to NumPy

I have a geodatabase that contains a large number of raster datasets - there are two rasters for each country in the world, and they are very large, in some cases up to 3GB per raster dataset. I ...
0
votes
1answer
25 views

arcpy.da.SearchCursor, cannot read preceding zeros from csv

I'm using arcpy.da.SearchCursor to read a csv that has a column with preceding zeros, e.g.: myCSVColumn 0124578 12598 04589 012568 ... When using the arcpy.da.SearchCursor it returns the value w/o ...
3
votes
1answer
27 views

Set up tool to only accept the name of a specific feature class?

I'd like the red x to show in the corner of the tool if they try to load the wrong feature class. That way we can prevent possible errors with the output. I've tried using the error messages arcpy ...
2
votes
2answers
77 views

Copying features from 'in_memory' to 'in_memory' using ArcPy?

I came across this post and found out about Copy_management(). Is it possible to copy an in_memory feature to another in_memory feature? I tried to test it using the following code, which fails: ...
0
votes
0answers
14 views

About different IDEs for editing and debugging ArcPy [on hold]

When using the pre-installed Python IDLE of ArcGIS, i believe any of u must think which is very inconvenient on editing and debugging. So i'm starting consider using some different IDEs such as ...
0
votes
1answer
19 views

Debugging RuntimeError: Object: Error in getting parameter as text from arcpy.GetParameterAsText()?

I am trying to get this tool I've been writing for the past month operational. I think it should all work, but I'm getting caught up on the parameters of the code. Here is the start of the code that ...
0
votes
1answer
63 views

Making multiple fields NULL using Python in ArcGIS?

I have a repetitive task here at work. It requires that I make multiple fields NULL as I update the geodatabase. Is there a script I can write that I can input the fields and the feature class. Then ...
1
vote
1answer
56 views

Select from a list of string variables in a custom Python ArcGIS tool?

I've made a few Python tools for ArcGIS lately and haven't had to use this idea in my tools until now. I am making a looong tool that will deal with 13 different districts worth of data. I want the ...
0
votes
0answers
31 views

python (arcpy) command for Construct Polygons

I am looking for a python (arcpy) command for Construct Polygons. I am unable to find it in Esri help. So Is there a python command for Construct Polygon that I may have missed? OR Is there an ...
1
vote
2answers
56 views

How do I generate an image of each polygon in a shape file? [on hold]

I have shapefiles containing areas (states, counties, bodies of water, etc.) and need to generate an image (png / jpg) of each area. How can I do this? In my mind, the manual workflow would be: ...
1
vote
0answers
50 views

Speeding up ArcGIS arcpy.Merge_management for MANY files? [on hold]

I'm currently running a script that is using the arcpy.Merge_management function to merge roughly ~1500 shapefiles together. When I tried this with much smaller test runs, it ran perfectly. Now ...
2
votes
1answer
81 views

Creating subfolders in ArcPy's 'in_memory'

Is there a way to create a subfolder in memory in ArcPy? For example, instead of temporarily saving a dataset under: r'in_memory/bufferOne' I would like to save it under: ...
0
votes
1answer
52 views

how to update values from python list into feature class

I have a feature class and python list. Feature class has 80 fields and 500 records. List also has 80 sub-list and 500 elements in each. So basically they are same dimension so to say. I want to ...
1
vote
1answer
26 views

Access ArcGIS Server directories in geoprocessing service

I would like to save a file in the output folder on the ArcGIS Server and then provide a link for the user so he can download it. I have two problems: I can't figure out how to access the output ...
-1
votes
0answers
10 views

Select and Zoom from String Variable help? [closed]

New to GIS, and I'm not a programmer by any stretch of the imagination. I've looked at some previous examples and haven't been able to figure it out with the error messages I've been getting, and ...
0
votes
0answers
30 views

Using the projection of a layer variable to project another in ModelBuilder in ArcGIS (vector version) [closed]

I have several shapefiles in a folder (Folder X) with different coordinate systems (Proj 1 - eg. SAD69_UTM_Zone_21, SAD69_UTM_Zone_24) and another shapefile (shapefile 2) with another specific ...
4
votes
1answer
35 views

How to access the feature extent of a feature class using arcpy?

How can i access to feature extent of a feature class and change the extent using arcpy ?
0
votes
0answers
17 views

Achieving consistent RGB Composite Settings using ArcPy?

Does anyone know if there is an arcpy tool so that when I bring in raster imagery (Specifically Landsat) into ArcMap it will automatically adjust the settings of the RGB composite? I know under ...
0
votes
0answers
16 views

ArcPy ExportToPdf with Linked Word Document shows up as a blank space [closed]

I wrote my first script to automate the export of 13 mxds to pdfs and then merge them into a mapbook. This all works fine. All of the pdfs get exported and appear as they should with the exception ...
0
votes
0answers
11 views

Rendering textured city models along with depth information at arbitrary camera positions/translations [closed]

I'm trying to render (as realistically as possible) many different viewpoints of a city using a script. I'd like to be able to place the camera anywhere in the outdoor physical world (ie. not inside a ...
3
votes
1answer
59 views

Creating a ValueTable with a column that has dependency

I am creating a python tool which looks like the figure below. Input feature: It asks for a input feature class. Valuetable(Lookup tables): It has two columns - one for look up tables and another ...
1
vote
2answers
32 views

Python Installation and accessing Arcpy Libraries without ArcGIS Setup Installer?

As part of developing scripts and to save the other services/resources accessed by ArcGIS, is there a way or separate installer to install Python and ArcPy libraries alone without installing ArcMap?
0
votes
1answer
29 views

Identify polygons greater than n-th percentile and perform further analyses using arcpy

My goal is to identify tracts that are above the 99 percentile of a variable (xvar), to dissolve contiguous tracts by summing a variable (yvar), and to get the coordinates of the centroids ...
0
votes
0answers
22 views

How to Alter dictionary data format called from csv using python [closed]

I have a successful piece of python code that reads selected data from a csv and returns it in the following format.... Att_Dict = {'7643': '7625', '9644': '2289', '4406': '4443', '7588': '9681', ...
0
votes
2answers
37 views

Turning code into a script and parameterizing?

I have python code that I want to turn into a script. I want the end user to be able to navigate to the feature class the code should be run on. The code I have currently speaks to a specific ...
0
votes
1answer
55 views

Create and Find Shortest Path

In my project, I need to calculate each village's distance along a route to a seaport. However, as you can see in the picture, not all the villages are connected to roads already, so, first of all, ...