Tag Info

New answers tagged

0

The community edition doesn't support remote debugging, meaning you can't test your plugin while running in QGIS. You can use Winpdb (cross platform despite the name) to remotely debug a QGIS plugin. See: http://winpdb.org/


0

for ubuntu users : open software center and search "python-mapscript" and install "python library for MapServer" and enjoy using "RT mapserver exporter".


2

For the Openlayers plugin, the Project CRS must be in EPSG:3857. Your other layers can have different Layer CRS, if you have enabled On-the-fly-reprojection. BTW, current version of QGIS is 2.4, and the openlayers plugin does not support older versions anymore.


2

You can use the Openlayers plugin (http://hub.qgis.org/projects/openlayers/wiki) which introduces OpenStreetMap, Google Maps, and Yahoo Maps as basemaps. See these blogs and youtube videos (http://www.digital-geography.com/qgis-plugins-openlayers/#.VEP5-cnYff0; https://www.youtube.com/watch?v=6N3h4KQW_XQ) for information. Or you can use ESRI's basemapping, ...


-1

Problem solved, I must use Qgis libraries shipped with OSGeo4W.


-1

I think that this Plugin can help you. https://plugins.qgis.org/plugins/MultipleLayerSelection/


1

Generally you access the QgsMapLayerRegistry if you want access to the layer object again. The layer may or may not be in the canvas i.e layers that are not visible are not in canvas.layers(). addMapLayer() should add it to the canvas and update layers() automatically. If not it might be a bug. Like I said it's safer to use the registry to find the layer ...


0

def changeValue(self,point,button): request = QgsFeatureRequest() self.dlg.lineEdit.setText(str(request)) self.dlg.show() Above function resulted to the string below in lineEdit Prashant


1

if rect is a Qgsrectangle centered in the point clicked on canvas, then the code is synthetically request = QgsFeatureRequest(rect) for feat in layer.getFeatures(request): <yout code> of the QgsFeature "feat"


0

Difficult to tell what all your extra code is doing, but these two lines, executed in the Python console, select and highlight the first two features in the active layer: l=iface.activeLayer() l.setSelectedFeatures([1,2])


1

The cause of the problems seems obvious now but didn't get to me because of all the small changes and trial and error analysis made on the way: Setting PYTHONHOME and PYTHONPATH (seemingly only PYTHONPATH) caused to program to terminate on startup without errors. Deleting them solves the problem. I was fooled by the fact that QGIS as well as other programs ...


2

You are running against SQLite version 3.7.17, but Common Table Expressions (WITH clause) were not supported until 3.8.3. See change log here: http://www.sqlite.org/changes.html Unless you are trying to do a recursive query, you can either write your WITH clause as a view or use a subquery.


1

You might like to check out one of the presentations at FOSS4GIS 2014 titled " Open Source Work-flow for Surface Interpolation with Curvilinear Anisotropy — Michele Tobias, University of California Davis." http://vimeo.com/106235881


2

GRASS can do what you're asking. Here's how I would approach the mssion: First get or digitize the banks of the river as a (long, winding) polygon. Then import your xyz data as a point vector (v.in.ascii), and your river polygon in the appropriate GRASS location/mapset with v.in.ogr. Now you'll have to think about the region settings with g.region . You ...


0

I'm afraid the plugin is currently rather experimental. Loading the start page directly fails for me in Firefox because of security issues when loading file:/// adresses. If I place the files in a folder that I can access with my local Apache server as http://localhost, I get the start page working. It is then able to display OSM background and vector ...


0

I have responded to your email about a week ago but did not receive any response from you whether you succeeded using plugin or not.. Regarding your problem please check following solutions; i.) Check that you correctly selected mandatory input txt files (node_coordinates and flow_matrix) and be sure that you typed an output file name for the shapefile ...


2

You could do this if you have the Raster Interpolation plugin installed using Plugin Manager. from rasterinterpolation.core.rasterinterpolator import RasterInterpolator rastLayer = iface.activeLayer() interpolator = RasterInterpolator(rastLayer,0,1) a= interpolator.linear(QgsPoint(10.662629, 76.225421)) print a Note: i don't really know what the above ...


