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

learn more… | top users | synonyms

2
votes
0answers
109 views

How to call a method when self.iface.actionSelectRectangle().trigger() is released?

In my QGIS python plugin I use "self.iface.actionSelectRectangle().trigger()" to select features. I also have a button which changes the attributes of the selected features. Is there a way instead ...
2
votes
0answers
219 views

qgis and embedded ajax (bing map)

I need to load in a docked QWebView this html: < html > < body > < iframe width="100%" height="499" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://...
2
votes
0answers
216 views

How can I draw an ellipse filling the dataframe with ArcPy?

I need to modify one of my template scripts to draw a circle from the centre of the (inset) data frame to the edge of the data frame. This will then be used to clip the data frame to shape. I'm using ...
2
votes
0answers
65 views

How do I make a path cross the most possible classes in a raster?

I want to create a function and possibly use Arcmap tools to create something similar to Cost Path. Instead of just choosing the LCP, it must cross through the most different integers. Let's say I ...
2
votes
0answers
158 views

Why would an ArcGIS 10 Python custom tool fail without throwing a “failed to execute” or “completed script” message at the end?

I have written a custom tool in Python for ArcGIS that converts in batch SHP files to GML files. It processes one file at a time in a folder, file, or ZIP file and then moves on to the next. If the ...
2
votes
0answers
163 views

Are there Plugin Compatibility Issues between QGIS 1.6.0 and 1.7.4?

I've been working on a QGIS plugin on Quantum GIS 1.6.0 Copiapo with Python 2.5 that calculates additional values for eachf feature of a vector layer and adds them to the .dbf. We've just upgraded to ...
2
votes
0answers
299 views

Recalculate Quantile Breakpoints in CalculateField_management loop?

I have a program that iteratively replaces a temp field where I choose a certain symbology (color ramp and quantile color break methodology) with a few other fields from a join. The program works in ...
2
votes
0answers
670 views

Large point to Polygon by buffer-join-buffer-dissolve issues

I have a few large datasets (about 10 million points) which I am buffering, then joining, dowgrading and finally buffering and dissolving. This is all in a model which works fine with sample smaller ...
2
votes
0answers
58 views

Tiled image transforming to new profile

i have a set of tile which was tiled profile of mercator and proper to tms scheme mechanism. unfortunately i dont have any tif or georeference table or anything for this. all was tiled with mercator ...
2
votes
0answers
200 views

Is there any way to suppress the calculate field dialog box in arcpy script?

I've got a python script that I inherited. The python script takes input from a variety of feature classes and tables and spit it out to a single table. When I run this script via a scheduling ...
2
votes
0answers
1k views

Perfectly running python script gives error when run from web.py

I have the following python script which runs perfectly if run separately: import arcpy val = arcpy.GetCellValue_management("D:\dem-merged\lidar_wsg84", "-95.090174910630012 29.973962146120652", "")...
2
votes
0answers
845 views

Spatial Analyst Cell Statistics seems to give the wrong answer in ArcGIS 10.0

