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

Create XY Event Layer / Save to Layer file / Copy features to shapefile

I am attempting this simple workflow. 1) Adding an XY event layer of lat/lon points with z values from a text file. 2) Save the event layer to a layer file. 3) Copy the saved layer file to a new...

View Article


Turning fields on and off using arcpy

Hi, I am trying to use python to turn fields on and off for layers in my table of contents using the 'fieldInfo.setVisible' method. I can get it to run through and then output as setVisible = "NOT...

View Article


Python Script for Field Search

Hello, I am looking to figure out a python script to automate, in field calculator, looking through multiple fields and providing a Yes if data is present. Context: I have a Feature Class for permitted...

View Article

Can't Loop

Hi, I have some points (1000's!) and they are divided in groups. I have to draw lines between the parent and the children in each group. I've been trying hard to loop through this, but I get different...

View Article

Batch File script fails on arcpy.XSLTransform_Conversion

I've got a script being executed weekly on a server and it writes out data to a couple places. I added in a function to use the XSLTransform_Conversion tool to write out the metadata in HTML format so...

View Article


Updating data with Python

Hello, I have a problem I can not find a solution. I started few months in Python. I am looking for a python script allowing me to perform an update of data. My table has a field "TextString" which...

View Article

Image may be NSFW.
Clik here to view.

arcpy not accepting irregular kernel files

I'm trying to perform focal statistics on a raster using a custom kernel, but I keep getting an error when doing so through arcpy. I am using ArcGIS 10.1 SP1 for Desktop: Advanced (build 3143). The...

View Article

Fastest Way to get a Value from Field in First Record

So now that we've built our retailer database and our users can query it based on retailer name, I need a way to very quickly get a value from the returned retailer's 'Retail_Category' field. The idea...

View Article


Spatial join and fieldmappings

I have two feature classes that I am attempting to join. One is a point feature at the intersection of streets, the other is the streets line feature. I am using spatial join to create a new point...

View Article


Data Management Tools/Geodatabase Administration/ Compress tool in Python

Under Systems toolboxes/Data Management Tools/Geodatabase Administration/Compress tool. Is there a way to recreate this tool in python so it can compress the geodatabase enterprise every week. Any help...

View Article

ListFeatureClasses() or ListDatasets() fails since 10.2 upgrade

Since upgrading to 10.2 the script I ran weekly for ArcSDE maintenance fails with an "Invalid floating point operation" error during the loop shown below: Code: # Get a list of all the datasets. #...

View Article

Map Layout Elements In New Layer Automated Using Python

I was wondering if there was a way to put a title and integer data from an attribute table in a new layer created in Python. I was able to create a new layer using copy features, zoom to the selected...

View Article

Any way to simplify this code?

My program runs fine, but I keep thinking there must be a way to simplify this code. I have a intersections.shp with all the street names that intersect in one field 'NAMES'. This separates them into...

View Article


Likely Simple Python Question: dynamically selecting records

Hello, I have a question that is likely very easily solved with some Python coding....I just have no experience in the area. It was suggested in the General Forum that I post my question here. Is there...

View Article

Setting Mask from Parameter

Hi everyone, This may seem like an easy one but I cannot quite find the way: When setting the environments, I want to use one of the parameters ("InputZ") as a mask for the different processes within...

View Article


Issu on Using Pyscripter with ArcGIS 10.2

Can someone please let me know how I can set the Pyscripter 2.5.3.0 x64 works with Python 2.7.3 which comes with ArcGIS? what I did was: 1- I installed the ArcGIS 10.2 2- I installed Pyscripter 2.5.3.0...

View Article

Create Time Field in Raster Mosaic

Greeting, I have a Raster Mosaic in a geodatabase of daily groundwater surfaces. I've come across a web page that explains how to insert a time field in the Raster Mosaic in ArcMap. But, I'd really...

View Article


Spaces in String Variable

Hi, I have an issue with my script related to the space in the string variable (see below). If "MinNPP" is used instead it works fine. I've also tried setting the variable as...

View Article

Dissolve Syntax (Statistics)

Hey People, I have been working on trying to perform a large dissolve analysis using statistics within my script. I can get a simple dissolve to work with with doing statistics for one field but not...

View Article

rolling month sum - air emissions

Hi, Has anyone calculated air emissions using rolling month average? thanks

View Article
Browsing all 2485 articles
Browse latest View live