A version of the Python programming language

learn more… | top users | synonyms

3
votes
1answer
601 views

How to style a layer from console?

I am new to the QGIS python console. I am trying to load a raster layer from the console, set the crs and a specific style from a qml file. layerPath = os.path.join(raster_dir,raster_name) fileInfo = ...
1
vote
2answers
244 views

How do you get all the results from a Selection made by Attribute or Location using ArcPy?

Using arcpy I'm trying to get the results of a selection, or what is currently selected as a list. Basically I'm attempting to build an addin which on click will either perform an operation where I ...
3
votes
1answer
625 views

Import functions in python Add-In logic script

I am running into an error. I have a set of functions which I want to import in the python Add-In script at the time of execution, but when I built Add-In with "import stats" line then tools are ...
5
votes
1answer
328 views

How to do a separate Python installation with ArcGIS?

I see a lot of threads asking how you can have a separate Python installation (e.g. the Anaconda or Python XY distribution) and get it to work with arcpy, while not 'breaking' ArcGIS at the same time. ...
5
votes
1answer
1k views

How can I Setup Python to recognize QGIS

I want to use QGIS and work with Python out of the console, but I'm having troubles letting the system recognize the paths of some DLLs. Since I couldn't find a good answer on the web, I wonder if I ...
4
votes
1answer
255 views

Personal shell launcher for PyQGIS

I have changed a shell launcher found at http://inasafe.linfiniti.com/html/id/developer-docs/platform_windows.html as to fit my wish: setting the system environment variables to be able to use PyQGIS ...
4
votes
2answers
395 views

Gdal Python Bindings and File Geodatabase API

I'm trying to get python 2.7 to work with GDAL/OGR and an ESRI file geodatabase. There have been a few similar questions asked but the answers don't fully resolve my situation. I have installed the ...
2
votes
1answer
59 views

ArcGIS 10.1 Upgrade Geodatabase Check Version

Hi I am trying to check the version of filegeodatabase before upgrading to 10.1, I have a list of file geodatabases and some of them are already in 10.1. Can anyone suggest me how to update only those ...
2
votes
1answer
231 views

pyQgis in stand alone script, vector loading error

I am trying to use the Qgis functions in a stand alone Python script. I m running Mountain Lion OS, 2.7 Python & the Qgis 2.0.1 Dufour. My main problem is that I cannot get started - I cannot ...
2
votes
1answer
284 views

OGR Python bindings

When I try to access one of the GRASS vector files through Python OGR bindings, it gives error: Here is the script code in Python 2.7.3 IDLE (GUI) in Windows 7. from osgeo import ogr ds = ...
1
vote
1answer
54 views

Unexpected output when using gdal_rasterize

Ok, I used the following code for converting my layer into raster format but I get a tif file that is completely black or white... from osgeo import gdal, ogr # Define pixel_size and NoData value ...
1
vote
1answer
133 views

Best Platform to develop QGIS Python Plugins

I am currently developing QGIS Python Plugins in a Windows 7 64-bit environment. Having said this I am stumbling across various issues which from what I have been able to gather have a less tendency ...
1
vote
1answer
594 views

QGIS python location problem

It seems that MacPorts installs Python27 in /opt/local, but that MacPorts QGIS updates and uses the Apple Python27 in /Library. The result is that MacPorts additions to Python27 such as OpenCV don't ...
0
votes
0answers
26 views

How to create an array of points in ArcMap? [duplicate]

I have a master point in following projection system: WGS_1984_UTM_Zone_45N WKID: 32645 Authority: EPSG Projection: Transverse_Mercator False_Easting: 500000.0 False_Northing: 0.0 Central_Meridian: ...
-2
votes
1answer
111 views

“Open Source Routing Machine” querying and parsing

What I have in Python: import requests url_osrm = 'http://router.project-osrm.org/viaroute?loc=50.12345,8.12345&loc=50.23456,8.23456' print url_osrm proxies = {"http": "http://YOUR-PROXY:8080"} ...