Quantcast
Channel: Question and Answer » arcpy
Browsing all 767 articles
Browse latest View live

Creating Replica using ArcPY with check_out type

I am running the following command in python and it works fine no error but it does not generate a mdb in output path folder and give me the input path result as output child source...

View Article


Developing find and replace script tool?

I’m being tasked for developing a script tool that can find ultimately needs to be able to find any string and replace it with another string in an attribute table. Below is what I have so far, and it...

View Article


Image may be NSFW.
Clik here to view.

Script for Sum of Rows in field calculator – VB or Python?

I wrote the TOTAL_FREQUENCY values manually. But I want to automatically write this values with a script. Namely, I want to write sum of column 3 to all of the the column 5 rows. How can I do it with a...

View Article

Generate new coordinates with distance + azimuth

I currently have the following Excel data for a list of animals: Lambert 93 coordinates of the observer Azimuth of the animal Distance between the observer and the animal I would like to get the...

View Article

Draw Line from Point to existing Line

I am working on a water network, I want to draw a House Connection pipe from a house meter to nearest existing water line, I tried using python script, I could just find the nearest line. I also want a...

View Article


Update row with next row's value

I am trying to extract the endpoint of a line with very fine scale and overlapping GPS data. I would normally just use the locn_id+1 but that doesn’t work because the data were originally rarified....

View Article

Polygon scaling using arcpy

Is it possible to scale each polygon by a numeric value in an attribute table field using arcpy. I have updated the code from some previous excellent work done by Evil Genius import arcpy import math...

View Article

Image may be NSFW.
Clik here to view.

Redrawing multisegmented lines as arcs using measurements stored in attributes

I’m beginning the process of moving our local government cadastre data in to a topologically clean parcel fabric layer using ArcGIS. I’m at the stage where I’m looking to clean the data and get it...

View Article


how to skip creating an empty feature class using featureclass to...

I have a script that finds points outside of selected areas and creates a feature class in a file geodatabase. However, sometimes there are no points outside of the selected area. Currently, the script...

View Article


Extract Polygons out of a raster

I want to extract every row from a .shp from a raster (Extract by Mask). With the following code i get 4 output raster, wich concludes every row. import arcpy arcpy.CheckOutExtension('spatial')...

View Article

Shebang line for ArcGIS Desktop [closed]

I’m writing a script to be run on ArcGIS for Desktop, which only runs on Windows machines. Is there any use for a shebang line at its beginning, and if there is then what should it be (e.g....

View Article

Printing MXD files name using ArcPy gives AssertionError: Invalid MXD filename?

I try to print all the MXD files name. The MXD files located in one directory (which is divided into folders and sub folders). Also in the sub folders there are MXD files. I work with this code: import...

View Article

ArcGIS python “add field” and “calculate field” workflow

I am new in Python and I am creating a Script. I’ve crafted a functional code, but I’d like to know if there is an easier way to do it, just for curiosity (And learning new ways!). The purpose of the...

View Article


Determining EPSG code for coordinate transformation using ArcPy? [closed]

I am trying to write a Python script which will identify the EPSG code for the coordinate transformation. I am familiar with the dataFrame.geographicTransformations function, however this returns a...

View Article

How do I use Python to edit a field in an attribute table?

I have a few data tables full of information on salt water injection wells, with injection volumes given on a monthly basis. I need to add these monthly values up in order to get an annual value for...

View Article


How to remove first character from featureclass in Python?

I have a bunch of feature classes in a geodatabase that start with an underscore and want to remove it, but ONLY the first instance. See below: e.g. _COGCC_W_S –> want it to be COGCC_W_S I have a...

View Article

ArcGIS 10 arcpy to add a WMS Service to MXD

I want to batch insert WMS layer to my arcmap MXD project with python/arcpy script. Some issues has been unanserwed, here my “state of art”: ESRI IDEAS ESRI GeoNet community #1 ESRI GeoNet community #2...

View Article


Can a tab masquerade as a space in a unicode string?

I have some code that is intended to remove spaces from some data I’m ingesting from a group of shapefiles into a number of feature classes. The malformed data consistently looks like this: ABC12345678...

View Article

Image may be NSFW.
Clik here to view.

Arcpy script appearing in text format in arcgis 10.1 but in Idle (normal)...

I added my arcpy scripts in Arctoolbox. But, when opening in edit view in Arctoolbox in Arcgis 10.1, they are opening in text format instead with Idle edition mode. That is not appearing in Arcgis 10....

View Article

save as Layer script not working

I’ve created script in Python for ArcGIS to save shape file as layer file..the code throws an error ERROR 000732: Input Layer: Dataset D:core i 5 datasymon assignmentSwatclippedbuffer.shp does not...

View Article
Browsing all 767 articles
Browse latest View live