The act of setting up computing instructions, usually stored in a file and interpreted at run time.

learn more… | top users | synonyms (1)

0
votes
0answers
21 views

How to remove “ERROR 1” messages from a standalone QGIS script?

I am running a standalone script for QGIS which creates a high resolution grid and clips shapefiles onto it. Works perfect if the cell width and height have a high values (in my case, >200m for both). ...
0
votes
1answer
36 views

Intermediate files disappear in ArcGIS 10.1

I am working with ArcGIS 10.1 creating some slope and aspect files. I do this: DEM_park = ExtractByMask(mosaic_name, park_area) and it creates the DEM_park file in a default gdb with a default ...
1
vote
4answers
162 views

Python script for Field Calculator. ArcGis 10.2.2

I have a point shapefile with two columns i want to process. The first column is aspect and the second is aspect_m60, there is only one row with the aspect of my point. I have tried to write a script ...
3
votes
1answer
73 views

Alternative to an arcpy script for points to lines to polygons?

I'm relatively new to arcpy and python, so I feel like I could be missing something obvious in regards to tool options for what I'm trying to achieve. I have a script that creates triangular ...
0
votes
1answer
34 views

A script that only deletes fields within an attribute table specified by the user

I would like a script that will be executed in ArcGIS that only deletes fields within an attribute table that are specified by the user. As I understand it, this can be done in Modelbuilder but was ...
2
votes
1answer
137 views

Standalone script looping incorrectly?

Following on from my previous question, I would like the script to do the following (includes illustration): Search for the first shapefile (Paris (O).shp) in Country_France > Original files and ...
0
votes
0answers
12 views

Spatial Modeler language variable inputs based raster name

I´m using Erdas Imagine 2010 and need to process images to get reflectance values using the Empirical Line method. To achieve this I need to process 200+ images, each containing multiple bands, with a ...
2
votes
2answers
113 views

How to use `layer.getFeatures()` in a standalone script?

I am following the QGIS Cookbook and this post where it concerns reading attributes from layers. I would like to exploit this method and implement it into a standalone script. Essentially, I want to ...
1
vote
1answer
28 views

Drag and Drop Custom Tools into Modelbuilder using ArcGIS Pro 1.0

I am having trouble dragging and dropping python scripts from a custom 10.3 toolbox into a modelbuilder model in ArcGIS Pro 1.0. Is there a way to activate this capability?
3
votes
2answers
85 views

Using folder wildcards to copy files with Python

I would like to copy the data of one specific shapefile from a specific folder ("Grid") to a number of folders containing the name "Country". The country shapefiles would keep their original name. ...
1
vote
1answer
30 views

Rename output shapefiles in PyQGIS

I have a shapefile which resides in a folder, gets processed and the output is saved in another folder. Before the output, I would like to rename the shapefile slightly differently from the original: ...
0
votes
1answer
37 views

How do I have my layers add to TOC at the end of the process

I would like each function to be added into the opened mxd. This was originally designed to run in Catalog, but the users will all be using ArcMap. This is my Script: # nrcs_script_main.py # ...
0
votes
1answer
42 views

Script not processing shapefiles from one folder to another

I am working on a script which takes shapefiles from one folder called "Original files", process them and then output the results into another folder named "Processed files. I asked a question on how ...
4
votes
1answer
120 views

Can multiprocessing with arcpy be run in a script tool?

I have been tinkering around with the multiprocessing module to resolve some processing of data in ArcMap 10.3. I have created a script which works fine if I run it in IDLE. I see all my cores max ...
0
votes
2answers
45 views

Deleting rows on dbf table with python for ModelBuilder?

Being not very familiar with python, and after carrying out unfruitful long researches on internet, I submit to you my problem, hoping favorable reply. I have a DBF table with geochemical data and I ...
1
vote
2answers
110 views

Calculate distance between a set of points: lat and long in QGIS or R

I have shapefiles containing the location of several individuals along several months. Positions were documented with a 30 minutes interval. Tables contain the following data fields: collar (ID), ...
4
votes
1answer
69 views

