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

learn more… | top users | synonyms

0
votes
0answers
23 views

How to add programmatically new plugins repository in QGIS?

Is it possible to add name of repository and URL to the third part plugins repository using python in QGIS 2.01?
0
votes
0answers
88 views

Successfully extracting values from a GRIB2 file…is it possible?

Let me say first that I'm starting to work with GRIB2 files, I've read the docs, and more or less know how they are structured. My goal is to be able to parse some GRIB2 files from NOAA, more ...
0
votes
0answers
60 views

How to install python-mapscript in a virtualenv?

I am on a django project where I want to use the python implementation of the mapserver mapscript library. I was able to install mapserver and python-mapscript from source. However, due to the ...
0
votes
0answers
124 views

How to set drawing style for QgsRasterLayer in QGIS 2?

I am using PyQGIS. In QGIS1, I can use: rlayer.setDrawingStyle ( QgsRasterLayer.PalettedColor ) but In QGIS2, I got some errors. I follow pyqgis developer cookbook, put some demo scripts in ...
0
votes
0answers
40 views

How to showing a Matplotlib figure in a QGIS plugin

I created a plugin for QGIS, But I want it to show a pi chart when you press on a button. But When I do this nothing happens, also when I try to show the chart by typing the code into the QGIS python ...
0
votes
0answers
47 views

Missing pyexpat on QGIS 2.0.1: pyuic4 fails

I have encountered a problem when trying to develop a custom plugin for QGIS 2.0.1 (Python 2.7.5 with two additional Python installations on the same machine). When I try to compile the UI file ...
0
votes
0answers
36 views

QGIS 2.0.1: Changing layer properties with python console

I'm working on a plugin that will aim to ensure that the following steps either "transparent" to the user with one click :   Creating a table with predefined fields Record in this table in postgis, ...
0
votes
0answers
28 views

How to update ValueTable in ModelBuilder?

I have created a python toolbox script that will the update of the values in a ValueTable based on selections from other parameters. In the updateParameters when a parameter is changed I am updating ...
0
votes
0answers
50 views

Best way to group datasets by country/region

I 'm using ArcGIS 10.0 and have a folder with misc GIS datasets from all over the world. I wrote a script that finds all of these datasets and writes them to a .csv file, but I also want to identify ...
0
votes
0answers
89 views

How to use dbscan in python for gis coordinates?

I am curious how to input gis coordinates (lat long) in the http://scikit-learn.org version of dbscan for python. Thanks
0
votes
0answers
34 views

recording pixel value with Python script in ArcGIS 10.x

A scripting newbie question... I'd like to write a Python script for ArcGIS 10.x that would record the pixel value for all pixels in a raster. Furthermore, I'd like to only record a given value once ...
0
votes
0answers
34 views

recording pixel value with Python script in ArcGIS 10.x

A scripting newbie question... I'd like to write a Python script for ArcGIS 10.x that would record the pixel value for all pixels in a raster. Furthermore, I'd like to only record a given value once ...
0
votes
0answers
38 views

List attribute values ​​of selected points in the layer

I need to grab the fields in the layer of the selected points in the order they were selected by the user. My code: Connection to the database and display the map on the screen, everything ok: uri ...
0
votes
0answers
30 views

Need advice on how to use Select Junction by Edge Count at pythot script?

Is There a way to use the tool Select Junction by Edge Count (selecting all junctions (points) in a geometric network by the number of edges to which they connect) at Python script ? or can i use ...
0
votes
0answers
42 views

Loading QGIS and files from Python's use of os.system?

I am trying to open QGIS and load two files using the following code in Python: os.system('qgis D:\data\vector.shp D:\data\raster.tif') However it returns this error message: 'qgis' is not ...
0
votes
0answers
67 views

QGIS: How to reverse vertex ordering in polygons

