A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

1
vote
1answer
19 views

Switching out layers but keeping the order the same (see figure) with ArcMap and Arcpy

I need to update the table of contents for a given .mxd by keeping a certain order but switching out the contents. I can bring in the new feature classes as map layers, and delete the old map layers ...
0
votes
0answers
11 views

Grouping polygons by spatial attributes

I'm working with a dataset that contains millions of polygons representing leased properties. In many cases, there are multiple polygons that are drawn on top of one another (representing multiple ...
0
votes
2answers
27 views

Creating series of lines offset from starting points (ArcGIS, arcpy)

I've got a series of points representing generalized locations of trawling activity over many years. A single XY location can represent many trawling records. I'm attempting to create a series of ...
4
votes
4answers
3k views

Bulk convert DBF to CSV in a folder ArcGIS 10.1 using Python

I would like to convert 1000 dbf files to CSV. All dbf files are in one folder and they have sequential names (S:\output_tables\tcb1.dbf, S:\output_tables\tcb2.dbf, S:\output_tables\tcb3.dbf, up to ...
0
votes
0answers
12 views

Automatic Dynamic symbology or Attribute driven symbology? [on hold]

I have looked for a while now on this issue! There seems to be multiple leads dating back over eight years! Two dilemmas I have found myself trying to figure out. Is there a way to configure ...
2
votes
1answer
26 views

Using Arcpy to Turn on Maplex Label Engine

I've been attempting to automate a number of processes into one script using arcpy. I've got everything working and am wondering if there's a way to use arcpy to toggle on/off the Maplex Label Engine. ...
2
votes
1answer
58 views

How to SelectLayerByAttribute Xcoordinate and Ycoordinate

I am having trouble selecting by attribute when I am trying to select by the Xcoordinate and Ycoordinate. For example ...
2
votes
1answer
141 views

How to calculate a field in using updatecursor?

I'm trying to simply add a string in front of a group of numbers from another field in a new field. The filed I'm using update cursor in is GIS_ID_PAM and I'm trying to bring over numbers from a ...
2
votes
1answer
33 views

Joining a csv table to the attribute table of a feature class in arc gis 10.3

I am new to arcpy. I was trying to join a csv table to the attribute table of a feature class. Here I would like to share what i was trying to do. import arcpy, csv from arcpy import env ...
1
vote
2answers
42 views

Using Calculate Field to fix hyperlinks in ArcPy gives Cannot use VB for services?

Getting an error while trying to script it, specifically "Cannot use VB for services." Snippet and VB code block as follows: Raw block (works within ArcMap): "\ftp\raw\YYYYMMDD\Files\Charles" ...
3
votes
0answers
47 views
+50

Identify and delete overlaping or near lines with similar running

I have shapefiles with lines that shows surface water runoff. I need to clear and simplify these shapefiles by condition that if some lines are near by other and has similar running, this lines has to ...
1
vote
1answer
29 views

Calculate Field throws an error when parsing python with backslashes

I have an FTP I need to access through a python script. It works fine with forward slashes, but I don't need it to be read as an html. Below are both sets of code: Working: ...
0
votes
1answer
33 views

Export all data driven pages to PDF using Python script

I am a novice Python user but I am trying to create a script which will allow me to export all of the data driven pages within an mxd to a single pdf file (without having to open the mxd) I currently ...
3
votes
1answer
2k views

Grouping points by location in ArcGIS Desktop?

I am using ArcGIS Desktop. I have surveyed points (sections). There will be 200 sections, each section 20-30 points. I want to create polylines (sections) out of the points. In order to do so, they ...
4
votes
1answer
65 views

Using UNC pathname with Calculate Field tool in ArcPy?

This question is different to Using Calculate Field to fix hyperlinks in ArcPy gives Cannot use VB for services? which was asked previously because it is using the Python parser specifically, rather ...
0
votes
1answer
21 views

Selecting groups of files and iterating composite raster

I have a query regarding the best way to process the multispectral data I requested to be collected for my MSc study site. The data I am working with has been saved as single band tiffs, rather than ...
0
votes
1answer
44 views

Run model in MXD using Python

I'm very new to python so please bear with me. I am trying to run a model that exports a .wm feature to a geodatabase feature class. The .wm file extension is for software that is used to update ...
3
votes
1answer
32 views

Using Feature Dataset with ReplaceDataSource gives ValueError: Layer: Unexpected error?

I'm attempting to replace the data source of a unsourced layer with a mxd. The issue I'm having is that the Featureclass "APPL" is contained within a Feature Dataset. When the feature class is outside ...
6
votes
3answers
2k views

Why is an extra field necessary when creating point shapefile from csv files in Python?

I have a Python script that creates a point shapefile from a csv file within a Python script. This script gives me a ValueError for the longitude field (LON) if there isn't an extra nonsensical field ...
1
vote
1answer
348 views

ValueError: Layer: Unexpected error from replaceDataSource()?

I'm trying to write a script that allows me to look through map documents and replace each layer's data source in each map document. Everything is working logically I believe, and all my loops are ...
1
vote
1answer
231 views

Merge Feature Records with Identical Parameters in Two Different Fields using ArcPy or SQL [SOLVED]

I'm trying to merge feature records based on identical parameters in two different fields using Python or SQL. I have a polygon feature class with ~800 records, that I've intersected with another ...
0
votes
1answer
32 views

Arcpy: creating a line on an existing line based on points' coordinates

I have a point which is some meters away from an existing line: This point should be snapped to the line (to the closest part) and then, based on the points' new coordinates, a new line Feature ...
5
votes
1answer
409 views

Select and copy attributes features in ArcMap using Python add-in tool?

I'm trying to add a tool to an add-in toolbar to select features from an existing feature class and copy attributes to another feature class,from point to point. TopoHeight_Field_Name='Comment' def ...
2
votes
3answers
2k views

Creating new shapefile based on its attributes with python?

I have a shapefile which has an attribute year. I used to generally copy and paste these features in the dataframe and then using the definition query just show polygons which were established before ...
5
votes
1answer
62 views

Geoprocessing in violated convention environments (Microsoft Windows)

Our MapInfo and ArcGIS users have self managed file shares. I do my best to educate our users about windows naming conventions but years of violating basic conventions and personalities that don't ...
0
votes
0answers
34 views

What is a polygon, a ring, a part in arcpy, ArcMap-editor for the OGC and in GIS generally

I ran in some difficulties to the definition of the term polygon as i tried to understand arcpy's geometry model. (ArcPy getPartCount always returns 1 on multipart polygons?) I ended up in consulting ...
1
vote
1answer
26 views

Script for running Feature Class To Coverage tool runs into error on arcgis server

I have created a script for converting feature classes to coverage and it runs fine in arcmap. But after publishing and running it on the server, it fails to execute and returns the following error ...
0
votes
1answer
138 views

MS SQL table with geometry field to feature class

I have a table in a native SQL database (no geodatabase, dc_geobank_public.sde in the code) with cca. 300 000 records and 18 fields. Two of the field contains projected X and Y coordinates, and one ...
0
votes
0answers
46 views

Reading shapefile directory in Python?

I am developing tool on ArcGIS ArcMap 10.0 with .NET and Python technology. In TOPOTORASTER tool , I give a line feature class. the line feature class path something like this: inputOne = ...
2
votes
1answer
62 views

ArcPy getPartCount always returns 1 on multipart polygons?

in this post Why does the method partCount in ArcGIS always give back a value of 1? a problem occured that could easily be reproduced. partCount is always 1! Is it a wrong usage of partCount or did ...
2
votes
0answers
82 views

Merge n number of adjacent polygons [on hold]

I have over 17,000 individual polygons. I want to merge two adjacent polygons so that I finish with approximately 8,500 polygons. The polygons need to be merged based on location, merge two adjacent ...
4
votes
1answer
802 views

How to save and reload legend settings using Python?

I know how to change settings of a legend individually by arcpy (like: Patch, Title, Items, Columns, Frame, Element Size&Position, etc.), but now I would like to use the exact legend settings ...
3
votes
3answers
66 views

python script tool validation checkboxes to radio boxes?

I am trying to build a tool in arcmap, which uses radio buttons in its gui. Since I read, that radio buttons are not supported, I figured, it couldn't be too hard changing the behaviour of simple ...
56
votes
6answers
7k views

When to use ModelBuilder over Python scripting and vice versa?

I am new to Python scripting in ArcGIS but not new to ModelBuilder. I would like to know the benefits of Python vs ModelBuilder. When should we write Python script for GIS automation rather than ...
3
votes
1answer
100 views

Append List not working

Trying to create a list of well counts. In the code below, wellCntList only contains the current county count and not a list of ALL the counts. Sure I'm missing something simple. for cname in ...
3
votes
2answers
224 views

getsubcurve from multipart polyline using ArcObjects/ArcPy?

I have code which analyzes multipart polylines (roads) from the beginning towards the end. The algorithm "moves along" the road. My multipart polylines include circular junctions and branches so they ...
2
votes
0answers
8 views

How to skip ArcOnline MXDs(ArcPy)

I've previously posted a question about an ArcPy tool that walks through a specified area and scans all MXDs and associated Layers and reports them (as well as the inverse) Search for a shape-file of ...
0
votes
0answers
14 views

arcpy.UploadServiceDefinition_server sometime fails with Error:999999 and fixed with swapping identical ags connection files

I need help resolving an intermittent 999999 failure during arcpy.UploadServiceDefinition_server. I'm using arcpy.UploadServiceDefinition_server with a saved ags arcserver connection file as part of ...
2
votes
1answer
34 views

Add shp attribute data to column with python script

If feature column (feature is the name of the column) in table is ferry crossing in the attribute data then I need to add Yes to the Ferry column that I have already added to the table. If the ...
5
votes
5answers
2k views

How to add Radio Buttons to Python Script tool dialog?

I have 3 Point shapefiles for 3 species that contains the accession points of each. The user needs to specify only one species at a time. I need to write a script tool for adding the selected Point ...
0
votes
1answer
36 views

Arcpy get point feature at start and endpoint of Line feature

I am having trouble getting a feature that is at the start and end point of a line. I can get the start and end point of the line but I am not sure how to grab the Point feature that is at the start ...
2
votes
1answer
33 views

ArcPy - Syntax Error when using reclassify tool

I have been writing a code to automate a variety of processes in Arc Toolbox. I have used a line to reclassify before but this time when using it I am coming up with a Parsing Error (SyntaxError). I ...
3
votes
1answer
46 views

arcpy.da.SearchCursor(fc,[“SHAPE@”]) has no firstPoint object

I am having trouble getting the start and end point of a line using the code below. import arcpy with arcpy.da.SearchCursor("Lines",["Material","SHAPE@"]) as curs: for row in curs: ...
2
votes
1answer
69 views

Spatial Join Field Mapping in ArcPy?

I know there already are posts about this subject, I tried to derive a solution for my own problem but the code for field mapping is very complex to me. I have a Raster 100x100m and point layers that ...
2
votes
0answers
39 views

How do I speed up testing debugging when I am loading a large module as part of my program? [closed]

I'm using PyScripter to do some python geocoding automation and I'm coming across the situation where I am waiting several tens of seconds for a large module to be imported. This is very inconvenient ...
1
vote
2answers
48 views

Using Python to select records by date field

I am trying to write a python script to select records created within the past 7 hours (date field - database time) using a where-clause within arcpy. The table is ArcSDE database (Microsoft SQL ...
8
votes
1answer
128 views

In ArcMap, use python to disable “Scale map elements proportionally to changes in page size”

I am changing sources on MXDs in differents offices using ArcPy and ArcGIS 10.0. As observed here, the printer settings revert to the default printer when the instruction mxd.save() is sent. Losing ...
2
votes
2answers
46 views

IOError: “[u'Hospitals',u'Parcels',u'Roads']” does not exist

I was wondering if someone could help me figure out what's going wrong with my code. It's at the very end of a code that, once a link to a geodatabase is inserted, will print the name, directory, ...
3
votes
1answer
30 views

Getting different pixel depths from output raster when done in ArcMap versus Arcpy?

When I use 'Plus' in Spatial Analyst to add together two 8-bit unsigned rasters (pixel values 0-100) the output raster is 8-bit unsigned (pixel values 0-200) but when I try and do the same thing ...
2
votes
2answers
68 views

FeatureClassToFeatureClass_conversion: How to export feature class to shapefile without losing OBJECTID

I am trying to automate a workflow which involves exporting multiple feature classes (within a geodatabase) to shapefile format. My inclination has been to use the ...