From everywhere to everywhere in spatial network

ArcGIS Network Analyst question: I have a network dataset representing an archaeological site with ~500 buildings. Each doorway of these buildings represents a terminal node. I would like to simulate ...
2
votes
1answer
59 views

Python tool won't stop running— Not an infinite loop issue

I'm having trouble with a python script. It is essentially a near duplicate of another script which is running fine-- it is using different files, but apart from that the tools used and the order in ...
1
vote
0answers
35 views

Arcpy script or other method for points in polygon per participant

Is there an Arcpy script or another way that I could use to find out the number of GPS points falling within each participant’s home neighbourhood as defined by an 800 meter network buffer around the ...
4
votes
1answer
84 views

How to create list of strings as parameter to script

I am trying to have a list of strings to pass as parameter to my script: when I start the script it displays: With "Add Value' button disabled. What am I missing here?
1
vote
3answers
149 views

Automatically add vertex to polygon where vertex of another polygon touches it?

The polygons that I use in ArcMap 10.2 are drawn so that they snap to each other, but never overlap. I've described a general case in the following image: A polygon is defined by the minimum ...
3
votes
2answers
82 views

How to access checked layers in PyQGIS?

qgis.utils.iface.activeLayer() accesses the current active layer, but I would like to get all checked layers in the QGIS ToC. How can I do it?
0
votes
1answer
59 views

How do you project a single pointGeometry object with arcpy?

In an attempt to create a python add-in for ArcMap that will pass x and y coordinates to another application via a mouse click on the map, I have written the following code. I need the output ...
3
votes
0answers
71 views

How to stop a PyQGIS script that has an infinite loop, using the keyboard?

So i wrote a script that does what i want over and over again using a "while True:" in a certain time interval (every 5 seconds using time.sleep(5)). So far so good BUT when i want to stop it i just ...
2
votes
1answer
46 views

Why this Python script only works once on QGIS?

So i have this script to change the color of some specific features(lines) using categories in a vector layer. When i import the script the console in the first time through the console it works just ...
1
vote
1answer
37 views

How to change the color of a specific feature(s) with a PyQGIS script

First of all im a big noob so don't hate. So image that the lines that i have drawn is simple pipeline network, represented by some simple lines in a vector layer. Now the question is, how can i ...
0
votes
1answer
35 views

How to get layers created in a custom toolbox python script to add to the mxd

I'm trying to create a simple search tool so that my colleagues can easily query a database. My first version is like this. mxd = arcpy.mapping.MapDocument("CURRENT") df = ...
2
votes
0answers
37 views

An Error Has Occurred Running Scripts On This Page - Repairing issue with batch script?

If you've been using ArcGIS for a while, you will have most likely come across this error: The issue is linked to some sort of ActiveX plugin security setting in the 32 bit version of Internet ...
0
votes
1answer
65 views

Cannot rename output file using standalone script for QGIS

I would like to rename all output files after my script has finished processing them by adding "(A)" after their file name (eg. Layer.shp -> Layer (A).shp). I received an answer from this post on the ...
2
votes
1answer
63 views

Script to export OD matrix line tables for individual point features

I have a network dataset and I would like to know the network distance (not Euclidean) from each feature point in a shapefile to each other point in another shapefile with the same number of points. ...
2
votes
1answer
59 views

QGIS gets stuck when running script to automatically refresh layer [closed]

I have a QGIS layer that represents a set of links and nodes to show the streets of a city and the traffic speeds on each street. I've been trying to write a script so that if I change the speeds in ...
2
votes
1answer
89 views

Why does thumbnail on one MXD not update?"

I want to make modification on multi-mxd properties, I try Arcpy script with a loop like " for mxd in mxdList:" , but I always have same results, Thumbnails are not created... import arcpy,os ...
2
votes
1answer
51 views

Creating Branching Python Script, Based on Whether Feature Classes Exists or Not?

What I would like to do is create a script that checks the existence of a feature class and, depending whether it does or not does, skip to different process. This would need to be implemented in ...
1
vote
1answer
60 views

How to find duplicate values that ALL share the same attributes

