Python is an open source interpreted programming language used in many GIS programs.
0
votes
0answers
6 views
PyQgis question: How to change or set active layer?
Developing a qgis plugin, I found that if no layer is selected in the Layers panel I can iterate over all layers and do anything to them, but "activate" them.
Could someone give me a hint please? ...
3
votes
1answer
19 views
Can Spatialite SQL statements be issued with a python script in QGIS?
In my previous scripting environments (ms-access and Manifold GIS), it was possible to create and execute SQL queries from withing VBA or VB Script procedures. This is really useful for things such ...
1
vote
0answers
20 views
Python Script within ArcMap running GME Command passes a double forward slash when writing the log file
I thought I made some serious headway there today. My script works perfectly fine when run from a Python Shell, but in ArcMap, whether the script is run from the Python Command line, or within a ...
0
votes
0answers
18 views
How to set option that opens results of identification tool in form using python in QGIS plugin?
I would like to set "Open a feature form, if a single feature is indetified" when I run my python QGIS plugin? Is it possible?
I am developing plugin for users without GIS and QGIS experience. I ...
-2
votes
0answers
31 views
Reading a specific row & columns of data in a text file with python [on hold]
I am new to Python and I need to extract data from a text file (.txt). I have a text file below I need to get the data from the third column below the text. I need to put the values into a python list
...
3
votes
2answers
66 views
Best practice in writing automated tests for QGIS plugins
I'm looking for some best practice advice on writing automatic tests for QGIS plugins written in Python.
I have written tests for Python scripts in the past using PyUnit (the unittest module), but ...
1
vote
0answers
79 views
New python GIS Programmer : Fundamentals of the Python Language for ArcGIS [on hold]
I am new to programming and I'm trying to learn "Fundamentals of the Python Language for ArcGIS" and then I've been trying to compile an example code but python GUI keeps throwing throwing this error
...
5
votes
2answers
75 views
Field calculator script to work out first 5 dominant area fields?
I have 5 fields of different landcover types with areas of each and found below:
> PRC_Water| PRC_Bare| PRC_Urban| PRC_LVeg| PRC_LVeg|
> 5 20 40 20 15
I have ...
2
votes
0answers
25 views
Convert absolute file path to raster databaset [on hold]
I wrote a simple python script that outputs an absolute path as string to a GeoTiff file. So this file can be treated as Raster.
In a Model, the GeoTiff file is to be the input raster of a CopyRaster ...
0
votes
2answers
45 views
Reading National Elevation Dataset (ArcGrid/GridFloat/IMG) with python only tools
I've found high precision elevation (1/3 - 1/9 arcsecond resolution) data from the National Elevation Dataset provided by the USGS. It comes int IMG, Arcgrid, and GridFloat formats. I know ArcGrid ...
2
votes
1answer
49 views
Change python + ogr2ogr.exe to python + ogr
I have written several complicated python scripts that end up using ogr2ogr to load or translate data. I have been converting these scripts to standalone exe files meaning the team do not require ...
3
votes
1answer
89 views
Small script crashes Python
I'm running a rather simple script with ArcPy, which extracts values of raster to points of a shapefile:
def raster_overlay(input_files):
for raster in input_files:
in_shp = ...
2
votes
0answers
40 views
Is it possible to run a search cursor on a multipart feature class?
I have a multipart feature class of cities. I want to run a search cursor on a cities feature class where:
one city is selected and a select layer by location is run to select all parcels that are ...
3
votes
1answer
40 views
How to load a NetCDF-file into QGIS using Python?
I have a CF-conform NetCDF-file which can be loaded into Quantum GIS (Version 1.8) by using the "Add Raster Layer"-button and subsequently choosing the file and the raster layers of interest. This ...
1
vote
1answer
90 views
Python geoprocessing performance [on hold]
I'm using ArcGIS Server 10.0. I have a python geoprocessing that takes a lot of time. The geoprocessing calculates geometries using points, polygons, buffers, and cursors.
I'm also using sql queries ...