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

How to add separator in ArcGIS python add-in tool bar?

I am trying to separate two sets of button tools in a python add-in toolbar. I am trying to make a toolbar like existing arcmap toolbar where different classes of tools separated by “|”. Can this be...

View Article


Updating a feature class based on evaluating different fields with...

I have a feature class with a number of fields, two of wich are key fields, named key and front, and secondary fields named key_n and front_n. The thing is I need to search in the whole table for any...

View Article


Adding drop down option for layers in Python script tool?

I’ve code that will add fields to feature classes. I’ve parameterized the script so the user can navigate to the location of the feature classes to be edited. If the feature class is already open and...

View Article

How to automate ArcGIS share service with python

Right now i am sharing a map service in ArcGIS by following these steps. File –> Share as –> Service –> then click on overwrite an existing service –> select appropriate map –> Click on...

View Article

Rename feature classes in file geodatabase in bulk

I see may versions of this post but none quite get me to where I need to be. I have 50,000 features classes in a file geodb. They are a1_xxxxx_xx I need to rename them all to a6_xxxxx_xxx This is my...

View Article


Seeking ArcPy equivalents for SPLINE and SETWINDOW commands from ArcInfo...

I know of a list of conversions between AML and ArcPy. I was wondering if anyone knew of another resource to go between the two? In particular I am looking for a SETWINDOW (AML) function in ArcPy, and...

View Article

How to create MXD in folders programmatically,

I have an MXD as a template and about 650 folders. Each folder corresponds to a species. What I want to do is to make an MXD (same as the template) in every folder of each species. How to do this...

View Article

CalculateField_management: Different results than in the field calculator

I`m using ArcMap 10.2.2 and Python 2.7.5 I´m tryig to calculate values with the CalculateField_management tool. my script: def mthree(mthre, mtwo): if mthre >= 1: return -3 if mtwo >= 2: return...

View Article


Parsing error with in ArcPy code

I have the following code in Python for a tool I want to build. For some reason I viewshed don’t exist in the folder I have chose (out). Also when I am trying to define the output workspace every time...

View Article


Image may be NSFW.
Clik here to view.

How to create a polygon connecting the endpoints of multiple lines using python?

I’m trying to figure out how to create a polygon that connects all the endpoints of a shapefile containing a set of polyilnes with pythonscript in ArcGIS, I’m having trouble doing this as the order of...

View Article

Creating Feature Class in ArcPy gives RuntimeError?

I am new to Python. I am trying to create a new Feature Class within a long script but before I do so, I am running it separately to make sure I have the syntax correct. The code below mimics the one...

View Article

Dividing points into Polygons based on an Attribute of that point and its...

I have random point data (school locations) that I need to divide into ‘n’ polygons (regions) based on: their distance to a facility, their relative distance to each other, and an attribute of that...

View Article

Is there an Export All Features in View Extent equivalent with ArcPy?

I would like to dynamically classify a layer’s symbology based on the current view extent. As in, quantities of a specified field will be classified into quantiles based on the range of values of the...

View Article


ArcGIS Python script to create map from external source

Is it possible in ArcGIS Server to write a python script to pull features from a third party database in real-time. Essentially I want to create a service where I can pass in filter parameters (BBOX,...

View Article

Image may be NSFW.
Clik here to view.

Divide broken line layer in seperate clusters based on location

Building on a earlier asked question on this forum I would like to ask an additional question in getting the task done I asked here: Divide polyline layer in clusters with specific requirements in...

View Article


Drawing map from XY coordinates in CSV and exporting it to JPEG using ArcPy?

I have a csv file containing about 40,000 rows of data with X, Y (longitude and latitude) data. It is US data, and I have downloaded a state.shp file on which the X, Y points can overlay. I am able to...

View Article

Alternative to nested Con statements in python

I have a nested con statement that I’d like to put into a script, as it’s hard to follow in its current form. The raster it produces is incorrect, so it’d be easier to debug in a script. The current...

View Article


I want to clip a raster image with vector layer but the output area is...

I using arcgis10.1 extract by mask tool to clip bkgha1 raster with rubber2012 vecotor layer,clipping process is successful and the result is bkgha file.The next process is i want to reclassify the...

View Article

Dissolve in python script not working correctly

I have a python script that merges 12 shapefiles into 1 shapefile with about 75k total records. I want to dissolve the latter shapefile on a particular field, and SUM another field, so my final...

View Article

Public transport drive times in Europe/ Germany possible with Deutsche Bahn?

Background: There are many data sources for calculating drive times for driving, walking or cycling, for example Google Maps DistanceMatrix, ESRIS WebServices (no bicycle at the moment) etc. They all...

View Article
Browsing all 767 articles
Browse latest View live