I am using Arcgis Desktop 10.2. Using python script i am trying to resolve the following : I have 2 columns of data, one containing alphanumeric values, the other some strings like "-1", "-2", "-3" ...
2
votes
3answers
197 views

Why script works on my computer but not on another?

The script below works perfectly fine in my computer. But when running the script on another computer, I receive an error: Error: Algorithm not found The computer has similar specifications to ...
1
vote
0answers
27 views

Manifold GIS Scripting/Queries — query a web page and scrape page source?

I'm using Manifold v8.0 to process some data. The process involves some scripting and querying, but one step currently requires me to go to a website, enter some data into a form, read the results of ...
1
vote
2answers
65 views

Is it possible to toggle draft mode in ArcGIS with Python?

I'm curious if it is possible to toggle on and off 'draft mode' in layout view in ArcGIS using python scripting. Does anyone have any ideas? Python is preferred, but if there is another solution in a ...
0
votes
1answer
72 views

How to show the attribute table of selected features using arcpy?

Is there a way to show the attribute table of selected features using arcpy? Maybe in the mapping module? I would like to be able to select some features and then have an Add-In button that ...
1
vote
2answers
45 views

How can I disable logs being created in standalone python script?

When I run the following script in QGIS 2.6.1, it produces a folder called 'processing', which contains a log, in the directory it reads files from. And since the script reads files from several ...
2
votes
1answer
88 views

How to get shapefile extent from standalone script?

I am trying to obtain the extent of a polygon in a shapefile. I am running a standalone script which will create a grid based on the extent of the polygon. I have tried 2 methods: one from the ...
1
vote
1answer
110 views

How to add fields to shapefile from standalone script?

When I run the following script via OSGEO4W64 Shell, I receive the following error when trying to run the qgis:fieldcalculator algorithm: 'NoneType' object has no attribute 'mapCanvas' I read ...
1
vote
0answers
27 views

Error after executing hex grid script in QGIS 2.6 for Mac

I hope some of you might help me in solving this problem: I'm trying to load a script with QGIS, hex grid from layers bound, with a population shape file (popp.shp in egis sample data folder). After ...
6
votes
2answers
404 views

Cannot run standalone QGIS script

I've been trying, along with this post, to run a script in OSGeo4w Shell, outside of QGIS. But I get the following error: ImportError: No module named qgis.core I have also read the following ...
1
vote
0answers
29 views

Searching a table within PostGIS using PyQGIS script

Morning all, I am looking for some guidance in trying to set up a script that will search a PostGIS database using a wildcard and then open a certain file directory that will be in one of the fields. ...
0
votes
0answers
11 views

Divided road segments and number subdivided of them [duplicate]

I use software ArcGIS 10.2.2. let me try to explain with an example: I divided the road segment called A that is 60 km long as each of them is 1 km by XToolPro. totally I have 60 subdivided. But ...
2
votes
2answers
181 views

In ESRI ArcGIS, is there an equivalent to the RStudio Console Windows?

UPDATED I know ESRI provides scripting capacity, via the Python window, but I've had a hard time with it. Making the jump from the Field calculator to the Python window was too much to me. Trying to ...
1
vote
0answers
70 views

Unable to call GDAL functionalities from Python

I am trying to call GDAL functionalities from the following script I made in the past. import os, fnmatch from subprocess import call call("dir", shell=True) # define the variables inFolder= ...
3
votes
1answer
95 views

Getting random values from geometryType() in a standalone PyQGIS script

I am asking this question based on the result I received from this earlier post. The following script only works if I set geometryType() == 3 as that is what is being printed out in the Python console ...
4
votes
2answers
354 views

How to identify polygon/point shapefiles in python?

I have a script which performs various functions on shapefiles, most of which are polygon-based. However, some shapefiles are point-based and I have to specify where these files are by editing the ...
1
vote
1answer
86 views

How to get the layer name with a arcpy code

Using the FeatureToPoint tool I've having difficulty calling just the name for file without the extension or path. Here is the part of the script that I'm creating that Im stuck on. eg. ...