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

learn more… | top users | synonyms (1)

1
vote
1answer
19 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
22 views

How do I have my layers add to TOC

This is my Script: # nrcs_script_main.py # Description: This Script will serve to create a geodatabase, create Area of Interest Raster Datasets, and process them with external functions # Parameters ...
0
votes
1answer
33 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 ...
3
votes
1answer
60 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
36 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
83 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
56 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
51 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
30 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
68 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
144 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
73 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
44 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
62 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
42 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
29 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
30 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
24 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
52 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
56 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
53 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
85 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 ...
0
votes
0answers
47 views

How to resolve warning messages from standalone script?

The standalone script, loaded from OSGeo4W Shell and copied below, follows a set of steps: Create grid with cells length/width at 200m Clip a polygon layer onto the grid Use Distance to nearest hub ...
2
votes
1answer
49 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
51 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
185 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
24 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
57 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
64 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
39 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
73 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
99 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
26 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
318 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
28 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
158 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
60 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
77 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
328 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
81 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. ...
1
vote
1answer
80 views

In qgis using python, how can I get multiple pixels from a raster based on a vector point file

I just started working with qgis, and for the life of me I cannot figure out how to solve this problem: I have several points of interest, these are stored in a shape file (just simple points). I ...
2
votes
1answer
91 views

How to query values from a list in Python?

I have a list like this... list = ['1','2','3','4'] how can I use arcpy.Select_analysis to select features that have the attributes in the list. qry = '"SECDIVNO" IN ' + str(tuple(list)) ...
2
votes
1answer
92 views

Legal description polygon mapping/creation with Arcpy

What I have: an excel file with the names of properties within an area that is part of the PLSS in which Township/Range, Section and Lot numbers are used. The file contains a legal description for ...
3
votes
1answer
104 views

Getting Script Error has occurred in script on this page when running polygon to raster conversion?

i keep getting the script error problem every time i try using polygon to raster tool in ArcGIS 10.1. Please help me how I can solve this? screenshot embedded
1
vote
1answer
124 views

Using if else statement in Python Parser of Field Calculator in ArcGIS for Desktop?

I need help in writing the python script in the field calculator. I have three fields namely: CODE COMPLEX Map1 Map1 is an empty field that I want to populate. I have a number of conditions to cater ...
2
votes
0answers
46 views

GIS related scripting [closed]

This might not be strictly GIS related, but here goes. I am looking for a script (DOS based) or application (Windows) that does the following: In a filesystem there are a collection of raster maps, ...
1
vote
0answers
76 views

Geoserver fails to start after installing scripting extension

I use Geoserver 2.6.0, it worked until I installed latest scripting extension. I followed installation instructions (http://docs.geoserver.org/stable/en/user/community/scripting/installation.html). ...
1
vote
1answer
81 views

GRASS scripting for producing multi-band raster

I am trying to loop the r.sun function within a Python script. Anyway, I seem not to understand how I can stack the raster maps each loop would produce into a single multi-band raster (preferably in ...
1
vote
2answers
199 views

QGIS's raster calculator— running as a batch process?

I have a series of raster files (150 or so) that I need to multiply by a baseline raster. Unfortunately, the series of rasters have a different cell size (30mx30m aka .00027777778 degrees x ...