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

Image may be NSFW.
Clik here to view.

Geo Processing Tool to project WGS84 to UTM Zone11N

I was wondering if someone could give me a python script that would simply change the lat & long coords, in the attached xlsx, from WGS84 to UTMZone11, meters. I'd like to, then, attempt, to create...

View Article


python select features just interiors of geometry intersect

Hi folks, Does python provide funtion to select features jjust interiors of geometry intersect? Similar like ArcOject esriSeptialRelationEnum = 2 which Intersection excluding boundary touch. I try to...

View Article


Use Python to test whether a layer has a join or relate

I've used the "Add Join" and "Remove Join" tools via Python. I want my script to first test whether a layer has a join or not, and if it does, to remove it. This is because I've had problems when...

View Article

Program to compare actual pages to actual PDFs created.

Need help with difficult program. I'll try to explain as best I can. I have a python script that makes multiple PDFs from an mxd that has data driven pages. Based on the table which has the field...

View Article

Calculate Field in python - doesn't calc all records

Wondering if anyone can help me understand why my last three Calculate Field statements do not work...actually it only calcs the same three records in the table, but not the rest. When I try the same...

View Article


Problems with symbology on arcpy.mapping

I have a layer that I added on a mxd through arcpy. However, the symbologyTipe is comming as "OTHER" and I need it to take the symbology as a UNIQUE CLASS. I can't change it and I tryed the...

View Article

Can not get text element to update?

I can not get text element to update? Text ELement has been added "Subdivision" Still not updating?... Code: class ButtonClass2(object):     """Implementation for FemaMapper_addin.button (Button)"""...

View Article

Comparing a Search Cursor list to number of PDFs Created.

I need some help on my program. I have the parameters set to ask user to pick an mxd and the folder where those data driven PDFs are located. I started with Search Cursor to create a list from the...

View Article


Extract files from MODIS HDF files: Processing in a loop

I am trying to extract a file (0=NDVI raster) from a MODIS-hdf file and save it as geo-tiff file and project it. I did this in ArcGIS/ModelBuilder with a limted number of files. Below is my phython...

View Article


Select and Zoom Script

Hi All, I am attempting to make a simple select and zoom python script for my address points. Currently the script will complete successfully but will not select or zoom to the entered point. I am...

View Article

Strip database.DBO from name

Newbie to python and I was wondering if there is a way to remove database.DBO. from database.DBO.feature. feature = database.DBO.feature[13:] works, but seems a little of a kludge.

View Article

Calculate Field Hellp

Well I am getting better at python scripting. I have the following code block which works fine until the last process which is titled Calculate SNAP_FLAG field with FID values. Basically when the rest...

View Article

Restore Excluded features

Hi I have successfully created the following script to exclude unselected features using a definition query from my map. My problem is that I don't know how to restore the excluded features and return...

View Article


Recognize Selectable layers in a map

Hi How can I recognize selectable layers in a map using python codes. I need to loop through selectable layers in a map and do something on them. If I use Code: layer = arcpy.ListLayers(mxd) for lyr in...

View Article

how to read in CSV when formatted this way -...

PropertyName::PropertyValue,…,PropertyName::PropertyValue,{ExtPropertyName::ExtPropertyValue},…,{ExtPropertyName:: ExtPropertyValue} I have been given a text file, formatted the above way. Does anyone...

View Article


Splitting raster cells.

I have a raster with a resolution of .47-meters, it contains one field that defines the presence or absence of forest canopy (1 or 0). I need to use a 5-meter fishnet, (or 5-meter raster) to average...

View Article

right justify and fill with "."

I am trying to concatenate two fields, right justify one of them and fill with "." Something like this Central...............H45 Cotton Valley ......B32 Ant....................A31 I just want it to...

View Article


GlobalID data type showing as "SmallInteger"

ArcMap Standard, 10.1: I'm using the following: inputField = arcpy.ListFields(inputLayer, inputFieldName)[0] fieldType = inputField.type For everything except GlobalID's it's working fine. When the...

View Article

What version of Python will ship with ArcGIS 10.2?

Anyone have the inside scoop on plans for Python in 10.2? Standing pat at 2.7 or taking the jump to 3.3? Seems like a good chance to catch up with the current release schedule since numpy and...

View Article

Screen Layers

Hi I need to write a python script to screen the layers based of existance of FID field in them. Like if there is a FID field in the layer table I want it, if not I don't. How can I do that. Thanks for...

View Article
Browsing all 2485 articles
Browse latest View live