Python is an open source interpreted programming language used in many GIS programs.

learn more… | top users | synonyms

1
vote
0answers
24 views

How to accelerate my python looping process for A-star path finding on DEM surface?

I try to make an A-star Path Finding program base on tile-graph (image raster data as graph) where each pixel values represent as cost and elevation.. In my case, DEM raster data was called by using ...
1
vote
0answers
19 views

Can't get the web OpenLayers plugins to work because of 'python error' on my mac

I'm trying to get a relatively small section of Google satellite/ Google earth as a layer on Qgis on my mac. When I go to 'web' and the 'open layers' plugin it just comes up with python error. I've ...
1
vote
0answers
29 views

QGIS - Custom Icon to Show my Tool is Running?

I am running QGIS 2.6.1 (Brighton) I've some developers that have made some custom plug-ins, but our testers are complaining that they cannot tell when, if or what tool / plug-in is running. Is there ...
1
vote
0answers
15 views

Can't import liblas into OSGeo4w Python on Windows machine

I installed the 32-bit version of OSGeo4w with the liblas-python packages on my Windows machine. When I try to import liblas into python, I get an error that no 'liblas' module can be found, even ...
1
vote
0answers
29 views

How accurate i pythons is_land? Alternatives?

I was planning to use Pythons is_land function, to differentiate between land and sea. However, after some inspection, I have major concerns in the accuracy. I cant find anything about this in the ...
1
vote
0answers
25 views

Using arcgisimage along with python basemap

I am utilizing maps provided through the ArcGIS rest service when i plot information in Python, but have some problems understanding the different options I have when I request I map. The ...
1
vote
0answers
35 views

Using ModelBuilder or Python parser of Field Calculator to check values between two datasets?

