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

I NEED TO EXTRACT THE FIRST LETTER AND THE MIDDLE LETTER OF A STRING...

I NEED TO EXTRACT THE FIRST LETTER AND THE MIDDLE LETTER OF A STRING ATTRIBUTE VALUE I.E "FIGURINE" , I WANT TO EXTRACT LETTER "F" & "R" TO FORM "FR". PLEASE HELP ME

View Article


Looping through Raster to compute Mean in Cell Statistics

I am attempting to loop through a set of MODIS data to compute averages by period. Since 2000 is missing periods 1 - 3 I am just computing the averages of periods 1 -3 for 2001 through 2012. I am then...

View Article


Create MXD for each FC row

Hi all, I have FC with 125 rows, and I would like to make a separate MXD for each single attribute I have got . In this case I will be using the FID for my loop. My scripts is not working as I wish. Do...

View Article

Create Temporary Dataset to Use With Data Driven Pages

I'm wanting to create a temporary dataset, add it into an MXD (that uses data driven pages) then export to PDF. So, I've got an MXD setup with data driven pages and the script will change the data...

View Article

Feature to Line on feature selections with ArcPy

I'm trying to collapse parallel polylines (dual carriageways in a shapefile of roads) to single centrelines. I'm aware of cartography's dual lines to centerline tool, but I find Feature To Line (Data...

View Article


Possible to make tool script path relative?

Is it possible to make the path to the script for a tool relative rather than absolute? I have users who copy folders with the maps and scripts they need from one network location to another. Thanks.

View Article

Help Please

About Us At MISource Inc., we connect individuals from a variety of industries with respected companies, both nationally and internationally. Each day, our Recruiters are presenting our clients with...

View Article

PYT Split by Attribute Tool

Any ideas why I'm getting this error: Traceback (most recent call last): File "<string>", line 90, in execute File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\analysis.py", line 98, in...

View Article


Insert an item at a given position

I have to label this attribute field, it's just the numbers, I want it to say District 1, not just 1. I have tried VBA and Python, can't seem to find the right script. I have Arc 10.1 Thanks!

View Article


tableselect not returning all rows

When running a table select against an Oracle view not all rows are returned. If the same select is run within Oracle (via sql) all rows are returned. If the data from the view is saved to a table via...

View Article

AddMessage question

How would you do this using AddMessage instead of print and in a script tool? My code has a parameter and where_clause in the search cursor so the user inputs a name and I would like a message listing...

View Article

Looping through featureclass

How do I write a simple script, that opens a point SHP file and loops through all records, printing the coordinates and attributes? If it can be done from command-line python, rather than from inside...

View Article

Image may be NSFW.
Clik here to view.

od cost matrix

Hi I have created a python script that runs an OD cost matrix over five years, from 1999 to 2004. I have set up an OD cost matrix for each year, which I think is very cumbersome. Is there someone who...

View Article


reproject all feature classes to different fgdb in Python script

Hi, I would like to write a script which does the following; 1. Lists all feature classes in a geodatabase 2. Checks that all the feature classes have a defined coordinate system - if not, then stop...

View Article

Split records into multiple Feature Datasets

So, now I'm trying to split records into multiple feature datasets, based on the record's unique value. The end goal is to have a seperate feature dataset for each unique record. I'm getting some...

View Article


Resource Standalone Table Sourced from SDE

To All Python Developers: I need to create a python script that will resource all standalone tables sourced from SDE. I was able to build this code for layers in an mxd but I am having problems with...

View Article

arcpy.FeatureSet - Missing (truncated) JSON result

I am having a problem using the arcpy.FeatureSet() method to load a polyline to a JSON structure (python Dictionary). It seems that if features were constructed using 'freehand' that the...

View Article


Retrieving Tool Script Password?

Is there a way to retrieve/reset a forgotten password set on an ArcGIS custom tool?

View Article

python toolbox Feature Set output parameter

I'm having trouble setting an output parameter of type "Feature Set" in a python toolbox. Here's what I have currently: Code: import arcpy class Toolbox(object):     def __init__(self):...

View Article

Skipping over an already existing file during the for loop

Hello All, I am running a very simple script where I made a list of geo-referenced aerial photos as a text (CSV) file and then using this list in a for statement to re-project the aerial photos. I am...

View Article
Browsing all 2485 articles
Browse latest View live