I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this: stdevGrid = arcpy.sa.CellStatistics(...
1
vote
0answers
16 views

Segmentation fault in readasarray

I am running the following code and get: Segmentation fault (core dumped) I have no clue why, I have been using the functions many times before and now suddenly this happens. Sometimes it happens at ...
1
vote
0answers
11 views

Getting the activeLayer() in Eclipse

I've been working on a plugin in python for qgis. I'm using Eclipse-pydev with remote-debug. I believe I'm set up correctly; I've followedthe Cookbook instructions completely. When starting remote-...
1
vote
0answers
14 views

How to implement a Plotting widget into already existing PyQt4 Interface

I am using Python, PyQgis for about one week and already built a plugin for GIS 2.14 which is -so far- working pretty well. As my next step I want to add a widget to plot data to my already existing ...
1
vote
0answers
22 views

QGIS: startup.py executed twice?

To test something I have a very simple startup.py file in my .qgis/python folder: import qgis qgis.utils.iface.actionShowPythonDialog().trigger() print "Welcome chump" Python console launches fine,...
1
vote
0answers
26 views

Autofill fields of pyQgis script

I have three fields of output vector layer in Qgis script: ##output_vector_first=output vector ##output_vector_second=output vector ##output_vector_third=output vector When user fill first field I ...
1
vote
0answers
27 views

Merging DEM file generted many negative value in QGIS

With four DEM files downloaded by Python Elevation package, I merged them in QGIS 2.8.3. I use raster-> Miscellanaous -> Input direction, no more attribute was added. The four dem data has ...
1
vote
0answers
52 views

Cannot run QGIS algorithm with python script without interface

I'm trying to run the QGIS 'intersection' algorithm from a Python script: (Working with Ubuntu) #!/usr/bin/env python # -*- coding: UTF-8 -*- import sys from qgis.core import * from PyQt4.QtGui ...
1
vote
0answers
12 views

Duplicate an existing geoserver style using gsconfig

I am playing around with gsconfig and trying to assign a new style on a layer I have created. What I want to do is to actually create a new style, which is the same with an existing one. I searched ...
1
vote
0answers
31 views

Find and filter points within a variable radius

I have a set of projected spatial points (x,y,id,dist,value) that needs to be filtered. For each point I have to find the other ones falling within a variable distance. For each selection, I need only ...
1
vote
0answers
27 views

Qgis standalone script using eclipse IDE -No data provider available issue

I know, the question is asked few times also in this forum but i apply already the presented solutions without any chance to fix the problem. In General the source code looks like the following: from ...
1
vote
0answers
23 views

Using Python to alter the drawing layers visibility within the layer properties?

Does anyone know of a way that I could programmatically access and alter the visibility of each individual drawing layer found within the layers property dialog box? The CAD file that I have brought ...
1
vote
0answers
62 views

Find Properties of Nearest Line Segments to Point in Python

I have been trying to find a workable Python approach to finding nearest line segments to one (or more) points, and came accross @gene's solution to @RustyMagoo's problem here: from shapely.geometry ...
1
vote
0answers
17 views

Icon in title of dockwidget

Is it possible to incorporate an icon in the title toolbar of a dockwidget? Semi-classification plugin has this. Is it possible?
1
vote
0answers
18 views

Load a GeoJSON layer with mixed geometries via QGIS's Python module

I have been able to connect my collection in MongoDB , write and store the collection to as .json file and load the GeoJSON file as a layer by QGIS's Python module unless there are mixed geometries. ...
1
vote
0answers
37 views

Spatially Analyzing two layers within same File Geodatabase using Python / Shapely?

I'm using a nested for-loop to do Shapely analysis between two Python lists created via two pre-reads of the same GDB file. One list contains all the features of a particular layer while the other ...
1
vote
0answers
31 views

Qgis python: no interaction with Map Canvas

I've created a simple python script to load and show two layers and zoom to the first one. It looks like the script doesn't run the last 4 lines after I uncomment'print lyr1'. Anyway the map canvas is ...
1
vote
0answers
34 views

Per-pixel Descriptive Statistics through multiple Raster layers

I'm looking for computing different descriptive statistics through a set of raster layers. I need to make it with a python script capable of running into a standalone tool within the QGIS. To do so ...
1
vote
0answers
20 views

pyd error install qgis 2.14

I removed qgis 2.10 so i could install qgis 2.14. But when i try to install 2.14 i get errors on python .pyd packages. Every time it is a different pyd causing the error. I had this problem with ...
1
vote
0answers
34 views

How to automatically run some scripts for QGIS python console by defining the python macros checkbox

I'm working with QGIS 2.8 in windows 10. I've defined the python macros checkbox to QGIS start and simultaneously run a script that has the same path from my "QGIS.qgs" file. In the Project>Project ...
1
vote
0answers
48 views

Is there any way to connect features (entities) of dxf to database in python?

I'm using gdal, ezdxf, sqlite python packages and sqlite ODBC driver. They work fine, and in AutoCAD I can easily manually connect to my dbase.sqlite (read only) using _DBCONFIGURE and _DBCONNECT ...
1
vote
0answers
27 views

Nominatim address locator does't give longitude

I'm trying to geocode my addresses based on this tutorial: http://www.digital-geography.com/geocoding-addresses-in-arcgis-the-other-approach/#.VzMq_IR97Rb But Whenever I use Nominatim geocoder it ...
1
vote
0answers
33 views

point in polygon starting with csv and shp in python

I have a csv file with two sets of lat/lon points - the first set of points is represented by columns V1(lon) and V2(lat), and the second set of points by V3(lon) and V4(lat) (the csv does not have ...
1
vote
0answers
53 views

Using Python-Flask-MongoDB with Geolocation field running on App Engine?

I'm trying to write an app which would act as a address caching API, so basically it needs to store addresses (geolocations) and later on I could query on a random address and radius and get all the ...
1
vote
0answers
37 views

Creating an ArcGIS toolbox with an R script

I posted this over on another website but since I think it might be an issue with ArcGIS, I decided to post it here also. So I have the following script in R. in_params[[1]] represents the input CSV ...
1
vote
0answers
29 views

Help with Python shapefile Union Program

First I am a Python noob... I have searched the database for this answer, found a few that might be the answer, just way over my head (I am signed up for a intro python class this month, to help ...
1
vote
0answers
25 views

Export multiple Layer Definition Files (qlr)

I have a postgresql database with approximately 400 tables. I need to generate Layer definition files (qlr) in QGIS for each individual table. Making this manually would take huge amount of time, so I ...
1
vote
0answers
24 views

QGIS cannot load macro function?

This has me stumped. For some reason, I can no longer run a function from a project macro even though macros are enabled (from Settings > Options > General > Enable macros > Always). Just ...
1
vote
0answers
58 views

QGIS 2.14.1 Processing Plug-In does not work anymore (Python error)

I did not change anything and started QGIS 2.14.1 today and was greeted with the following error message. So the Processing tab is missing and I cannot activate it. The error: 2016-04-26T17:58:43 1 ...
1
vote
0answers
43 views

Eclipse PyDev has quit recognizing QGIS objects

I followed the instructions for setting up Eclipse with PyDev to start creating QGIS plug ins found here: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/ide_debugging.html after doing ...
1
vote
0answers
31 views

Python GDAL open dataset in PostGIS with quotations

Error trying to use gdal to open a dataset in PostGIS with the following code: ds = gdal.Open("PG: dbname=nyc host=localhost user=postgres password=mypassword port=5432 mode=2 schema=public column=...
1
vote
0answers
31 views

Using “Ruled Based Render” to display labels without the marker with python in QGIS

I'm writing a script to load and manipulate some shapefiles. Unlike my previous question I now need to display labels only on certain zoom levels. My usual result is that the previous formatting gets ...
1
vote
0answers
51 views

Python error in Qgis 2.14.0

I'm trying to build virtual raster (catalog) following instructions from the documentation in QGIS.. It appears the following error in python code: 2016-04-17T12:13:07 1 Traceback (most recent call ...
1
vote
0answers
28 views

QGIS plugin 'Module' object has no attribute 'classFactory'

I am trying to learn how to make QGIS plugins and have been trying to follow tutorials such as this one; https://anitagraser.com/2014/04/26/getting-started-writing-qgis-2-x-plugins/ but I keep ...
1
vote
0answers
44 views

ogr2ogr - Shapefile database SQL query; missing .cpg and .xml

I am using gdal and ogr2ogr to perform a SQL query on a database of shapefiles with the code below. The geoprocessing works and the appropriate shapefile is extracted from the query, but when I print ...
1
vote
0answers
27 views

Python plugins not available, OS X 10.10.5, QGIS 2.8.4

I’m using OS X Yosemite 10.10.5 and QGIS 2.8.4 Wien. My mainproblem is that python support is disabled and I can’t use python plugins. QGIS seems to act fine and I’ve done a lot of work with QGIS. ...
1
vote
0answers
31 views

Resampling netcdf file?

What is the best way to change the cell size of a netcdf file, keeping it as netcdf? I have looked into ArcGIS and GDAL and have not found anything yet. I prefer to use python if a solution is ...
1
vote
0answers
46 views

QGIS python support disabled

I'm having a problem with the python support of my QGIS version. When I start QGIS, I get the error message: Traceback (most recent call last): File "", line 1, in ImportError: Module use of ...
1
vote
0answers
73 views

How to make NoData transparent?

I have been using python to turn a netcdf into a geotiff. Once I have the geotiff, I am using gdalwarp to transfer it into the right projection. Then use gdal_translate to get the tif into a vrt file....