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

learn more… | top users | synonyms (1)

4
votes
2answers
2k views

How to create reports in ArcGIS using Python?

Does anyone have experience in creating reports from your ArcGIS data (geodatabase, map exports) using a python reporting engine? In my current project, we are using Jasper Reports in the following ...
0
votes
2answers
434 views

Why does TableToTable give ERROR 000732 when published to ArcGIS Server?

I have a python code that uses ArcPy command "arcpy.TableToTable_conversion" to convert a database table to a dbf file. arcpy.TableToTable_conversion The input table is from a SQL Server database ...
1
vote
1answer
68 views

LASToMultiPoint_3d

Trying to use the arcgis python command LAStoMultipoint_3d as seen here. I'm running the code snippet against one of my LAS files. It creates a .shp, sbx, shp.xml, shx and dbf file. However, the ...
3
votes
2answers
2k views

Using arcpy from the command line on ArcGIS Linux Server 10.1

We installed ArcGIS SERVER (not Desktop!) 10.1 on a RHEL (Red Hat) machine. ArcGIS Sever is supported for Linux. However, it appears they don't make it easy to script in python, from the command ...
2
votes
0answers
290 views

On using R data with ArcPy to make histogram in ArcMap

I am writing a tool in python which passes parameters to a R script, which in turn creates a DBF file. I read this DBF and want to make a histogram out of the data inside ArcMap as one of the results ...
5
votes
1answer
3k views

Lidar - Automated building extraction (Improve Process)

I have the following process for automatically creating building outlines/footprints from Las files and was wondering if anyone can help improve it or has suggestions for other processes to use? ...
7
votes
1answer
428 views

Arcpy crashes in loop geoprocessing (general behaviour)

I have several standalone scripts that create a list of shapefiles to process (or coverages in one of the scripts). Sometimes my script crashes after it processes three files, sometimes ten, ...
1
vote
2answers
501 views

Script to extract UTM Zone using Range and Meridian information

Hi Everyone, I am looking for a phython or php script that will accept the Range and Meridian values of a location and use it to identify the UTM zone. I have a table that comprises of Easting, ...
4
votes
1answer
816 views

Is it possible to sort an arcpy.da.UpdateCursor()?

I have an ArcPy Data Access update cursor that I would like to sort before making updates to it. The cursor makes updates if I don't sort, but if I add a sort to the cursor I get an error, ...
2
votes
2answers
423 views

Using osgeo modules in ArcGIS10.1 and QGIS 1.8 python shells

This is related to an old question of mine - Issues with osgeo - qgis.core and arcpy modules Now in new versions of all the software QGIS Lisboa (1.8), ArcGIS 10.1 and pyScripter 2.5.3. They all use ...
5
votes
2answers
1k views

arcpy.UpdateCursor for multiple fields

I've hit a wall trying to loop through multiple fields with arcpy.UpdateCursor. I have a list of files (2) with multiple fields (10-15'ish) that have its own error check in SQL, and an error value to ...
3
votes
1answer
1k views

insert cursor “Row contains a bad value”

I'm having a problem copying data from a shapefile to a feature class using an insert cursor. Here is the part that is causing trouble: newRows = arcpy.InsertCursor(Target) sourceRows = ...
2
votes
1answer
358 views

How to write XML attributes from feature with ArcView license?

I need to generate xml of attribute data of a feature, but I have only Arcview license so, I can't use Export XML tool. What are my options? What is wrong with this code (after applying search ...
5
votes
3answers
4k views

Remove lock on feature class

When i try to delete a feature class , after or during the use of an Arcgis engine app which uses the same feature class i got an error concerning the lock , so i can't get ride of this lock until i ...
0
votes
1answer
412 views

Vector boundary generation -similar to Image Boundary

I want to automate the creation of boundary polygons from vector files. This is not footprint or extent creation (I already have scripts to do this). I want to create a tool similar to the QGIS, Image ...
4
votes
2answers
1k views

Python script to implement a batch import of CAD files into Geodatabase

Please does anyone know where I can get a python script that can do a batch import of CAD files into a Geodatabase. I have one I wrote here, but it is only able to import one CAD file at a time. It ...
28
votes
2answers
1k views

Streamlining Python Code for Big Data

