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

color polygons according to one column in attribute table

Hello all, System: Windows Vista ArcGIS 9.3 Workstation Python 2.5 I want to assign three colors to polygons in 100 shape files, according to one column in the attribute tables. The name of the column...

View Article


python code for "export map"

Dear all, System: Windows Vista ArcGIS 9.3 Workstation Python 2.5 I want to know any python code for “Export Map” (under file tab) to TIF in ArcMap. I want to save time for doing it for 100 shape...

View Article


python code for "add data" in ArcMap

Dear all, System: Windows Vista ArcGIS 9.3 Workstation Python 2.5 I want to know any python code for overlay two shape files (A and B)(+ icon for add data) in ArcMap. A is a world map. B ranges from B1...

View Article

Image may be NSFW.
Clik here to view.

Run a script to generate a report and export to excel

Hello I wonder if someone can help me please. I have a feature class which I want to export each record individually into a report (see attached) and then export the report into excel. Each of the...

View Article

Search and Update Cursor Need help.

I am trying to update a shapefile by using search and update cursor. It searchs great on of the shapefile but when I try to update the other it only retrieves the first data. I am providing my code so...

View Article


Insert cursor: No support for this geometry type.

Hi, I try to do a PHP Code: arcpy.InsertCursor("db.sde/db.dbo.IMPORT")  but I have this exception: PHP Code: ERROR 999999: Error executing function.nNo support for this geometry type.)  PHP Code:...

View Article

Getting Alias Field names from layer in mxd 10.0 SP5 not working

I am trying get the field aliases for each of the layers in an mxd document. I have the following snippet that should do the trick. Code: import arcpy from arcpy import env import os, zipfile, zlib,...

View Article

Change linear unit of spatial reference for geometry in cursors?

Hi, I want to change the spatial reference linear unit for geometry calculations. I know you can pass the sr object in cursor, so I tried this: I read from the document that linearUnitName is both...

View Article


Many Points to Few...

Hello, i am unsure if this is the correct place for this but it is an arcpy problem and i am new here, feel free to redirect me. Anyway I am trying to reduce a large dataset of about 4.6 Million points...

View Article


Label with first letter of string

Hi I want to label a point layer with the first letter of a string. The column name in the point layer attributet table is Kommun For example Kommun can have value Rattvik. I want all Rattvik points to...

View Article

Remove any text after defined amount of characters

Hi, I have a text field which should only have 13 characters (the remaining are spurious) I have looked at the trim function but cannot get it to work. Is there a python method to do this? Had a look...

View Article

Create service with network capabilities

Hi, I need to create a Python script that automatically publishes services with network capabilities. To do this, I use the function arcpy.mapping.CreateMapSDDraft to create a draft from an MXD. The...

View Article

Image may be NSFW.
Clik here to view.

Modify page numbering in PDF Map Book ie.( i, ii, iii, 1, 2, 3...)

I have three cover pages and I want the map pages to start at 1 under the page thumbnails. I've succesfuly made this happen by opening up the map book in a text editor and adding the following in the...

View Article


Image may be NSFW.
Clik here to view.

Field calculator calculate mean values of multiple rows when some values are...

Hello! I need to calculate average value of 7 fields (Index2006, Index2007, Index2008, Index2009, Index2010, Index2011, Index2012) to field IlvesAve (see illustration). Attachment 29714 The problem is...

View Article

if attributes exists

I have the following code that work good, but i would like my script to check if there is text(string) in the FacltyType field on Points_1 if it does i would like the script to skip that feature, but...

View Article


Image may be NSFW.
Clik here to view.

Script works as stand alone, fails when ran as script tool with ascii...

I am encountering a strange problem with a script I am trying to run. It updates a Site confgiruation .xml file for setting up Silverlight based REST sites. The code below is a function that is...

View Article

arcpy.sa.Sample() Spatial Analyst "Sample" method

Devloping an implementation that will build a GDB table from the raster cell values of a series of input raster datasets using the sa.Sample(). It works exactly as intended when I specify the output...

View Article


if the point is inside the polygon get data from a particular field while...

I found a snippet of code that returns if the point is inside the polygon. I like the idea but I want the code to do a little more than just that. For example, let's say I use my tool the selected...

View Article

Access Import Symbology Matching Dialog with Python?

Is there a way to access the functionality of the Import Symbology Matching Dialog when applying the symbology from one layer to another? I'd like to apply layer symbology to a new layer in a Python...

View Article

Exporting feature classes in to gdb

Hi guys, I am new for Python. I have been trying to write a stand alone script to create a gdb and transfer files from another location to the new gdb. When I run the script I keep getting the...

View Article
Browsing all 2485 articles
Browse latest View live