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

Searching rows for values, appending fields based on those values.

I have a table with one field called Cutwidth and Toothware. Cutwidth's values can either be 8, 12 or 16. Base on whatever value is in Cutwidth, I want my program to run a field calculator equation for...

View Article


Image may be NSFW.
Clik here to view.

Street intersection zoom to intersection

Hi Everyone, I want to add a custom button that zooms to a road intersection within ArcGIS. I know Python, php and SQL. I want to build a auto-complete drop down window for streets. I select the street...

View Article


Intersect with a specific feature and one unknown from gdb

Hello, i want to find matching data from geodatabase. Thought at first, that arcpy.da.Walk is best way to get result, but maybe executing the tool Intersect is better. Is it possible to set a feature...

View Article

for loop in a for loop... I'm stuck!

Hi! So I am new to python scripting, and after a few hours being stuck somewhere in my code, I require your help! For some reason, the code goes in the 2nd loop only the first time. Then the first loop...

View Article

use a for loop to interpolate points and then extract interpolation with a...

I'm looking to get some input into interpolating multiple point feature classes using a for loop. Whenever I specify to run only 1 feature class in the for loop, the script completes. BUT, when I...

View Article


Python equivalent of java's Long.MAX_VALUE - System.currentTimeMillis()

How can i get Python equivalent of Long.MAX_VALUE - System.currentTimeMillis() Also i want yesterday's midnight 's values in Java's System.currentTimeMillis() from python or shell scripts ?Can any one...

View Article

get default environment

Hi, I am working on a little script, and I would like to get the default environment (more specifically the default geoprocessing workspace). How can I get that? I am looking at a way to create a new...

View Article

How to show Messagebox in ArcMap 10.1 through using Python?

Greetings, I have downloaded "PyScripter-v2.5.3-x64-Setup.ex" and I`m using the Add-in Manager to add a command on a toolbar inside ArcMap 10.1... I succeeded in adding the toolbar and the command,...

View Article


Passing distance on arcpy.MultipleRingBuffer_analysis

I am trying to create an user input for the Distance parameter for arcpy.MultipleRingBuffer_analysis with the following but it's giving me an error on line 54 which is arcpy.MultipleRingBuffer_analysis...

View Article


GIS Project Analysis

Hello folks. My team mates and I have been assigned a project on using Geographic Information System (GIS) for Institutional Planning, student recruitment and retention. This project is based on an...

View Article

Change symbology of a shapefile or layer using Python

I have a script that creates a layer and then converts it to a kmz. Is there a way to set the symbology of the layer file using Python in my script so that it shows up in the kml as the color I want?...

View Article

Possible to create tableview in memory and fill

Looking to use management AddAttachment tool in ArcPy. Want to add a bunch of attachments without writting a csv file. Basically reading files from disk, creating the row and adding the attachments....

View Article

Jenks Classification in a script

This is a portion of a stand alone script in which the user supplies the dem for the slope analysis. The reclassify tool would otherwise allow me to choose a jenks classification and set the number...

View Article


label expression: 'if not field 1, then field 2', how is this achieved

Hi, I am looking to create a label expression that will result in the following: display 'field 1', however if 'field 1' is blank, display 'field 2' I am sure this can be written a number of ways to...

View Article

Licence level for CreateDataBaseConnection and CreateArcSDEConnectionFile

Good morning folks I'm looking for clarification on the licence level required to run acpy.CreateDataBaseConnection_management and arcpy.CreateArcSDEConnectionFile_management - the online doco...

View Article


Could not save raster dataset to ("path") with output format FGDBR.

I'm running a loop that iterates through a series of map algebra expressions and I get this error: Code: Traceback (most recent call last):   File...

View Article

Split daate/time

Hi, I am sure this is very easy but I not very good at SQL/Phyton script I have a field with date/time and need to split into 2 field one for date and another one for time Example: Date/Time into...

View Article


field statistics

Dear friends, I have the following case: I have a feature class (within a feature dataset, within a file gdb) with several fields. Two fields are of interest: "Date"(date) and "Type"(string). I want to...

View Article

ArcGIS Help ListBookmarks example 3 not working

Please refer to the ArcGIS Help document for the ListBookmarks (arcpy.mapping) function, example 3. Example 3 shows code that is supposed to convert each bookmark in a map document to a feature. I...

View Article

Setting Field Properties to Not Nullable

I have a simple script that I think would automate this task, it runs but I dont see any changes in the field properties... >>> fieldList = arcpy.ListFields(path to the feature class)...

View Article
Browsing all 2485 articles
Browse latest View live