Linked Questions

17
votes
3answers
4k views

Import error for qgis.core when running OSGeo4w shell 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 ...
18
votes
2answers
12k views

Problem with import qgis.core when writing a stand-alone PyQGIS script

I am trying to write a stand alone python script in windows 7 that uses qgis.core and various other qgis libraries. I have found an old question on this subject here: Writing standalone Python ...
5
votes
5answers
16k views

How to merge many individual KML layers into one?

I'd like to open a USGS KML file of bedrock geology for an entire county, but there are over 2,000 individual polygon layers. Does anyone know if there is a way to merge all of these layers together ...
6
votes
3answers
4k views

Where is QGIS installation path in Ubuntu

I can't find the QGIS installation path in ubuntu 12.10
11
votes
2answers
2k views

Writing scripts that can call on both Arcpy and PyQGIS?

I have spent quite a bit of time looking for a clear answer this topic and have still been unable to really accomplish my goal of accessing PyQGIS in a stand alone script. Parts of answers have been ...
3
votes
2answers
645 views

Create normal vector and calculate distance between start point and intersection

I have one line-layer which pictures a street net and a point-layer which defines certain locations. Please see in the picture below: What I am trying to do is to create a normal vector through a ...
2
votes
2answers
2k views

QGIS layer tree API returns only groups and not layers

I am trying to use the QGIS python API to read out the groups and layers in a QGIS (2.4) project. Here is a code snippet from my script, which is run from a shell, not from the QGIS python console! ...
2
votes
1answer
2k views

Importing QGIS core into Python on OSX

I am interested in learning how to write standalone scripts using QGIS. An answer to my previous question directed me to the PyGIS CookBook which has the following instructions for importing the ...
4
votes
1answer
272 views

QGIS: Script is being executed successfully in Python console (within QGIS) but not in a standalone python script [duplicate]

I have the following code which I have no problem executing within QGIS (2.8.6) via the python console. What the script does is it adds the two raster layers in my directory via the Raster Calculator: ...
3
votes
0answers
413 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 ...
0
votes
0answers
123 views

Moving polygons to points and rotated using QGIS

I'm using QGIS 2.18.11. So I have a list of various coordinates and rotation angle. I'd like to paste a template polygon with each of their center point positioned on each coordinate and rotated by an ...