I have Python code which is designed to take point shapefiles through the following workflow: Merge points Integrate points, such that any points within 1 m of each other become one point Create ...
2
votes
3answers
258 views

Simple script in ArcPy to analyze building proximity to restaurants

I am trying to make a script that will go through buildings in a shapefile row-by-row and do a count of points within .25, .5,...1 mile of it. The other points are restaurants. import arcpy ...
0
votes
1answer
475 views

How to create a report of all feature classes in a geodatabase?

I am not getting any response from this script and no error displayed at all I am writing this script to help me display the feature classes in my geodatabase Here is my script import arcpy ...
1
vote
2answers
497 views

UTM coordinate conversion to Geographic coordinates

I have about 500 separate files containing GPS points in UTM coordinates from multiple zones. I am looking for a simple and fast python or Php script that i can use to carry out a batch conversion ...
0
votes
2answers
753 views

trouble with UpdateCursor where clause in arcgis 10.1

I'm trying to use UpdateCursor in arcpy, but the where clause I'm using seems to be causing trouble. However, when I open up the table in ArcMap and use Select By Attributes with the exact same clause ...
4
votes
2answers
1k views

arcgis python script to tool issue

I have a script to investigate mxd's and save them as lyr symbology/kmz and sld which works fine when run from the .py but does not run when used as a tool from arctoolbox. I have tried ...
2
votes
1answer
1k views

Building a Polygon from an array of points in Arcobjects and C#

I have seen this code in Arcpy which is used to create a Polygon from a string of Points(X , Y).Can you please let me know how I can us something like this which can generate polygon from an array of ...
1
vote
1answer
183 views

UpdateCursor to insert DDM values from a layer in WGS84?

I have a layer in WGS84 (Geographic, DD) that I need to label in DDM (Degrees Decimal Minutes). I need to calculate within an arcpy UpDateCursor, a label field with DDM in it. I saw that you can run ...
7
votes
1answer
469 views

How to simulate moving vehicles?

I have a point layer (stored in SQL Server 2008) that is being served up by a map service in ArcGIS Server 10.1. I am consuming this service in a web client. Lets say the points are boats out at ...
1
vote
0answers
46 views

Remove a Layer using Arcpy [duplicate]

Possible Duplicate: How can I remove a feature layer in an Arcpy Script This question could seem too stupid, but i'm struggling with it, and it cannot work. I have an mxd file containing ...
3
votes
2answers
682 views

Comparing two shapefiles based on ID and spatial

I have two shapefiles that contain position information for individuals, one is their reported location (line segments) and the other is their high-frequency recorded location (point data); they have ...
4
votes
1answer
874 views

ArcPy performance issues with an UpdateCursor when sorting

I'm hoping that someone will be able to help me here. I have written a short ArcGIS Python script (mainly cobbled together from other examples) that sorts a feature class ascending based on two fields ...
4
votes
1answer
426 views

Why do I lose my printer settings when saving a copy of mxd from ArcPy?

Judging from the answer to this question, one cannot change the page size etc from ArcPy, so I set up my "template" mxds so my script can save a new copy of it, change data sources etc. This methods ...
4
votes
1answer
311 views

How To Calculate Height of Point B?

I have a survey point data which has coordinates X,Y, Height, Angle(Dip),Azimuth, and Depth(Distance). for Example, point A: Easting: 290694 Northing: 715927 Elevation: 1060 Angle: 65° ...
1
vote
2answers
953 views

Arcpy Error in adding input field to field map

hi guys i m doing a script in Arcgis i m new to this, i have to append some field from a table to another, i did this script in python but i have a problem when it want make the Mapping field with a ...
3
votes
4answers
1k views

Arcpy: Calculate new field from user input and existing data

Can't seem to figure out what is wrong with this create fields from a calculation. The code creates the new field in the shapefile as selected by the user but I keep getting a 9999 error on every ...
5
votes
1answer
1k views

Copy a polygon geometry in Arcpy

This to me sounded very simple so I am probably missing something basic here. What I need to do is to create a copy of a polygon shapefile to a new shapefile with slightly different attributes. Where ...
1
vote
1answer
739 views

Formatting label styles using arcpy [duplicate]

