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

Spatial Join, Centroid of Join Feature

Im trying to create a spatial join from one shapefile of many polygons and another shapefile of many polygons, The target feature is a mosaic of large polygons and the join feature are smaller polygons...

View Article


CostPath: All cells in grid have NODATA value. VAT will not be built.

Hi guys, I have a huge problem running my python-script outside of ArcGIS. I'm trying to calculate a series of CostPath analysis and getting errors I can't figure out. Already rzufelt gave me some...

View Article


raster created by arcpy.sa.FocalStatistics cannot be deleted

I've successfully created a raster using FocalStatisitics: Code:   smoothed = arcpy.sa.FocalStatistics('input', neighborhood, "MEAN","NODATA")   smoothed.save('output.tif') Problem: The problem is that...

View Article

python 27 with 64bit server not working after sp1

I have mulitply .py scripts to process and update data on my server. However, for this discussion I'm limiting it to a simple script. My python script uses to function arcpy.MakeQueryTable_management...

View Article

Invalid literal for int() with base 10.

Hi, I keep getting this error message: Code: Traceback (most recent call last):   File "C:\Users\sbarron\Desktop\AIDA_Tool\AutoInfastructureMask.py", line 123, in <module>     Max=...

View Article


Arcpy.GetParameterAsText Question

Hi all, Pretty basic question but I'm trying to write an script tool and I have four tiffs and I'm trying to get the user to input for the mosaic tool and it won't take them. I'm sure I'm doing...

View Article

ImportError: No module named arcpy

I am following the exercise on chapter, Python Primer, to run scripts in the command window. When I do the second exercise, I get a message: C:\PYTHON_PRIMER\Chapter11>python CommandLine_Clip.py...

View Article

Metadata tool in python script

Hi all, I'm doing a metadata tool with a python script. The issue is that I want a drop-down list for one of the parameters. For example I have a country and city parameters and I want to have a...

View Article


ArcGIS 10.1 difference between 'AnalyzeDatasets_management' and...

Can someone please explain the difference between these two? When running 'Analyze_management' on ArcSDE feature classes and checking inside the database for when the business and feature tables were...

View Article


format MEM? can not save temporary raster? RuntimeError: ERROR 010240:

I am working with a large number of temporary rasters. Individually they can be saved simply and without issue like Code: r1.save(outloc) However, if they are combined in any way -e.g. Code: x = r1 +...

View Article

sys.argv/raw input question

Hi all, I have a piece of code where I want the user to be able to specify the rasters that will be used in the mosaic tool etc but I'm having a bit of trouble. Could anybody please point me in the...

View Article

Image may be NSFW.
Clik here to view.

Batch processing within Python to add, calculate, drop multiple fields

I have been searching the forums and elsewhere online, but have yet to find anything to aid me. I am using the Geospatial Modelling Environment toolset, and the tool isectpolyrst, which gives you the...

View Article

Field list question

I have code that gives me a list of fields from a list of tables. Problem is I want to write them into another table for analysis and can't figure out how to do that. My list looks like this: Result of...

View Article


Unexpected results of Near and Append

Hi, I have a point layer (2500 features) and a polygon layer (2400 features) where I want to get the Euclidian distance from every point to all the polygons. My attempt was to iterate over the point...

View Article

Update Cursor to enter name string in attribute field

All, I need to modify my script to have the user's name entered into the MAPPER attribute field. Currently, the script enters inputName into the attribute field. I have a Parameter setup to Enter YOUR...

View Article


Image may be NSFW.
Clik here to view.

Handling Attributes

Hello I have a simple question that is hard to explain. I have drawn a little picture to help explain. Attachment 26206 https://www.dropbox.com/s/t0ncq91l6w...725_104657.jpg Basically I have table 1...

View Article

Create a perpendicular line to a stream segment and plot elevation profile

I am trying to create a python-addin button such that when I click on a stream it will create a perpendicular line to the stream at that point (or if by some error I click very close to the stream it...

View Article


Labeling with Python

I'm trying to label features as part of a python script and I'm running into two problems: A. How do I turn on the 'Advance' option for expressions? lblClass.expression.advanced = True? B. How do I...

View Article

Select Layer By attribute with a variable and null values

The following snippet works fine if there are no null values for the SequenceNumber field on the table, but it crashes if there are any. Is there any way to change this query? I am thinking that null...

View Article

UTM to DMS?

Does anyone have a script for field calculator to convert UTM in Degrees minutes second?

View Article
Browsing all 2485 articles
Browse latest View live