0

The follow code should replace everything in your if block: if cLayer: for features in cLayer.getFeatures(): if feat.geometry().intersects(pntGeom): selectList.append(feat.id()) cLayer.setSelectedFeatures(selectList) The select method doesn't exist in any of the 2.0 version of QGIS. There is a select on the layer object ...


1

From what I understand of QTiles, it seems you have to create your own server to serve those tiles or put them in a WMTS server. QGIS Server is not a WMTS Server. One workaround might be to use Lizmap plugin and its cached and tiled option. Lizmap will come on top of QGIS Server to publish layers as tiled cached WMS layers. Most parts of the documentation ...


0

According to their homepage they are working on it. "Qmarxan currently only works with QGIS 1.8. We are working on an updated plugin that compatible for QGIS 2.0 and hope to release in by early 2014. " However there haven't been any pushes to their github repository since 5 months, so you might want to ask them directly if they still working on it


0

I have encountered the same issue in QGIS 2.4 x64 on Windows 7. Following a comment on the qgis-user list I can confirm that having the Python console open whilst running Metatools seems to stop the error from occurring. I don't know why at this stage though! UPDATE: The Python Console doesn't need to be open when running Metatools, it merely needs to have ...


1

One method to compile custom-made plugins is to run the cmd prompt or the OSGeo4W shell via: Start > QGIS folder > _OSGeo4W Type cd, enter the directory of your plugin to make that the current directory and then type make. This should compile your plugin.


3

I was curious so I did a small test to see if the two programs perform the same function. The quick answer is yes and no. Let's have a look- Random set of 100 points with a random weight value: Setup KDE in ArcMap 10.2.1: Setup KDE in qGIS 2.0.1: Compare the results. I adjusted the symbology so that the discrete values were equal interval, 6 ...


2

Here is a good tutorial that helped me a lot: http://pythongisbook.com/blog/2013/04/11/creating-a-postgresql-connection-from-a-qgis-layer-datasource/ update The above link has expired... :( Here is my code that I use in my QGIS plugin: from PyQt4.QtSql import * db = QSqlDatabase('QPSQL') if db.isValid(): # string db.setHostName('your_host') # ...


1

Modifications need to be made in 3 different files in the folder generated by Plugin Builder... QtCore.QObject.connect(self.Input, QtCore.SIGNAL("clicked()"), self.OpenBrowse) To be added in the UI File under the main Class... def OpenBrowse(self): filename1 = QFileDialog.getOpenFileName() self.dialog.Input_TB.setText(filename1) ...


0

Affine Transformations is included now in the plugin repository. Vector Bender has a similar georeference-like approach, but is still only experimental.


3

Let us imagine your UI file name is MyDialogFile.py. Then, from PyQt4.QtGui import QFileDialog from MyDialogFile import MyDialog def InitGui(self): #other stuff.... self.dialog = MyDialog() def OpenBrowse(self): filename1 = QFileDialog.getOpenFileName() self.dialog.Input_TB.setText(filename1)


1

You're making your updates feature by feature. I've found that making changes in bulk is orders of magnitude faster. prepare your changes in the loop by making a dictionary of fids to change and the desired attribute changes. Then run the update outside the loop in a single step as per the Modify Features section of the pyQGIS cookbook Documentation QGIS ...


2

There was a bunch of bugs in the heatmap code which I've now fixed. You can either download an updated development snapshot to get these fixes, or for QGIS < 2.6 there's some workarounds: make sure your layer isn't a "multipoint" layer there's a bug which causes the layer choice from the dialog not to apply the first time in a session. Rerunning the ...


1

download the latest version from here: http://plugins.qgis.org/plugins/openlayers_plugin/ unzip to your qgis python plugins directory on linux: ~/.qgis2/python/plugins on windows: %USERPROFILE%\.qgis2\python\plugins restart qgis now you can enable it



Top 50 recent answers are included