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

Run ArcGIS python module in python CGI script for Apache server on OSX Lion...

I have ArcGIS 10.1 for Desktop running in a virtual machine on a mac computer with OSX Lion Server installed. I have also created a cgi python script for server side processing. I am wondering if it is...

View Article


Replace Data Source

I try this code and then my path changes to the path of the mxd plus the sde connection. I am not sure I am going in the right direction anyways? I am trying to change all my SDE files that point to...

View Article


How do I apply Title Case to just a portion of a text field

I have an address field in all caps and I want to convert just the city to title case. So I currently have: AKRON, OH 12345 BREA, CA 54321 And I want to see: Akron, OH 12345 Brea, CA 54321 Basically I...

View Article

Removing a layer from multiple mxds

I attempted to modify a sample code to remove just one layer from one of the two data frames, "Primary", I have in multiple mxds, all stored in the same folder. This code runs, but does not actually...

View Article

Setting multivalue parameters to True

Hi all, is there a way to set the default values in a multivalue Parameter to True or Selected? Thanks

View Article


How to Get Rid of Quotes in the SQL expression

I have some codes in my script like this. Code: queryList = selectedFids.replace(';', ',')           newName = arcpy.AddFieldDelimiters(lyr, "[OBJECTID]")         lyr.definitionQuery =  '{0} in ({1})'...

View Article

Some basic Python help

Hello, I am a beginner when it comes to python and I need to create a script that 1. Loads (copy I guess) file geodatabase feature classes and shapefiles from a workspace to a separate file...

View Article

Image may be NSFW.
Clik here to view.

numpy array to raster

Hi, I am iterating through a series of rasters and would like to mosaic the results, but don't have access to any tools that I would normally use because this is a Runtime SDK for WPF project using...

View Article


Would Python be the way to input this data?

Hello, I was given a considerably large Excel table and was asked to input it into ArcMap but am having a lot of trouble finding a reasonable way to do so. The data lists tens of thousands of points...

View Article


Image may be NSFW.
Clik here to view.

Populating geodatabase field based on query using two other fields

I am struggling with how to approach filling in the field “Code” using python from within an ArcMap 10.1 Advanced license session. I tried to use the calculate field tool in model builder but could not...

View Article

Image may be NSFW.
Clik here to view.

SQL query and Export Metadata

Hi all, I would like to have your input for this part of my script. I am trying to set up an SQL query box in my tool that will allow users to to select and query from the fields obtained in the input...

View Article

Updating a layer to multiple MXDs

I'm frustrated that the ESRI sample scripts do not allow updating multiple mxds. In the real world why would someone go to the trouble to modify a sample script that just updates one mxd? Would it not...

View Article

Image may be NSFW.
Clik here to view.

Change Raster symbology

When I use python codes to add rasters to my map the raster symbology chenges to stretched. I like it to be colormap. How can I change it to colormap using python codes without keeping a template in my...

View Article


TableToTable_conversion syntax on select fields using python

I want to copy a geodatabase table (Test) to a dbf table (Test.dbf) but am struggling with the field mapping. I have about ten fields but only want to export the City and Zip fields into the new...

View Article

Problem running Python Toolbox with 64-bit Background Geoprocessing

Hello all. I have been experiencing consistent crashes trying to process large datasets (>100,000 features) with my custom python toolbox tools, which I believe to be a memory issue, as smaller...

View Article


Create duplicate polygons using Shape@ and Geometry objects in 10.1

Greetings All I have a shapefile with 1 polygon in it. I want my script to read the geometry of the polygon and then create multiple polygons in the same file from the original polygon. I can do this...

View Article

Export file geodatabase table to scv file

How can I export a file geodatabase to csv table using python running a script from inside a map document. Got the following code from Mathew Coyle off this forum and ran it but it did not work for me....

View Article


Problem with Update Cursor

In my below script, i am trying to export features which are having null or 0 values for some particular fields(listed in fieldList) from the GDB.I found that the problem is with update cursor.I tring...

View Article

sql in file gdb

Hey folks, Is there any way to run a 'create view' and or other sql statements against a file gdb? I feel like when I access the dataset with the da cursors it's running sql in the background, but I...

View Article

Image may be NSFW.
Clik here to view.

Problems with Frequency analysis

I keep getting the attached error when i try to run my frequency analysis script, any ideas why /how to fix it? Attached Thumbnails  

View Article
Browsing all 2485 articles
Browse latest View live