Quantcast
Channel: Forums - Python
Browsing all 2485 articles
Browse latest View live

Rounding Coordinates

Hello, I have a data set containing a few thousand points and I'm attempting to round the coordinates while controlling the maximum distance they can move. The math is dizzying and I was curious to...

View Article


Calculation error using cursors, second cursor uses first value of first cursor

Attempting to add up values of one field based on the value of another field. The first cursor adds up the values in the field correctly, but the second one uses the first value of the first cursor...

View Article


Additional Python functionality in 10.2

Hi, I'm new to Python and about to start with ESRI's Data and Exercise DVD. The version used for exercise(Python Scripting for ArcGIS Data and Exercises) is ArcGIS for Desktop 10.1. I've ArcGIS for...

View Article

Using additional Python modules

Hi there If I call an additional python module installed on my machine (i.e. https://code.google.com/p/simplekml/) from a python addin button, does that module need to be installed on every machine...

View Article

running pythonw.exe in Windows 8.1

I am trying to run Python Win --- Pythonw.exe --- (ver 2.7 which comes with ArcGIS 10.1 with ArcInfo license) in Windows 8.1. When I double-click on it, nothing happens. Anybody know what to do so it...

View Article


List feature class alias...is this even possible?

Is it possible to print a list of feature classes with their corresponding alias via Python? If the aforementioned is possible, here’s another question… My team is responsible for 400+ feature classes,...

View Article

Spatial Analyst Expression

I've been working on some python models using the spatial analyst module, and keep getting a strange error. I was hoping that someone could help. I'm getting a raster output with a range of .79769e+308...

View Article

Python button to cycle edit sessions on data sources of visible layers in the...

Hi everyone! I want to use the Addin Assistant and PyScripter to make a button that will cycle edit sessions but I see that ArcPy wants the exact location of the GDB (or source)... Can I use a variable...

View Article


Listing only attribute indexes

I need a script to check the attribute indexes of every feature class in a geodatabase, to delete or create the indexes to fit my needs. I've used the ListIndexes arcpy function but it lists not only...

View Article


arcpy and inserted excel files

does anyone know why when using arcpy to export or save a copy any inserted/embedded spreadsheets are not on the output? is there something i'm missing?

View Article

Joining SDE feature class to SDE table fails in 10.2

Here is a simple one for you guys: >>> arcpy.MakeFeatureLayer_management(r'Database Connections\GISonGISWT.sde\GIS.V_NM_NIT_BRID_SDO_DT',"BRID_Decodes") <Result 'BRID_Decodes'>...

View Article

Controlling Add-In Tool Activation

I have created a python add-in tool which uses onMouseDownMap to get an xy coordinate on my MXD. Here is the code: class ToolTester2(object): """Implementation for Toot_Test_2_addin.tool (Tool)""" def...

View Article

OverWriteOutput not actually overwriting

Hi, So I am running a Simplify Line tool in the Python Window and my geoprocessing environment setting in ArcMap is set to overwrite outputs True. I am able to overwrite outputs and do it a lot when...

View Article


Get Relationship Classes from Table (Not Workspace)

Any ideas on how to do this? Originally, I thought I could use the relationshipClassNames from the GDB Table properties, but I only get empty value back (i.e. []). Anybody know why this does not work...

View Article

ERROR 999999 when running python as service

hi all, the code below runs ok from ArcCatalog, but once i publish it it fail with error : Code: Traceback (most recent call last): File...

View Article


Help with fieldmappings in SpatialJoin in python

I have a situation where the same field name, "FIPS", is in both the target class and the join class. I want the output FC to contain the field from the join class. What happens is that the FIPS field...

View Article

merging two features from the same shapefile

I have a shapefile with all the roads in my county. Unfortunately, they are in segments. I am trying to combine them all into the same shapefile where each road has one continuous segment instead of...

View Article


Serious Python Errors since using 64-Bit OS - like ftplib module.

I have been running into alot of problems like using the ftplib module. I recently moved to 64-bit and used the new 64-bit geoprocessing patch, but been having problems with my usual scripts that use...

View Article

Python: Insert Photographs into ArcMap Data View Programattically

I have hundreds of photographs that have been taken as part of a survey. I've created point features that represent the location of each photograph as well as added a field to the point features with...

View Article

Help with UdateCursor populating a layer from another selected layer

I am having trouble populating Points layer "FacltyType" field with the selected layers CPUC field. I need to able to select multiple points from the Points_2 layer then select by location on the...

View Article
Browsing all 2485 articles
Browse latest View live


Latest Images