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

Input data with python add-in

I have a rectangle tool in the python add-in where I want to load data of choice once mouse is clicked. Data needs to be clipped to the extent of the rectangle drawn at the interface. Custom dialog box...

View Article


Image may be NSFW.
Clik here to view.

Reading rasterfiles in subfolders

Hi, I am trying to build pyramid for NED DEM 30 meter raster files (and eventually mosaic them). I have a main directory and many subfolders. Please see the file attached. The problem is that I can't...

View Article


arcpy.env.workspace = sys.path[0] gives different results in PythonWin - BUG?

Hi all, When I run the following snippet in PythonWin, the results come back with the correct location (C:\PSL\Scripts). However, when this code is loaded into the ArcMap Python Window, the results are...

View Article

Adding Rasters to Related Extents

Hi exports I have a map. There is a layer in my map including some polygons. They are called raster extents This layer's attribute table have a field by the name of raster_numbers. each polygon has a...

View Article

Show raster layers squentially

Hi experts I have some raster images on my map with different scales. I need to make them visible based on their scales from bigger to smaller scales sequentially . Any ideas to do it in python will be...

View Article


Image may be NSFW.
Clik here to view.

Working with csv and headers

Good day. I have some code that I will post below. Code: import time import csv import array from time import gmtime, strftime print strftime("%Y-%m-%d %H:%M:%S", gmtime()) print ' ' print '...

View Article

Calculating field value based on other fields

Hello All, I am very new to Python, I am trying to calculate a field based on the values of three other fields. I have been able get the process to work in Model Builder but when I export the model to...

View Article

Image may be NSFW.
Clik here to view.

Model Builder Rookie - Help loading seveal files

I am new to model builder and am trying to do a few simple things that I normally do just using the toolboxes but wanted to try and automate some things! Basically I have a folder containing a large...

View Article


Simple Map Algebra Looped Through Rasters in a Directory

I think I must be missing something pretty basic here because this isn't a complex operation. That said, I've always had difficulty with Map Algebra in scripts. I'd like to apply a constant multiplier...

View Article


Image may be NSFW.
Clik here to view.

excel in ArcMap as an object (either in dataview or layout)

there are few methods to add tables sitting in an excel sheet into ArcMap - in excel file select the area are intended to add and copy to clip board then in ArcMap paste it which comes in as an image...

View Article

arcpy.MakeXYEventLayer Help

Good Day. I have a csv file with weather stations and precipitation amounts by month. I want my code to ask which months the user would like to plot, open the csv file, add the precip data, and then...

View Article

Looping SearchCursor problem - 'point' object has no attribute 'next'

Hi! I'm pretty new into Python and just do my first steps by modifying existing code to match my problem. The aim is to change the X/Y coordinates of all features within a feature class / shapefile and...

View Article

ArcGIS Python debugging

Hi! I'm running ArcGIS 10.1 and usually use Notepad++ for writing codes or scripts. Now I would like to be able to debug my scripts for ArcGIS as well (so far I always have to use messages printing). I...

View Article


df.zoomToSelectedFeatures not working

Hello, I've writen a Python script which worked perfectly on v 10. now, when i have v 10.1, the script works good except for 1 part: df.zoomToSelectedFeatures. The script selects a parcel, copies it,...

View Article

Image may be NSFW.
Clik here to view.

ArcInfo Command Line- In Arc 10 (Only Python Available?)

Quote: Originally Posted by mykotti I wanted it to use some java codes to assign a unique value to each cell in a grid..I couldn't figure out how to get to the command line in ArcMap 10..Any hint?...

View Article


How to set Polygons Outline Color to "No color" using Arcpy in a Map

Hi I have a map with many of active polygon feature class (Over 100 layers) and I need to set all polygons Outline Color to "No color". Can you please let me know how I can run an arcpy code to select...

View Article

Can I set up a field parameter without checking it is in the feature class?

I've got a script which does some calculations and stores them into fields. I've designed it so that if the fields don't exist they will be created but if they do exist they will be overwritten. When I...

View Article


ArcPy.AddDataStoreItem Bug

Hi, I have an SDE connection that points to version SDE.DEFAULT. If I register that sde connection with ArcGIS for Server using ArcPy it works. If I create another connection file with exact same...

View Article

Image may be NSFW.
Clik here to view.

layer.datasetName returns the layer name instead of the dataset name

Using ArcEditor 10.0 sp5 (Evaluation version) (See attached picture for code and results...) When running some python code to get the dataset name for a layer in ArcMap, the layer.datasetName property...

View Article

Attempting to use showLabels script within a model...

I'm attempting to use a small script within my mxd (will later attach to a model) that will turn the labels on for a layer. My code is essentially straight from the Resource Center: Code: import arcpy...

View Article
Browsing all 2485 articles
Browse latest View live