[Qgis-developer] Re: Qgis-developer Digest, Vol 38, Issue 41
PRODROMOS KARASSAVIDIS
p.karassavidis at gmail.com
Sat Apr 25 14:25:29 EDT 2009
Hi
I am a user of Qgis 0.9.1 Ganymede... I tried to instal plugin such as
profiletool with Python Plugin Installer but when i go to the plugin menu
there are no such thing as Plugins > Fetch Python Plugins...
what should i do?
Regards
Makis
2009/4/25 <qgis-developer-request at lists.osgeo.org>
> Send Qgis-developer mailing list submissions to
> qgis-developer at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> or, via email, send a message with subject or body 'help' to
> qgis-developer-request at lists.osgeo.org
>
> You can reach the person managing the list at
> qgis-developer-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qgis-developer digest..."
>
>
> Today's Topics:
>
> 1. Re: QGIS GRASS shell patch (Paolo Cavallini)
> 2. Re: Rendering Real-Time Data in QGIS (Florian El Ahdab)
> 3. Re: Import error in the qgis.core, qgis.gui module, Help
> needed (Ervin)
> 4. Re: Import error in the qgis.core, qgis.gui module, Help
> needed (J?rgen E. Fischer)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 24 Apr 2009 18:10:22 +0200
> From: Paolo Cavallini <cavallini at faunalia.it>
> Subject: Re: [Qgis-developer] QGIS GRASS shell patch
> To: cavallini at faunalia.it
> Cc: qgis-developer <qgis-developer at lists.osgeo.org>
> Message-ID: <49F1E46E.4010105 at faunalia.it>
> Content-Type: text/plain; charset=windows-1252
>
> Paolo Cavallini ha scritto:
>
> > OK, now it compiles and works. It solves bugs:
>
> I forgot: Writing or pasting a command with all options, it executes it,
> showing the messages. If only the command is written, the GRASS
> interactive mode is started.
> All the best.
> --
> Paolo Cavallini: http://www.faunalia.it/pc
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 25 Apr 2009 11:38:03 +0200
> From: Florian El Ahdab <felahdab at gmail.com>
> Subject: Re: [Qgis-developer] Rendering Real-Time Data in QGIS
> To: qgis-developer at lists.osgeo.org
> Message-ID:
> <eb2cc3420904250238u7d0765f1p58961e6181dc2bb at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi.
>
> I have been trying to use your tips to render dynamic data (AIS tracks,
> probably the same objective as Chee Kiang Lim).
>
> So as to do so, here is what I have done so far:
> In a plugin, I have subclassed the MapCanvasItem (in fact, I have used a
> renamed VertexMarker class). This subclass is named CustomMapCanvasItem.
> I have created a QThread subclass (CustomMapCanvasItemThread), which moves
> the CustomMapCanvasItem it received in reference every 500ms (that is, it
> setCenter() on the item, then updatePosition()).
>
> Here is my problem:
> When I create 1 of those items, everything works fine. With a map loaded, I
> can see the Item moving around every 500ms.
> But when I create 10 of those items (and consequently 10 threads), I can
> see
> them moving but qgis crashes randomly (between 1 and 10 seconds max).
> I suspect this is because there is no synchronization in the access to the
> Item data when the thread moves the item.
> I have tried to freeze the MapCanvas before updating the position... but it
> doesn't work either.
>
> Wonder:
> If my explanations are clear enough, can you help me?
> Can you detail a little bit further how you would do such a thing for a
> large amount of tracks (let's say 5000...).
> If there is a need for synchronization, how can I synchronize the access to
> the items that I have to add to the MapCanvas (which doesn't synchronize
> before using the data apparently.)
>
> Thanks a lot.
> Florian
>
> On Thu, Feb 5, 2009 at 7:24 PM, Martin Dobias <wonder.sk at gmail.com> wrote:
>
> > On Thu, Feb 5, 2009 at 1:47 PM, Chee Kiang Lim <cheekiang.lim at gmail.com>
> > wrote:
> > > Hi,
> > >
> > > I'm new to the QGIS API and have explored it very briefly. I am trying
> to
> > > write a c++ plugin that will take in the locations of approximately
> > > 100 vessels and render their current position (which varies with
> time)on
> > top
> > > of an underlying map. I used polygons to represent those vessels on a
> > vector
> > > layer using the memory provider. Each update involves deleting old
> > features
> > > and adding new ones followed by refreshing of mapcanvas triggered when
> > > changes are committed. As there is a need to render updates at a high
> > > frequency for real time display, with positional data coming in at
> about
> > > 1-2Hz, the application was too occupied refreshing the canvas. This
> makes
> > > the application unresponsive to subsequent user commands. I tried
> > > using update(Rect of changedExtent) for localized painting/canvas
> > refreshing
> > > but the rendering is still too taxing. Can you provide some advice on
> how
> > i
> > > can go about rendering this huge amount of data in real time?
> > >
> > > I also tried using rubberbands and they work much better but i need to
> > > display text attributes beside each vessel which i do not know how to
> > > achieve without labels. Any alternative to rendering text at specific
> map
> > > location that i can update in real time?
> >
> > Custom map canvas items are perfectly suited for this type of task.
> > They don't require map to be re-rendered when the item gets updated.
> > You can subclass your own class directly from QgsMapCanvasItem or you
> > can create specialized class from QgsRubberBand that will additionally
> > draw text labels.
> >
> > You can also take a look on some brief documentation for map canvas:
> > http://wiki.qgis.org/qgiswiki/MapCanvas_API
> >
> > Martin
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090425/6b6ccaf3/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Sat, 25 Apr 2009 04:10:56 -0700 (PDT)
> From: Ervin <ervinramonllari at gmail.com>
> Subject: Re: [Qgis-developer] Import error in the qgis.core, qgis.gui
> module, Help needed
> To: qgis-developer at lists.osgeo.org
> Message-ID: <1240657856276-2706728.post at n2.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
>
>
> Bishwarup Banerjee wrote:
> >
> > Hi,
> >
> > I am a newbie in this environment (python, QGIS). For last few days i
> > have
> > been trying hard to compile and execute the tutorial of TIM written in
> > python. But i am getting some error or other.
> >
> > The code is as follows
> >
> >
> >
> >
> > import sys
> > import os
> >
> >
> > from PyQt4.QtCore import *
> > from PyQt4.QtGui import *
> > from qgis.core import *
> > from qgis.gui import *
> > #from F:\Python25\Lib\site-packages\qgis import core as QgsCore
> > #from F:\Python25\Lib\site-packages\qgis import gui as QgsGui
> >
> > # Import our GUI
> > from mainwindow_ui import Ui_MainWindow
> > # Import our resources (icons)
> > import resources
> > # Environment variable QGISHOME must be set to the install directory
> > # before running this application
> > qgis_prefix = os.getenv("QGISHOME")
> > class MainWindow(QMainWindow, Ui_MainWindow):
> >
> > def __init__(self):QMainWindow.__init__(self)
> >
> > # Required by Qt4 to initialize the UI
> > self.setupUi(self)
> >
> > # Set the title for the app
> > self.setWindowTitle("BTC C-DAC v 1.0")
> > # Create the map canvas
> > self.canvas = QgsMapCanvas()
> > # Set the background color to light blue something
> > self.canvas.setCanvasColor(QColor(200,200,255))
> > self.canvas.enableAntiAliasing(True)
> > self.canvas.useQImageToRender(False)
> > self.canvas.show()
> >
> > # Lay our widgets out in the main window using a
> > # vertical box layout
> > self.layout = QVBoxLayout(self.frame)
> > self.layout.addWidget(self.canvas)
> >
> > # Create the actions for our tools and connect each to the appropriate
> > # method
> > self.actionAddLayer = QAction(QIcon(":/foss4g2007/mActionAddLayer.png"),
> > "Add Layer", self.frame)
> >
> > self.connect(self.actionAddLayer, SIGNAL("activated()"), self.addLayer)
> > self.actionZoomIn = QAction(QIcon(":/foss4g2007/mActionZoomIn.png"),
> > "Zoom
> > In", self.frame)
> > self.connect(self.actionZoomIn, SIGNAL("activated()"), self.zoomIn)
> > self.actionZoomOut = QAction(QIcon(":/foss4g2007/mActionZoomOut.png"),
> > "Zoom Out", self.frame)
> > self.connect(self.actionZoomOut, SIGNAL("activated()"), self.zoomOut)
> > self.actionPan = QAction(QIcon(":/foss4g2007/mActionPan.png"), "Pan",
> > self.frame)
> > self.connect(self.actionPan, SIGNAL("activated()"), self.pan)
> > self.actionZoomFull =
> > QAction(QIcon(":/foss4g2007/mActionZoomFullExtent.png"), "Zoom Full
> > Extent",
> >
> > self.frame)
> > self.connect(self.actionZoomFull, SIGNAL("activated()"),
> > self.zoomFull)
> >
> > # Create a toolbar
> > self.toolbar = self.addToolBar("Map")
> > # Add the actions to the toolbar
> > self.toolbar.addAction(self.actionAddLayer)
> > self.toolbar.addAction(self.actionZoomIn)
> > self.toolbar.addAction(self.actionZoomOut);
> > self.toolbar.addAction(self.actionPan);
> > self.toolbar.addAction(self.actionZoomFull);
> >
> > # Create the map tools
> > self.toolPan = QgsMapToolPan(self.canvas)
> > self.toolZoomIn = QgsMapToolZoom(self.canvas, False) # false = in
> > self.toolZoomOut = QgsMapToolZoom(self.canvas, True) # true = out
> > # Set the map tool to zoom in
> > def zoomIn(self):
> > self.canvas.setMapTool(self.toolZoomIn)
> >
> > # Set the map tool to zoom out
> > def zoomOut(self):
> > self.canvas.setMapTool(self.toolZoomOut)
> >
> > # Set the map tool to
> > def pan(self):
> > self.canvas.setMapTool(self.toolPan)
> >
> > # Zoom to full extent of layer
> > def zoomFull(self):
> > self.canvas.zoomFullExtent()
> > # Add an OGR layer to the map
> > def addLayer(self):
> > file = QFileDialog.getOpenFileName(self, "Open Shapefile", ".",
> > "Shapefiles(*.shp)")
> >
> > fileInfo = QFileInfo(file)
> >
> > # Add the layer
> > layer = QgsVectorLayer(file, fileInfo.fileName(), "ogr")
> >
> > #if not layer.isValid():
> > #return
> >
> > # Change the color of the layer to gray
> > symbols = layer.renderer().symbols()
> > symbol = symbols[0]
> > symbol.setFillColor(QColor.fromRgb(192,192,192))
> >
> > # Add layer to the registry
> > QgsMapLayerRegistry.instance().addMapLayer(layer);
> >
> > # Set extent to the extent of our layer
> > self.canvas.setExtent(layer.extent())
> >
> > # Set up the map canvas layer set
> > cl = QgsMapCanvasLayer(layer)
> > layers = [cl]
> > self.canvas.setLayerSet(layers)
> >
> > def main(argv):
> > # create Qt application
> > app = QApplication(argv)
> >
> > # Initialize qgis libraries
> > QgsApplication.setPrefixPath(qgis_prefix, True)
> > QgsApplication.initQgis()
> >
> > # create main window
> > wnd = MainWindow()
> >
> > # Move the app window to upper left
> > wnd.move(100,100)
> > wnd.show()
> >
> > # run!
> > retval = app.exec_()
> >
> > # exit
> > QgsApplication.exitQgis()
> > sys.exit(retval)
> >
> >
> > if __name__ == "__main__":
> > main(sys.argv)
> >
> >
> >
> > Previously i was getting the error
> >
> > No module named PyQt4.QtCore and PyQt4.QtGui
> >
> > But after installing the PyQt inside the site package it is not
> > showing any error now.
> >
> >
> > Now i have started getting the error,
> > qgis. core module not found.
> > qgis.gui module not found.
> >
> > I have done whatever way possible from my side.
> >
> > My system environment is as follows:
> >
> > OS -- Windows 2000
> > Python 2.5
> > PyQt 4.4.3.1
> > QGIS 0.11.0.2
> >
> > I dont know in which step i should be installing these one after other.
> > and also where to install and how to compile
> >
> > It will be very kind of you if you can help me out.
> >
> > Bye
> > Sonai
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> >
>
> Hi there,
>
> I'm also having trouble with the example given above. The error message I
> got is:
>
> Traceback (most recent call last):
> File "<pyshell#3>", line 1, in <module>
> import qgis.core
> ImportError: DLL load failed: The specified procedure could not be found.
>
> I have installed python 2.5.2 in C:\Python25 and Qgis 1.0 installed from
> the
> package OSGeo4W in the default dir C:\OSGeo4W.
>
> The environment variables are set as below:
>
> PATH = C:\OSGeo4W\apps\qgis;%PATH%
> PYTHONPATH = C:\OSGeo4W\apps\python25\lib\site-packages
> QGISHOME = C:\OSGeo4W\apps\qgis
>
> I also tried to add to the path variable the following dirs:
> C:\OSGeo4W\bin; C:\OSGeo4W\apps\qgis\bin
>
> but still no result.
>
> I would really appreciate any help!
>
> Many thanks in advance,
>
> Ervin
>
> --
> View this message in context:
> http://n2.nabble.com/Import-error-in-the-qgis.core%2C-qgis.gui-module%2C-Help-needed-tp2040109p2706728.html
> Sent from the qgis-developer mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 25 Apr 2009 13:48:19 +0200
> From: J?rgen E. Fischer <jef at norbit.de>
> Subject: Re: [Qgis-developer] Import error in the qgis.core, qgis.gui
> module, Help needed
> To: qgis-developer at lists.osgeo.org
> Message-ID: <20090425114818.GA9771 at norbit.de>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi Ervin,
>
> On Sat, 25. Apr 2009 at 04:10:56 -0700, Ervin wrote:
> > I have installed python 2.5.2 in C:\Python25 and Qgis 1.0 installed
> > from the package OSGeo4W in the default dir C:\OSGeo4W.
>
> Double check that you're using OSGeo4W's python and nothing from the one
> in C:\Python25.
>
>
> Jürgen
>
> --
> Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20
> Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
> Software Engineer D-26506 Norden
> http://www.norbit.de
>
> --
> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
> Rheinstrasse 13, 26506 Norden
> GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
>
>
>
> ------------------------------
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> End of Qgis-developer Digest, Vol 38, Issue 41
> **********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090425/31c5d819/attachment-0001.html
More information about the Qgis-developer
mailing list