In ArcGIS 10.1, I have a shapefile/layer with labels displayed on a map. Can I modify any of the formatting of the labels using Arcpy? Either directly in code or by importing style from another layer ...
7
votes
1answer
1k views

How to perform a table look-up using Python in ArcGIS 10.0?

Using ArcGIS 10.1 the arcpy module has a TableToNumPyArray command, which converts a table into an array. Unfortunately I don't have access to 10.1 on my work PC. Is there a workaround which will ...
12
votes
1answer
3k views

Fastest way to count the number of features in a feature class?

With the introduction of the Data Access module in arcpy (30x faster search cursors), I want to know if counting features matching sql criteria is faster than the traditional MakeTableView + GetCount ...
0
votes
1answer
189 views

How to check if a layer exists in a geodatabase through ArcToolBox or Python?

I have got a python to update a file geodatabase (*.gdb). Every time the code executes, it needs to check if a certain layer has been already there in the previous geodatabase; if so, delete it and ...
4
votes
2answers
765 views

Python - Check for number of shapefiles in a directory

I want to test: to see whether or not ONE AND ONLY ONE shapefile (which will be based on a filename wildcard) exists in a directory. Add these shapefiles to a list Use this list variable as an ...
0
votes
0answers
967 views

Use Python to change datasource from a feature class to a view built on the feature class

I'm trying to replace the datasource for all of the layers in my map document using Python but I keep running into an error. Right now, all of the layers point to a feature class called ...
1
vote
2answers
227 views

Python syntax error…cannot see the error!

I'm very new to python and have created a script for enabling a user to list file types in a workspace making use of the parameters function in ArcGIS so it's more user friendly. However I cannot get ...
4
votes
4answers
2k views

Export list of Feature classes to CSV

I am successfully using the follow script import arcpy from arcpy import env import os env.workspace = ("WORKSPACE") fcList = arcpy.ListFeatureClasses() print fcList to export feature class names ...
3
votes
3answers
2k views

Create an ArcCatalog OLE DB Connection using Python

Is it possible to create an OLE DB connection (*.odc) to a database in ArcGIS 10 , but using Python instead of the ArcCatalog GUI wizard? I don't need to necessarily create a file on disk, just make ...
2
votes
1answer
415 views

Field Calculator Runs In IDLE (2.6.5) but not ArcGIS 10 SP3

just wondering if anyone else is having issues with the field calculator in ArcGIS 10 SP3. In the following code I do a pretty simple field calculation with a variable (an array) as one of the ...
2
votes
1answer
131 views

Importing arcpy on application launch to speed up subsequent arcpy methods

Is there a way of importing arcpy during the launch of my custom built application so that any usage of arcpy methods after the fact won't require the 3-4 seconds that it takes to import the arcpy ...
9
votes
2answers
466 views

Generate near table for x number of neighbours using arcpy

There are 3 likely scenerios that I am trying to capture near distances for: An interchange subway station, which has 2 or more neighboring stations. That is, the station in question connects 2 or ...
3
votes
1answer
975 views

Add multiple fields in attribute table

How do I add in multiple fields in the attribute table? In the attribute table I have crop types such as corn, cotton, sorghum....etc (as shown image below), in square meters. and I want to generate ...
1
vote
1answer
868 views

SImple model works, resulting script doesn't

The goal is to convert an XY layer (from Excel) into a feature class. The "MakeXY" portion works flawlessly, the arcpy.FeatureClassToFeatureClass_conversion portion inevitably returns a 999999 "Table ...
3
votes
2answers
765 views

How should I go about calculating the centroid of several lat long points in python, and perl?

Calculating the centroid several time on a number of geographical points. I was wonder is there a perl or python module that could make my life easier when working with large datasets of lat long ...
4
votes
2answers
768 views

Set Data Driven Scale from Arcpy

Is there a way to set the data driven scale from arcpy? Looking at the documentation for the DataDrivenPages class, it doesn't seem to be accessible from outside of ArcMap. The script I run within the ...
2
votes
2answers
2k views

arcpy.Delete_management not deleting a geodatabase folder

This script runs fine the first time but fails when run the second time. The issue seems to be that the KMLToLayer_conversion statement creates a file geodatabase (no surprise) that subsequently ...