I have a *.dbf that I need to check values against for a shapefile. I need to report whether the values match the dbf in the shapefile and, if not, what the value should have been (in two new ...
1
vote
0answers
68 views

How to wait for mapCanvas render before taking a screenshot?

i am trying to iterate over a large list of features and making a screenshot of the selected feature. My problem is that it seems to be a delay between the refreshing of the canvas and the taking of ...
1
vote
0answers
28 views

How to react to network events

I am in the process of writing a Plugin which should react to some data (XML-Format) sent via a socket connection. Since I have never worked with IPC in terms of python before and my knowledge of IPC ...
1
vote
0answers
19 views

Couldn't load plugin sextantelwgeomprovider, QGIS 2.0.1 on Ubuntu 14.04.2

I'm getting this error message when I start QGIS Couldn't load plugin sextantelwgeomprovider due an error when calling its classFactory() method Traceback (most recent call last): File ...
1
vote
0answers
38 views

Generating shapefile of polylines using pyshp from a csv file and opening file in qgis

I tried the solution posted in: Creating Polyline from GML using PyShp?, Using PyShp to convert polygons in *.csv to *.shp files? and Using PyShp to create polygon shapefiles? to generate ...
1
vote
0answers
21 views

How can i add sub menu under custom top menu in QGIS using python

I have added "My Tools" Menu on top. Now i am clicking on "Plugin" then selecting QGIS Plugin bulider. Here in the menu field a drop down list is coming. How can i add "My tools" in this drop down ...
1
vote
0answers
52 views

How can i add custom menu in QGIS Using python

I am tried to add a custom main menu in QGIS Desktop Application. Here I am already added custom sub menu in QGIS but I want to add a custom main menu in QGIS using Python. See the blow image.
1
vote
0answers
20 views

surface area in a basin with reference to incremental height of DAM

I want to calculate "surface area in a basin with reference to incremental height of DAM" i tried this: step_size = 10 # metres; reduce this if you want finer resolution num_steps = 20 # increase ...
1
vote
0answers
45 views

How to define a custom function that returns value of a field in an unsaved form

Filter expression builder in QGIS 2.8 allows us to define custom functions using python. I'm intrested would it be possible to define a function which returns a value of a field in an unsaved form ...
1
vote
0answers
58 views

way in R or Python to add image/video in map plot marker click popup/infowindow

I have many different (lat,long data) points of world associated with unique place names and corresponding each point specific image or video data. Now I want to create an html file where if user ...
1
vote
0answers
101 views

Minidump on exit in QGIS (2.8.2- Wien) 64-bit version when using GDAL in plugin

I am working on a plugin for QGIS that is working fine on 32-bit versions but I am having some problems while using it on the 64-bit standalone installation package. I have tried on several machines ...
1
vote
0answers
39 views

rasters written with gdal show up with units of meters when they should be degrees

I have some SMOS soil moisture data packaged in a netcdf format distributed by "cp34-bec". I have been able to use GDAL to extract this data as a raster layer, using a projection i think is ...
1
vote
0answers
47 views

PyQGIS Standalone Crashes python.exe when zooming out too far / Process finished with exit code -1073741819 (0xC0000005)

I have the following PyQGIS Standalone App which is working fine so far. One little problem is that if I zoom out to the MaxExtent(by scrolling the mousewheel) the app crashes python.exe so that the ...
1
vote
0answers
79 views

import qgis.core problem with QgsFeature and QgsGeometry ImportError: DLL load failed: The specified procedure could not be found

I've tried several previous answers to similar questions - no luck. I've tried everything, nothing seems to work. This is the error I'm getting Traceback (most recent call last): File ...
1
vote
0answers
92 views

Using gdal_merge to merge a large amount of files (in pairs)

I'm new to python and how it can be applied to gis. I have a large amount of MODIS files to go through and I've already extracted, reprojected and converted to GTiff the bands that I need from each ...
1
vote
0answers
20 views

Accessing elements Linestring and points from a DGN file and displaying both layers on QgsMapCanvas

I am using PyQGIS APIs to develop a standalone application which currently display's map data layers on QgsMapCanvas from .shp, .tif, .dgn files. I am able to do it for .shp and .tif but not for .dgn ...
1
vote
0answers
43 views

If then statement in model builder

I have a model that adds several fields, two which are manual inputs (County Name and User). I am manipulating several parcel layers (approx 90 counties). In my model, one field takes the state and ...
1
vote
0answers
48 views

import qgis geoprocessing tools in python os x 10.9.5

I'd like to use the python bindings from qgis, but in a standalone project. I need the geoprocessing tools for vectors. I updated QGIS (Wien - 2.8), python (3.4.3), etc. However, it always ends with ...
1
vote
0answers
59 views

QGIS python originalName() does not return actual original layer name

I am writing a Python QGIS Plugin, using QGIS version 2.6 as the basis for development. When loading data into the canvas programmatically, I am trying to maintain the spatialite table name as the ...
1
vote
0answers
52 views

How to automatically generate pour points along stream network?

The following screenshot shows the results of a water flow analysis where I identified stream order via the Strahler method in ArcGIS. Now I need to generate watersheds for 2nd order streams and ...
1
vote
0answers
34 views

Execute GRASS command within qgis phython console

We try to calculate catchments with the r.water.outlet function from python console. To do so we use the following code: import processing rlayer = QgsRasterLayer("/my/path/DrainageDirection.tif", ...
1
vote
0answers
47 views

Spatial join with multiple intersecting features

I have a polygon dataset representing pavement areas broken up by year of construction and a roads centerline dataset that contains values for remaining service life (RSL). I want to spatially join ...
1
vote
0answers
181 views

ImportError: No module named sip

I have been trying to write a custom application to generate contour from QGIS. This is my starting code: import os; from qgis.core import *; This is the error i am getting: Traceback (most recent ...
1
vote
0answers
42 views

Algorithm for re-numbering duplicate feature IDs based on distance along line (PyQGIS and QGIS 2.8)

I've got something working for QGIS 2.8 using Python 2.7 on Windows 7, but I am missing an important part of the puzzle. I'm trying to develop an algorithm to number homes. I've now come to a point ...
1
vote
0answers
41 views

GRASS and SAGA CentOS Linux release 7.1.1503 (Core)

I have a problem. I am developing a standalone app using QGIS but my script imports GRASS nad SAGA plugins and I have error to create the maps. I have CentOS Linux release 7.1.1503 (Core). SAGA is ...
1
vote
0answers
39 views

How to “output to a raster file” in a standalone app based on a composition?

In a standalone app I want to create a print composer with the map, a legend and a scale bar. I try with different codes but without success. I search in several foruns but I didn't find an answer. ...
1
vote
0answers
47 views

Remove Frame Border from USGS scanned images in ArcGIS

I have a couple of USGS scanned maps like I want to remove the frame border from these images so that I can use them in ArcGIS. Is there algorithm or python script that I can run to remove the ...
1
vote
0answers
32 views

Converting Tiles to Geopackage with Python

I am trying to convert tiles (as png) into geopackage. In order to do so, I would like to use the geopackage-python tool. However, when executing the script I run into the following error: Layer 14 ...
1
vote
0answers
35 views

QGIS / Python differences in result

I am working on a script that automatically calculates something for me. To be sure, I checked the result of the calculation with QGIS. Here are the statistics: STATISTICS PYTHON-CODE: MAXIMUM = ...
1
vote
0answers
15 views

Error in installing gsconfig python library for manipulating a GeoServer instance via the GeoServer RESTConfig API

I like to install gsconfig python libraries I got error like this Collecting gsconfig Downloading gsconfig-0.6.13.tar.gz Traceback (most recent call last): File "<string>", line 20, in ...
1
vote
0answers
66 views

Use Gdal from Python IDE

I am just starting to experiment with writing python scripts. I have been using QGIS and the Osgeo4w shell for sometime now. I would like to be able to call Gdal from the python IDE i have installed ...
1
vote
0answers
83 views

Are there any Python scripts available for Hydrology to compute watershed Basin from csv file?

Let's say I have surface data available in CSV format (x,y,z). In order to create a watershed basin from surface data, there are some intermediate steps we need to follow. ASCII to surface raster ...
1
vote
0answers
95 views

Update Data Driven Pages Index layer via Python

I am trying to find a way to update the index layer for data driven pages through arcpy. I understand that to access DDP from arcpy.mapping you need to be referencing a MXD that has DDP enabled. My ...
1
vote
0answers
72 views

I am building QGIS 2.6.1 from source code on windows 7, 32 bit and after successfully building all projects I get this error

Couldn't load PyQGIS. Python support will be disabled. Traceback (most recent call last): File "", line 1, in ImportError: No module named qgis.core Python version: 2.7.4 (default, Apr ...
1
vote
0answers
28 views

Cloud and cloud shadow identification with MERIS

I am looking at MERIS images to use for marine applications (Chl-a. SPM) and would like to confidently remove cloud and cloud shadow pixels from the data. I have a few ideas: Using the blue band ...
1
vote
0answers
108 views

Connect to PostGIS database from Q GIS

I am having trouble connecting to a postgresql database hosed on my local host. I have gotten a python script to connect and connected through the command line, but for the life of me cant connect to ...
1
vote
0answers
102 views

Compression Algorithms output files larger than the originals. Why?

I'm currently attempting to write a script that will compress a few hundred .tif files. I've tried two approaches, first I wrote a script in Python using CopyRaster_management() function and the ...
1
vote
0answers
70 views

Setting up PyCharm CE 4 to work with PyQGIS library in Mac OS

I am trying to set up pycharm to work with pyQgis library but with not success till now. I am using PyCharm CE v4 and QGIS version 2.8 I have tried to implemnte the instructions of several posts like ...
1
vote
0answers
71 views

Calculating Climate Suitable Days using netCDF4 and Python?

This is a follow up to netCDF4 Python climate algorithm I’m relatively novice in using netCDF files, so I’m wondering if someone can check my logic on my process of delineating what has been defined ...
1
vote
0answers
61 views

How to use d.* from a python/bash script in GRASS GIS 7.0?

Do d.* commands from GRASS GIS 7.0 run from a python script? I'm trying with this code: import grass.script as grass grass.run_command('d.mon', start="wx3", resolution = '1') ...
1
vote
0answers
32 views

Action on group of features from layer in QGIS?

I need to implement a rename action on a selected group of features in a certain order. The idea is that I would rename one feature and then select the features that are 'next in line' and execute a ...
1
vote
0answers
47 views

Are there any conditions that could break the creation of an arcpy.Polygon object?

I have a script that generates a mesh network from vertex and centroid inputs, and it works for almost all my points. But for some records that get created in the feature class via the script, their ...
1
vote
0answers
147 views

How to control QGIS from within Anaconda's Spyder (Continuum Analytics Python distribution) in Windows

I would like to control QGIS from within Anaconda's Spyder, in particular use the QGIS core modules. My config: Windows 7 Anaconda 64x for Python 2.7 Spyder 2.3 Postgresql 9.4 PostGIS 2.1 QGIS 2.8 ...
1
vote
0answers
225 views

Running Python outside of QGIS - (ImportError: No module named qgis.core)

I'm trying to run simple scripts on QGIS from outside the QGIS environment - as here How to run a simple python script for QGIS from outside (e.g. Sublime Text)? My code: import sys ...