I am working with an Oracle spatial connection in QGIS through which I am accessing and editing a vector layer. I find that when I edit a geometry, the vertex ordering is reversed (to clockwise in the ...
0
votes
0answers
28 views

Why legendLayerActions is not available in QgsLegendInterface

There's a reason why QgsLegendInterface (the python interface to QgsLegend) doesn't expose: QList< LegendLayerAction > QgsLegend::legendLayerActions( QgsMapLayer::LayerType type ) const method? ...
0
votes
0answers
76 views

RasterXSize from gdal Nonetype error

I have this code to create a raster file in python: fileInf = QFileInfo(userIntervals) baseNam = fileInf.baseName() rlay = QgsRasterLayer(userIntervals, baseNam) gdalRast = ...
0
votes
0answers
65 views

How Can i create a Vector layer from selected features qgis

In my qgis plugin i select dynamically features from a Vector layer. and currently i create a new layer from selection on combining all feature into a new feature: theField = QgsField self.theString ...
0
votes
0answers
55 views

Populate a new field with list of the top 5 values of all fields for that record

I have 15 fields. I would like to add a new field that is populated with the field name and value of the top 5 highest values of the 15 fields for each record in the table. The new field would be a ...
0
votes
0answers
67 views

Calculating distances between boundaries of polygons with Python

I have two sets of shape-files which have to be worked on within a Python Script. Those two Shape Files might differ from each other (same thematic content, but 2 different epochs). If there occurred ...
0
votes
0answers
74 views

Change symbology of layer of unique symbol to unique with python

I have a problem concerning how can I change the symbology of a layer with unique symbole to unique values. I don't know how to update it. I used this code: import arcpy mxd = ...
0
votes
0answers
34 views

How to get data from the selected features and embed to a particular featura class

I am trying to write a Python script for ArcMap 10.2. When the user selects some features I want certain data to go to a certain point file. For example, I have a polygon that contains parcel data. ...
0
votes
0answers
37 views

Arcpy PageLayout.dll Errors in Python

import os import arcpy arcpy.env.overwriteOutput=True folderPath= raw_input ("Enter directory: ") filePath= raw_input ("Enter data repository: ") f = open((os.path.join ...
0
votes
0answers
67 views

ArcMap: Append is really slow

I'm writing a Python script for ArcGIS 9.3.1 which is supposed to do the following: Create a new feature class in local FGDB Loop over a set of IDs (~40,000) Select features from an Oracle GDB with ...
0
votes
0answers
79 views

Looking for java (or python) APIs to read shapefiles

Consider a work flow which receives a data field, e.g. “basemap” as shown in the image, and fills polygons with color on the basis of its numeric values. I am interested in java programming to carry ...
0
votes
0answers
47 views

Python running models and output symbology

Trying to run a model using python script. The script is running, the symbology is set up in the model, but the symbology is not displaying in the KMZ output when run as a geoprocessing tool. Works ...
0
votes
0answers
101 views

Calculating area with python qgis

I am a little stumped with determining the area of polygons in the python console. I want the output to be in meters^2, so using: qgis.utils.iface.mapCanvas().setMapUnits(0) ...
0
votes
0answers
63 views

Lock file on shapefile persisting with arcpy.ImportMetadata_conversion

I've got a script that does a number of things to two shapefiles, and it appears that the metadata import step is creating a lock file on only one of the shapefiles that persists even after del arcpy. ...
0
votes
0answers
87 views

Editing of vector layer programmatically with QGIS

I'm trying to edit vector layer using Python console and have couple of questions. Why this approach doesn't work and I have to use canvas.refresh? If I will use this code not in python console but in ...
0
votes
0answers
30 views

Skimage graph route to multiple destinations

I want to route through an array with skimage.graph.route_through_array. I have one start point and multiple destination points. I am wondering if it is possible to insert the multiple destination ...
0
votes
0answers
74 views

QGIS 2.0 change the raster band from python command

Does anyone know how to change the band of a multiband raster from the python command line in QGIS2.0? It used to be done with something like rLayer.setGrayBandName(1) in 1.8, but this is no longer a ...
0
votes
0answers
72 views

Unable to render layers in MapCanvas using PyQGIS/PyQt4

I am trying to get some layers into a MapCanvas and style them. I am following the PyQgis Cookbook info here but my code is just not working. I've been spinning my wheels on this for over a week now ...
0
votes
0answers
104 views

Interpolate/disaggregate point values to an existing raster grid

I have several thousands of ASCII files whose names have the following format: data_"lat"_"long".mon (e.g. data_41.21875_-116.21875.mon). Each file represents one point in WGS84 projection and the ...
0
votes
0answers
29 views

qgis build under ubuntu 12.04, but all the python plugins are not there

All the .so plugin show correctly, only the python plugin do not. I am confused and do not know how to fix this. I think there must be some python problem . The build process is successful.
0
votes
0answers
46 views

Combining two separate shapefiles with undefined projections out of Leica

So this is a mess. When the software outputs I have two shapefiles. The projections aren't defined, but I know one is WGS84 and the other is NAD 83. The NAD 83 includes northing easting and ...
0
votes
0answers
13 views

Loading a saved pqt (saved composer file) with python in a QT Plugin

I'm working on a plugin for QGIS. The aim is to make the interface easy to use for my customer that never used GIS before. So I wanted to know if there is a easy way of opening the composer and then ...
0
votes
0answers
112 views

ArcGIS 10.2 python addin

I need to load all layer names into a combo box. I did the same using esri site. But the tool is showing [missing]. Please help me for the same
0
votes
0answers
98 views

Change field attribute in one column based on Domain value from another field using Field Calculator

When I am editing a feature class, I want to automatically populate another field base on one column in the table. Here are the fields and data I am working with. Proj_Code, Proj_Name DA, Dawn Lake ...
0
votes
0answers
173 views

GeoEncoding Fails : latitude or longitude exceeded limits (-14)

Module Installation fails in OpenERP 6.1: Im using OpenERP 6.1 with CamptoCamp GeoEngine (Without GeoEngine it get installed). Trying to install module throws Error: ERROR openerp_trunk_geoengine ...
0
votes
0answers
23 views

The names of all the tables created are forced to be converted into lowercase in Pyspatialite 3.0.1

after the update of PYSPATIALITE from 2.3.1-3 to 3.0.1-1 in QGIS, the names of the all the table created by SQLite3 are forced to be converted into lowercase. After fallback to 2.3.1-3, the issue ...
0
votes
0answers
66 views

Qgis: Can prt or python generate high res, scale 1:250 images of entire map?

I need to create a very high resolution, scale 1:250, image from my multi-layer map (30 seconds x 40 seconds). The PRT function in Qgis falls short as it reduces the resolution when using PRT. Also ...
0
votes
0answers
39 views

Get Index for a group QGIS Python

I am trying to add new layers into a specific group which I can get to work if I know the index but how can I get python to fid the index of a group so it can load the new layer into the group ...
0
votes
0answers
20 views

How to SUM the fields selected in aqlistwidget using PyQgis?

I'm beginner user of PyQGIS and I'm trying to write my first plugin(API 2.0). In my ui file I created a qcombobox to select a layer, and a qlistwidget to select one or more than one fields (x,y,..). ...
0
votes
0answers
58 views

changing array values using a 'look-up array'

I am struggling to solve what appears to be a simple numpy array problem. I have the array 'array_tocalib' which I need to correct (it is a RADAR image). To correct it I look up the value in the ...
0
votes
0answers
76 views

Identify segments that share a last vertex with the first vertex of selected segment

This has been marked as a duplicate to Connecting line features and determining the length of the longest line but I believe there are some subtle differences. And to be honest I'm not an advanced ...
0
votes
0answers
43 views

How modify text labels in layout qgis 2 from python code

I am a beginner in python. How modify text labels in layout(composer) qgis 2.0.1 from python code? in cookbook - http://www.qgis.org/en/docs/pyqgis_developer_cookbook/composer.html no solutions
0
votes
0answers
103 views

Geoservices REST JSON to SQL Server Geometry using Python

I'd like to hit a Geoservices REST endpoint (below) to return json and push this into a SQL Server Geometry table using Python. Ok so I can achieve this via ogr using below via command line: ...
0
votes
0answers
70 views

Loop - convert layer to raster coming up blank

I am looping through files, selecting out building footprints one by one and converting the selected building footprint to a raster. The script worked fine for about 2 hours this morning then stopped ...
0
votes
0answers
74 views

QGIS2.0 plugin with freeglut

Has anyone been successful in using QGIS 2.0 plugin which uses freeglut? I have tried all of the below to import freeglut but none of the freeglut functions are recogonized in my plugin. import ...