Re: [Qgis-developer] fTools: clip() FEAT_EXCEPT and FEATURE_EXCEPT

2010-08-17 Thread Carson Farmer
Oops! Nope, will fix that!

Carson

On 17 August 2010 19:55, Benoit de Cabissole  wrote:
> Hello Carson,
>
> Just a silly question...
>
> I was browsing the code of "def clip()" in doGeoprocessing.py to learn how
> to do things!
>
> FEATURE_EXCEPT is given the value of 'True' at the top of the function and
> it is returned at the end of the function.
> The body of the function uses FEAT_EXCEPT.
>
> It thus seems that the clip() function will always return True in
> FEATURE_EXCEPT. Is it on purpose?
>
> Best regards,
> Benoit
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools union crash

2010-09-14 Thread Carson Farmer
Hi Paolo,

Could you please file a ticket for this (please be sure to assign it
to me), and if possible a test dataset? I can't reproduce the problem
here on Ubuntu 10.04 self compiled trunk. Please also mention which
version of GEOS you are using.

Thanks,

Carson

On 14 September 2010 18:44, Giovanni Manghi  wrote:
> On Tue, 2010-09-14 at 17:41 +0200, Paolo Cavallini wrote:
>> Debian, self compiled from current trunk.
>
> Too bad,
>
> I hoped that was because of the "old" version of GEOS shipped with qgis
> for windows (there is already a ticket in the osgeo4w bug tracker).
>
> cheers
>
> -- Giovanni --
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] adding graduated symbol classification algorithms

2010-09-24 Thread Carson Farmer
Hi Devs, attached is a diff that adds 3 new modes to the graduated
symbol renderer, including Jenks' Natural Breaks Optimisation
algorithm, a standard deviation classification algorithm, and the
'pretty' algorithm from the R statistical programming language. An
explanation of the algorithms is provided as comments in-code, and you
can also have a look here: http://www.carsonfarmer.com/?p=761 for the
initial Python version, along with a brief overview of the algorithms
etc. I'd really appreciate any comments, suggestions, or fixes, as I'm
not really a C++ programmer. I'm sure there are a few spots where
things could be sped up, especially in the Jenks algorithm. Right now
I'm using a random sample to speed things up, but I'm sure others more
familiar with C++ could find other speed improvements. I don't really
want to commit this directly, again mainly because I'm not really
confident in my C++ abilities, but if it would make it easier, I can
also add the patch as an enhancement ticket?

Thanks,

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/


jenks_class.diff
Description: Binary data
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] ManageR error

2010-09-26 Thread Carson Farmer
Hi Noli,

This error:
> RRuntimeError: Error in eval(expr, envir, enclos) : could not find
> function "lsf.str"
Means you don't have the lsf-str R function visible in your
environment, do you have the utils package loaded? Normally this
package is loaded by default? What version of R are you running?

Carson
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] ManageR error

2010-09-26 Thread Carson Farmer
Ok, weird that this would ever actually happen, but since it has, I'll
have to catch it...

Thanks for the report,

Carson

On 25 September 2010 17:43, Paolo Cavallini  wrote:
> Hi all.
> I'm getting the following error (qgis r14270 on Debian) when starting ManageR:
>
> Traceback (most recent call last):
>  File "/home/paolo/.qgis/python/plugins/manageR/plugin.py", line 61, in run
>    MainWindow(self.iface, self.version,isConsole=True, 
> isStandalone=False).show()
>  File "/home/paolo/.qgis/python/plugins/manageR/manageR.py", line 3965, in 
> __init__
>    self.createConsoleWidgets(isStandalone)
>  File "/home/paolo/.qgis/python/plugins/manageR/manageR.py", line 3998, in
> createConsoleWidgets
>    variableWidget = RVariableWidget(self, isStandalone)
>  File "/home/paolo/.qgis/python/plugins/manageR/manageR.py", line 2965, in 
> __init__
>    self.updateVariables()
>  File "/home/paolo/.qgis/python/plugins/manageR/manageR.py", line 3142, in
> updateVariables
>    data = self.browseEnv()
>  File "/home/paolo/.qgis/python/plugins/manageR/manageR.py", line 3322, in 
> browseEnv
>    1, 1)""" % str(err).split('"')[1])
> IndexError: list index out of range
>
> All the best.
> --
> Paolo Cavallini: http://www.faunalia.it/pc
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] ManageR error

2010-09-26 Thread Carson Farmer
Noli,

What do you get (using a freshly started R, with no packages manually
loaded), why you type something like:
lsf.str("package:base")

Carson

On 26 September 2010 11:57, Noli Sicad  wrote:
> It seems that I have utils package.
>
> n...@noli-laptop:~$ R
>
> R version 2.10.1 (2009-12-14)
> Copyright (C) 2009 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>  Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> library(utils)
>>
>
>
> Noli
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] adding graduated symbol classification algorithms

2010-09-28 Thread Carson Farmer
Oops, sorry about that Tim, you're absolutely right! I guess I was in
Python mode ;-p

Will make those changes tonight!

Carson

On 28 September 2010 10:29, Tim Sutton  wrote:
> Hi Carson
>
> On Fri, Sep 24, 2010 at 11:33 PM, Carson Farmer  
> wrote:
>> Hi Devs, attached is a diff that adds 3 new modes to the graduated
>> symbol renderer, including Jenks' Natural Breaks Optimisation
>> algorithm, a standard deviation classification algorithm, and the
>> 'pretty' algorithm from the R statistical programming language. An
>> explanation of the algorithms is provided as comments in-code, and you
>> can also have a look here: http://www.carsonfarmer.com/?p=761 for the
>> initial Python version, along with a brief overview of the algorithms
>> etc. I'd really appreciate any comments, suggestions, or fixes, as I'm
>> not really a C++ programmer. I'm sure there are a few spots where
>> things could be sped up, especially in the Jenks algorithm. Right now
>> I'm using a random sample to speed things up, but I'm sure others more
>> familiar with C++ could find other speed improvements. I don't really
>> want to commit this directly, again mainly because I'm not really
>> confident in my C++ abilities, but if it would make it easier, I can
>> also add the patch as an enhancement ticket?
>>
>
> I really like the new functionality your patch adds - I even wrote a
> little blog post about it :-) [1] The code works fine my only comment
> regarding the c++ implementation is that it doesn't follow our coding
> style guidelines. See the CODING document in the root of your source
> tree for details. e.g variable names should be camelCased, and so on.
> If you resolve those, issues I would be most happy to see your work
> added to trunk.
>
> Regards
>
> Tim
>
>
>
>
> [1] 
> http://linfiniti.com/2010/09/new-class-breaks-for-graduated-symbols-in-qgis/
>
>
>> Thanks,
>>
>> Carson
>>
>> --
>> Carson J. Q. Farmer
>> ISSP Doctoral Fellow
>> National Centre for Geocomputation
>> National University of Ireland, Maynooth,
>> http://www.carsonfarmer.com/
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>
>
>
> --
> Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
> ==
> Please do not email me off-list with technical
> support questions. Using the lists will gain
> more exposure for your issues and the knowledge
> surrounding your issue will be shared with all.
>
> Visit http://linfiniti.com to find out about:
>  * QGIS programming and support services
>  * Mapserver and PostGIS based hosting plans
>  * FOSS Consulting Services
> Skype: timlinux
> Irc: timlinux on #qgis at freenode.net
> ==
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis puign ideas: MapInfo Pie Chart thematics to display multiple types of data.

2010-09-28 Thread Carson Farmer
Most of this functionality is already available via the digram overlay
plugin (c++ plugin). Just go into the plugin manager and enable it.

Carson

On 28 September 2010 04:13, Noli Sicad  wrote:
> Hi,
>
> I just like post this idea and link.
>
> Pie Chart thematics to display multiple types of data [1]
>
> This involves Unpivot and Pivot data.
>
> http://testdrive.mapinfo.com/TechSupp/MIProd.nsf/2fa3e3416d06d61d85257125006b2533/fdae38d1b4e6fe2305256b8a0054a937?OpenDocument
>
> It might be useful to develop this plugin in Qgis.
>
> I think MapInfo has good thematic mapping features
>
> Could you do this now in Qgis?
>
> Noli
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QGis AutoGCP Plugin

2010-09-29 Thread Carson Farmer
I think this is probably what you're looking for:

crs = QgsCoordinateReferenceSystem ()
crs.createFromProj4(theProj4Str)
print crs.toWkt()

no need to use additional libraries or anything!

On 29 September 2010 17:18, Benoit de Cabissole  wrote:
> Hi Francois,
>
> If you are in Python, you could use GDAL with something like the following:
>
> import osr
> ...
> theProj4Str = "+proj=utm +zone=36 +south +a=6378249.144808011
> +b=6356514.966204134 +units=m +no_defs"
> outSr = osr.SpatialReference()
> outSr.ImportFromProj4(theProj4Str)
> outWkt = outSr.ExportToWkt()
>
> and use outWkt as the 'dst_wtk' parameter for raster creation.
>
> HTH,
> Benoit
>
>
>
>  -Original Message-
> From: qgis-developer-boun...@lists.osgeo.org
> [mailto:qgis-developer-boun...@lists.osgeo.org]on Behalf Of Francois Maass
> Sent: Wednesday, 29 September 2010 17:33
> To: qgis-developer@lists.osgeo.org
> Subject: [Qgis-developer] QGis AutoGCP Plugin
>
> Hello everyone!
>
>
>
> I’ve been struggling with this for quite some time now, but I can’t seem to
> find the proper solution.  We need to set the projection definition to
> provided datasets, and have, up to now, been doing it by using our own
> projection dialog. We now want to change our plugin to use the, already
> implemented, QGIS projection dialog.
>
> So my question is as follows:
>
> Is there a way to convert a projection definition such as those returned by
> the QGIS projection dialog
> eg:
>    +proj=utm +zone=36 +south +a=6378249.144808011 +b=6356514.966204134
> +units=m +no_defs
>
> to the extended form such as the following:
>
>    PROJCS["UTM Zone 36, Southern Hemisphere",GEOGCS["Unknown datum based
> upon the Clarke 1880 ellipsoid",DATUM["Not specified (based on Clarke 1880
> spheroid)",SPHEROID["Clarke
> 1880",6378249.144808011,293.4663076556303,AUTHORITY["EPSG","7034"]]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",50],PARAMETER["false_northing",1000],UNIT["Meter",1]]
>
>
>
> The reason for this is that the GDAL functions for setting the projection
> definition, only accepts the extended form.  If this is already implemented
> in a QGIS or other class that you know of, I would greatly appreciate it.
> (I don’t think I am qualified enough to attempt doing it myself. J )
>
> Thank you for your time and efforts!
> Francois Maass
> Foxhat Solutions
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] ftools geometry check

2010-10-31 Thread Carson Farmer
Hi all,

I would actually much prefer it if people didn't use the check geometry tool
at all :-p It was never really meant to be a long-term tool (I really just
created it at the time to be a quick and dirty way to find issues with
shapefiles), and I know that Martin and his team have created a much better
geometry checker (in C++) that is kicking around somewhere that would be
much better suited to most users needs. In actual fact, there is no attempt
to follow OGC standards in the ftools geometry validity tool!

@ Martin: What is the status of your geometry checking tool? Is there anyway
that this might be incorporated into trunk somehow? I think it would be much
better to have something a bit more compliant, stable, and with a few more
of the features that have been mentioned in this thread (some of which I
think Martin's tool already has).

Regards,

Carson


On 31 October 2010 14:38,  wrote:

> On Sun, 31 Oct 2010 14:00:46 +0100, Borys Jurgiel wrote
> > Hi,
> >
> > In Spatialite layers, if I digitize a polygon counter-clockwise, the
> > ftools' geometry validity check says:
> >
> > Feature $n has incorrect node ordering
> >
> > Is it intentional, or a bug? It doesn't affect shapefiles.
> >
>
> Hi Boris,
>
> in OGC-SFS specs there is absolutely no
> indication at all concerning the RING's
> node ordering (clockwise / counterclockwise).
>
> and this makes full sense, because for OGC
> POLYGONs the first RING always is the EXTERIOR
> ring, and any other subsequent RING (if present)
> has to be interpreted as an INTERIOR ring.
>
> this rule is absolutely clear and unambiguous:
> so there is no need at all to enforce a preferred
> node-ordering.
>
> AFAIK the nowadays obsolescent SHP format used
> a completely different rule:
> - the exterior ring has to be clockwise
> - any interior ring has to be counterclockwise
> - rings relative ordering is not relevant
>
> So I suppose that ftools (incorrectly) checks any
> polygon geometry for validity following the
> superseded SHP-like rules.
>
> But from the SpatiaLite's own perspective this
> makes no sense at all, because node ordering
> is absolutely irrelevant in this case.
>
> bye Sandro
>
>


-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] ftools geometry check

2010-10-31 Thread Carson Farmer
On 31 October 2010 16:04, Jürgen E.  wrote:

> Hi Carson,
>
> On Sun, 31. Oct 2010 at 15:15:23 +0000, Carson Farmer wrote:
> >I would actually much prefer it if people didn't use the check
> geometry
> >tool at all :-p It was never really meant to be a long-term tool (I
> really
> >just created it at the time to be a quick and dirty way to find issues
> >with shapefiles), and I know that Martin and his team have created a
> much
> >better geometry checker (in C++) that is kicking around somewhere that
> >would be much better suited to most users needs. In actual fact, there
> is
> >no attempt to follow OGC standards in the ftools geometry validity
> tool!
> >@ Martin: What is the status of your geometry checking tool? Is there
> >anyway that this might be incorporated into trunk somehow? I think it
> >would be much better to have something a bit more compliant, stable,
> and
> >with a few more of the features that have been mentioned in this
> thread
> >(some of which I think Martin's tool already has).
>
> Hm, then we have three.  I made QgsGeometry::validateGeometry(), when I
> needed
> to fix a bunch of polygons and found that the node tool refused to edit
> broken
> geometry at all.
>
Hmm, ok, didn't notice this change. I'll have a look, and see if I can
update the geometry validity tool to use this functionality. Thanks for the
info Jürgen! Shouldn't be too hard to use this function, plus add some of
the suggested features to make the tool a bit more useful.

Carson

--
> Jürgen E. Fischer norBIT GmbH   Tel. +49-4931-918175-20
> Dipl.-Inf. (FH)   Rheinstraße 13Fax. +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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Minor Irritations

2010-11-01 Thread Carson Farmer
The new icons for the select tool *are* relevant in that the select tools
are now different, and as a result, the icons reflect this. (At least in my
version) the drop down does work, you just need to click and hold for a
second or two for the additional options to pop up. You will see that the
original select tool icon is used to represent the original select tool
functionality, and there are several new select tools each with a specific
icon so that you know what you're doing when you're doing it.

Carson

On 31 October 2010 19:20, Alex Mandel  wrote:

> These may be more opinion than actual issues, just wanted to see what
> others thought.
>
> 1. When adding a vector layer, you hit browse the default tends to be
> shapefile, but when you add a raster the default is "All GDAL formats".
> I think All OGR formats would be a much better default, having to scroll
> all the time for gml, kml etc is really annoying especially when I'm
> working hard to break people of the assumption that vector = shapefile.
>
> 2. As pointed out by a colleague: Many people new to GIS have no idea
> the KML = Keyhole Markup Language, so it's not clear on the Save as..
> option that is actually KML. The same might be said for GML. Either
> changing the names in the list or putting (Hint) would seem useful to
> users.
>
> 3. In 1.6 builds (Could be my build from last week) the Select tool does
> not appear to work the same way(Ctrl fails to add or remove from the
> selection), and th icon has a new drop down indicator that doesn't seem
> to work. 2ndary note, I'm all for making clearer icons for tools but it
> seems excessive to change what they look like every version especially
> if we're not actually testing new v. old on human test subjects to verify.
>
> Thanks,
> Alex
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] ftools geometry check

2010-11-01 Thread Carson Farmer
On 1 November 2010 18:28, Martin Dobias  wrote:
> On Sun, Oct 31, 2010 at 4:15 PM, Carson Farmer  
> wrote:
>> @ Martin: What is the status of your geometry checking tool? Is there anyway
>> that this might be incorporated into trunk somehow? I think it would be much
>> better to have something a bit more compliant, stable, and with a few more
>> of the features that have been mentioned in this thread (some of which I
>> think Martin's tool already has).
>
> There's a lot of dust lying on top the "topology" plugin which is
> supposed to do various checks within one layer and among pairs of
> layers. The plugin never reached a productive state and stayed at some
> alpha/beta stage due to the lack of time. I have no time nor
> motivation to do some work on it in order to make it ready for
> inclusion to the trunk. However, if there is anyone interested to
> finalize it, I will try to dig up the code and make it available.
I completely understand Martin! I'm going to try to fix things up
using Jürgen's changes to QgsGeometry and the validateGeometry
function, so at this stage I don't think I'm interested in your other
stuff. However, it might be nice to dig into it in the future; I seem
to recall some pretty nice features in there. Anyone else with some
time on their hands?

Carson
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools: union crashes QGIS

2010-11-02 Thread Carson Farmer
Hi Paolo,

I'm currently working on this problem. It appears to be a GEOS error,
but I can't quite pin down what's going on?
I think there is already a bug report for the Union issue, so no need
to file a report there.

Carson

On 2 November 2010 22:10, Paolo Cavallini  wrote:
>
> Same thing with simmetrical and non simmetrical difference.
> Should I fill a ticket?
> All the best.
>
> On Tue, 02 Nov 2010 23:03:51 +0100, Paolo Cavallini 
> wrote:
>> Hi all.
>> In trunk, Union crashes QGIS. In 1.5, with the same layers, all OK.
>> Can anyone confirm?
>> All the best.
>
> --
> http://faunalia.it/pc
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis Api - get a layer by its name

2010-11-09 Thread Carson Farmer
Hi Kimaidou,

> I have not found any function in QgsMapLayer for getting a layer by its
> name. I needed it on a python plugin to let the user choose a layer from a
> combo box (already populated with the layer names)
> So I created this function http://osgeo.pastebin.com/7EpNA3JL
I suspect that is how most plugin developers have implemented this
functionality, and for the most part it works (save for the situations
you listed below).
>
> I have some questions regarding it:
> * Is it the right way ?
> * I have seen it is possible in Qgis to rename a layer, and 2 layers of the
> same type can have the same name. This makes my function not working in all
> the cases (which is my problem of course). Is there a reason to allow layers
> to share a name ?

One solution would be use userData to store the layers uniqueID, and
then use that to access layers later on.
First you add each layer name to the combobox, like so:
combobox.addItem ( layer.name(),QVariant(layer.getLayerID()))

and then when the user select a layer from the combobox, get the
maplayer by doing something like (untested):
uniqueId = combobox.itemData(combobox.currentIndex()).toString()
layer = QgsMapLayerRegistry.instance().mapLayer(uniqueId)

Of course, if you are simply listing all layers in the layer list,
then you could just use their order in the combobox, as this will be
the same as the order in the layer list.
layer = mapCanvas.layer(combobox.currentIndex())

Hope that helps,

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Qgis Api - select all features of a vector layer

2010-11-09 Thread Carson Farmer
...and with the newer PyQGIS API, we can do things even more Pythonically:

def layerIds(layer):
    layer.select([]) # we don't actually need the attributes
ids = [feat.id() for feat in layer]
    return ids

Obviously you could skip the step of creating the layerIds function,
and then you'd reduce the entire thing down to:

layer = self.iface.mapCanvas().currentLayer() # or however else you
get the layer
layer.select([]) # we don't actually need the attributes
layer.setSelectedFeatures([feat.id() for feat in layer]) # select all
the feature ids

My guess is that this would be quite a bit faster than boundingbox
method, especially because select(QgsRectangle, bool) actually
contains this:

QgsFeature f;
while ( nextFeature( f ) )
{
  select( f.id(), false );
}

whereas setSelectedFeatures is more direct.

Carson

On 9 November 2010 16:46, Barry Rowlingson  wrote:
> On Tue, Nov 9, 2010 at 4:22 PM, kimaidou  wrote:
>> Hi again
>>
>> Still working on my python plugin...
>>
>> I need to simply select all the features of a chosen vector layer. In
>> QgsVectorLayer api, there is no method "selectAllFeatures()"
>>
>> So I use this piece of code to achieve it
>> http://osgeo.pastebin.com/Ma9DxgKR
>
>  That's an interesting approach! My selectplus plugin has a 'select
> all' function which does this:
>
>    def doit(self):
>        layer = self.iface.mapCanvas().currentLayer()
>        layer.setSelectedFeatures(layerIds(layer))
>        return None
>
> where layerIds is:
>
> def layerIds(layer):
>    ids = []
>    p = layer.dataProvider()
>    allAttrs = p.attributeIndexes()
>    p.select(allAttrs)
>    f = QgsFeature()
>    while p.nextFeature(f):
>        ids.append(f.id())
>    return ids
>
> Your rectangle overlay should be pretty quick, but maybe my collecting
> all the feature IDs is quicker?
>
> Barry
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] minimum versions

2010-11-14 Thread Carson Farmer
Hi Devs, I'd like to a get take on the minimum versions for some of
the software that qgis depends on, namely GEOS, SIP, and GDAL/OGR.
What is our policy on minimum versions, how often do we update them,
and how can I find out what they are for the various bits and pieces?
Do we have any official documents/places where this information is
stored? I ask because a) recent versions of GEOS > 3.1 have several
new features like one sided buffers etc that would be quite nice to
have, and b) the more Pythonic way of interacting with the PyQGIS
bindings requires a more recent version of SIP > 4.9, which would make
python plugin development easier and cleaner for all the Pythonistas
out there...

Thanks in advance for any information,

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] python error

2010-11-17 Thread Carson Farmer
Hi Hasan,

Well I think your error message tells it all: You have problems with
indentations.
If the only issue is that you have mixed tabs and spaces, then you
could do a simple find and replace to correct that problem.
However, without looking at your code we really won't be able to help much.

Carson

On 17 November 2010 14:24, Muhammad Abu Hasan  wrote:
> Dear all,
>
> i am using QGIS 1.5.0
> my operating system is win XP
> python 2.7
>
>
> i have build one python plug in for QGIS but when i want to run .py file
> then it gives me an error " Error: inconsistent identation detected ! 1.
> your identation is outright incorrect  2. your identation mixes tabs and
> spaces"
>
> could anyone help me to give suggestion about ,how can i solve this problem
>
> best regards
>
> Hasan
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] manageR plugin: hot wo load R package "sp"

2010-11-19 Thread Carson Farmer
Hi Peter, would it be possible for you to send me an example of the
dataset that causes the crash?

Carson

On 19 November 2010 14:25, "Peter Löwe"  wrote:
> Hi Barry,
>
> after having R-dev installed, getting sp works like a charm:
>
> install.packages("sp")
>
> library(sp)
>
> does the trick.
>
> Using "Import Layer From Canvas" works for point and line layers (tested on 
> the Spearfish dataset)
>
> However, applying "Import Layer From Canvas" for polygon layers leads to a 
> segfault.
>
> Any Suggestions ?
>
> Peter
>
>
>
>
>
>  Original-Nachricht 
>> Datum: Fri, 19 Nov 2010 09:39:17 +
>> Von: Barry Rowlingson 
>> An: peter.lo...@gmx.de
>> CC: qgis-developer@lists.osgeo.org
>> Betreff: Re: [Qgis-developer] manageR plugin: hot wo load R package "sp"
>
>> On Fri, Nov 19, 2010 at 8:26 AM,   wrote:
>> > Hi List,
>> >
>> > the manageR plugin requires for the action "Import Layer From Canvas"
>> the R package "sp".
>> >
>> > The common way to install sp within the manageR CLI fails:
>> >
>> >> install.packages("sp")
>> > Installing package(s) into
>> ‘/home/pel/R/x86_64-unknown-linux-gnu-library/2.12’
>> > (as ‘lib’ is unspecified)
>> > --- Please select a CRAN mirror for use in this session ---
>> > Loading Tcl/Tk interface ... done
>> > trying URL 'http://cran.at.r-project.org/src/contrib/sp_0.9-72.tar.gz'
>> > Content type 'application/x-gzip' length 535353 bytes (522 Kb)
>> > opened URL
>> > ==
>> > downloaded 522 Kb
>> >
>> >
>> > The downloaded packages are in
>> >        ‘/tmp/RtmpOTaSDB/downloaded_packages’
>> > Warning message:
>> > In install.packages("sp") :
>> >  installation of package 'sp' had non-zero exit status
>> >
>> >
>> > Does anybody know a way to solve this one ?
>>
>>  What happens when you try this from the R command line from a
>> terminal window, rather than manageR? Possibly manageR is hiding some
>> diagnostic messages.
>>
>>  Since sp is being installed from source, my first suspicion is that
>> you don't have the requisite C/Fortran compilers on your system. Is it
>> ubuntu/apt-based? Do "sudo apt-get install build-essential" from a
>> command line, that should get them.
>>
>> Barry
>
> --
> Dr. Peter Löwe
> 
>
>
>
>
>
> GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
> gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] python error

2010-11-22 Thread Carson Farmer
As your error message indicates, you need to install PyQt.

http://www.riverbankcomputing.co.uk/software/pyqt/download

Carson

On 22 November 2010 12:35, Muhammad Abu Hasan  wrote:
> Dear All,
>
> i have problem with python2.5 when i want to run my program then it gives me
> error
>
> "Traceback (most recent call last):
>   File "C:\reasoner_interface.py", line 10, in 
>     from PyQt4 import QtCore, QtGui
> ImportError: No module named PyQt4"
>
> could you please inform me ,how can i solve this problem?
>
> best regards
> Hasan
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] manageR plugin: hot wo load R package "sp"

2010-11-22 Thread Carson Farmer
Hi Peter,

> the dataset is the standard Spearfish sample dataset 
> (http://grass.fbk.eu/sampledata/spearfish_grass60data-0.3.tar.gz)[data layers 
> used: archsites (point), streams (line), quads (polygon)].
>
> I am using QGIS 1.6.0 (similar effects were observed in QGIS 1.4). 
> "Reprojection on the fly" is active, using EPSG:4326 as reference SRS.
Good, and are you using version 1.0 of manageR?

> It seems like the segfaulting occurs independent from the geometry type of 
> the layers, but occurs when a _second_ layer is imported into manageR.
Hmm, I'm not getting the same behaviour here (Ubuntu Linux 10.04,
R-2.12.0, rpy2-2.1.4, QGIS-1.7.0-Trunk-revision 14735). I was able to
import any and all spearfish layers...
My guess is that this is a GDAL/OGR issue. Which version of GDAL do
you have on your system?

Carson
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QGIS for winXP

2010-11-22 Thread Carson Farmer
> Hi Muhammad, I have the same problems and I wrote many times to this list
> but I have not received good answers. When there are problems, tutorials
> don`t work and we need help from the community.
I am sorry to hear that you have had problems getting help from the
community, normally the QGIS devs and users are quite ready and
willing to provide help, and are generally much more friendly than
most mailing lists. They do however require a minimal level of help
from you (the poster) as well:

In Hasan's case, I think we'll probably need more information about
the problem that he is having before we'll be able to help him. Most
developers are busy people, and without a reproducible example or test
case to work with, we are unlikely to be able to help during the
limited spare time that we have. Things to think about when asking
questions are: What is your operating system (obviously in this case
it is Win XP), What versions of the various bits of software are you
running (in this case Muhammad has provided this information already),
and what *exactly* is the problem that you are experiencing. It is not
clear from the original email what the problem is. Is the plugin that
you are having trouble with one of your own, or is it one of the many
plugins available via the plugin installer? It sounds like it is one
of your own plugins, in which case, what exactly is the error message
that you are getting when trying to load it in QGIS? Have you followed
the tutorials provided for building PyQGIS plugins? When does the
error occur (during QGIS startup, when trying to activate the plugin,
during execution of plugin code)?

If you would like a complete and 'good' answer, then you'll have to
provide us with more information, and 'good' examples of your problem.
If you post a snippet of code that seems to be giving you issues, then
devs and other users are more likely to to able to help (and want to
help), because they can simply fire up their QGIS, and paste some code
into the Python console or similar. Help us help you!

Regards,

Carson

> Anybody has experinece to use QGIS with windows XP operating system ?
> becasue i am using QGIS1.4.0 with windows XP and since one month i am facing
> problem to open plug-in in QGIS and its really a big problem for me,
> whenever i want to opne plugin the QGIS give me some python error.
>
> therefore, if anybody has experience then could you please write to me what
> is required to use QGIS with winXP, basically i need create python plug-in
> for QGIS.
>
> best reagrds
> Hasan

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] qgis2google, OTB plugins, enhanced measurements

2010-11-23 Thread Carson Farmer
Hi Maxim, sounds great...

> 3. modified all three measurement tools to work with
> unprojected data in lat-long and automagically give numbers in meters etc
> (angles are spherical), calculations are using QgsDistanceArea
> and WGS84 based. Handy for those who have rasters in latlong, but
> still want to get measurements in meters/km2
Does it always default to WGS84 when computing distances, even if a
user is using NAD27? or does it just go off the default CRS as defined
in the options?

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools plugin - Voronoi code syntax error

2010-11-23 Thread Carson Farmer
hmm, funny, I don't get a syntax error there... What about if you
change that line to:

sl = voronoi.SiteList([voronoi.Site(i[0],i[1], sitenum=j) for j, i in
enumerate(uniqueSet)])

Note, the file to change will be in your source directory:
qgis/python/plugins/fTools/tools/doGeometry.py

Carson

On 23 November 2010 10:36, Ivan Mincik  wrote:
> Hi Carson,
> when installing latest trunk on Debian Lenny (Python 2.5.2) I get syntax
> error.
>
> Compiling /usr/share/qgis/python/plugins/fTools/tools/doGeometry.py ...
>   File "/usr/share/qgis/python/plugins/fTools/tools/doGeometry.py", line 531
>     sl = voronoi.SiteList([voronoi.Site(*i, sitenum=j) for j, i in
> enumerate(uniqueSet)])
>   ^
> SyntaxError: invalid syntax
>
>
> --
> Ivan Mincik, Gista s.r.o.
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools plugin - Voronoi code syntax error

2010-11-24 Thread Carson Farmer
Attached is the modified doGeometry (with a few other bug fixes added!).

I've also committed this fix to trunk (r14758), so the next time you
update it should still work :-)

Carson

On 24 November 2010 18:45, MORREALE Jean Roc  wrote:
> Le 24/11/2010 14:07, Ivan Mincik a écrit :
>>
>> On 11/23/2010 03:38 PM, Carson Farmer wrote:
>>>
>>> hmm, funny, I don't get a syntax error there... What about if you
>>> change that line to:
>>>
>>> sl = voronoi.SiteList([voronoi.Site(i[0],i[1], sitenum=j) for j, i in
>>> enumerate(uniqueSet)])
>>>
>> Hi, sorry for late answer, I missed Your email. Yes, it is working with
>> that change.
>>
>
> I have this error too with the osgeo4's nightbuild 1.7.0-11, could you join
> DoGeometry.py as it seems I can't do a correct copy&paste with messing up
> the indentation :p
>
> regards,
> jean roc
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
# -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from ui_frmGeometry import Ui_Dialog
import ftools_utils
import math
from itertools import izip
import voronoi
from sets import Set

class GeometryDialog(QDialog, Ui_Dialog):

  def __init__(self, iface, function):
QDialog.__init__(self)
self.iface = iface
self.setupUi(self)
self.myFunction = function
self.buttonOk = self.buttonBox_2.button( QDialogButtonBox.Ok )
QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
if self.myFunction == 1:
  QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.update)
self.manageGui()
self.success = False
self.cancel_close = self.buttonBox_2.button( QDialogButtonBox.Close )
self.progressBar.setValue(0)

  def update(self):
self.cmbField.clear()
inputLayer = unicode(self.inShape.currentText())
if inputLayer != "":
  changedLayer = ftools_utils.getVectorLayerByName(inputLayer)
  changedField = ftools_utils.getFieldList(changedLayer)
  for i in changedField:
self.cmbField.addItem(unicode(changedField[i].name()))
  self.cmbField.addItem("--- " + self.tr( "Merge all" ) + " ---")

  def accept(self):
if self.inShape.currentText() == "":
  QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify input vector layer" ) )
elif self.outShape.text() == "":
  QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify output shapefile" ) )
elif self.lineEdit.isVisible() and self.lineEdit.value() < 0.00:
  QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify valid tolerance value" ) )
elif self.cmbField.isVisible() and self.cmbField.currentText() == "":
  QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify valid UID field" ) )
else:
  self.outShape.clear()
  self.geometry( self.inShape.currentText(), self.lineEdit.value(), self.cmbField.currentText() )

  def outFile(self):
self.outShape.clear()
(self.shapefileName, self.encoding) = ftools_utils.saveDialog(self)
if self.shapefileName is None or self.encoding is None:
  return
self.outShape.setText(QString(self.shapefileName))

  def manageGui(self):
if self.myFunction == 1: # Singleparts to multipart
  self.setWindowTitle( self.tr( "Singleparts to multipart" ) )
  self.lineEdit.setVisible(False)
  self.label.setVisible(False)
  self.label_2.setText( self.tr( "Output shapefile" ) )
  self.cmbField.setVisible(True)
  self.field_label.setVisible(True)
elif self.myFunction == 2: # Multipart to singleparts
  self.setWindowTitle( self.tr( "Multipart to singleparts" ) )
  self.lineEdit.setVisible(False)
  self.label.setVisible(False)
  self.label_2.setText(self.tr(  "Output shapefile" ) )
  self.cmbField.setVisible(False)
  self.field_label.setVisible(False)
elif self.myFunction == 3: # Extract nodes
  self.setWindowTitle( self.tr( "Extract nodes" ) )
  self.lineEdit.setVisible(False)
  self.label.setVisible(False)
  self.cmbField.setVisible(False)
  self.field_label.setVisible(False)
elif self.myFunction == 4: # Polygons to lines
  self.setWindowTitle( self.tr(  "Polygons to lines" ) )
  self.label_2.setText( self.tr( "Output shapefile" ) )
  sel

Re: [Qgis-developer] "best" plugin to launch complex PostGis queries

2010-11-30 Thread Carson Farmer
kimaidou,

> By the way, I find the different plugins usefull, but I really miss one
> using the memory provider for vector layers for displaying the query result
> instead of creating a table or a view wich pollutes the postgis database.
No need for the memory provider, have a look at the RT SQL Layer
plugin in newer versions of QGIS.

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Spatialite ’select’ stateme nt as vector layer in QGIS

2010-12-08 Thread Carson Farmer
YUP!
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Re: New Symbology : merge borders on nodes for lines

2011-02-17 Thread Carson Farmer
Perhaps 'Symbol layer ordering' or simply 'layer order'?

Carson

On 17 February 2011 12:20, Nathan Woodrow  wrote:
> I agree.  I have looked at that dialog before but didn't really understand
> it.  IMHO it should be reworded into something less technical.
> - Nathan
>
> On Thu, Feb 17, 2011 at 11:15 PM, kimaidou  wrote:
>>
>> Hi Robert,
>>
>> Thanks a lot, I missed this. It works great.
>>
>> By the way, the vocabulary used here is a bit confusing, no ?
>> What does "Symbol levels" means ?
>>
>> 2011/2/17 Robert Szczepanek 
>>>
>>> Hi Kimaidou,
>>>
>>> In style new symbology hit 'Symbol levels'. Enable it. That is it.
>>>
>>> regards,
>>> Robert
>>>
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] manageR not importing from the canvas

2011-03-04 Thread Carson Farmer
Hi Paolo,
> In the first case it was a WFS layer, in the second a plain shp.
> Error in `[.data.frame`(data, match.ID[1]) : undefined columns selected
Does the WFS layer have any attributes associated with it?
> Loading the same shapefile and exporting it to the canvas works smoothly.
By this, do you mean loading it via say readOGR?
> Error in function (projargs) : no arguments in initialization list
Is the shapefile in a projected CRS? Sometimes R doesn't like it when
manageR tries to import an un-projected layer for some reason?
> BTW, loading a shp misses the Browse... button.
This will be available in the next version, which is still a ways off
at this point unfortunately :-(

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] macosx dialog issues

2011-03-05 Thread Carson Farmer
Hello Devs,
A user (Dr. José Carlos Guerrero) has contacted me recently with a
problem that appears to stem from Qt dialogs on MacOS:

José is unable to specify output files from several of the fTools
tools where a save dialog should be popping up.

His install came from here: http://www.kyngchaos.com/software/qgis and
the relevant particulars are here:
MACOSX 10.6.6
QGIS 1.6
ftools: 0.6.1

Any thoughts?

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] macosx dialog issues

2011-03-05 Thread Carson Farmer
Hi John, I believ José had problems with:

- Geoprocessing tools available as Intersect two layers
- Data management tools as Export to projection

> The only problem I had was with Merge Shapefiles. If I tick the 'Select by 
> layers in the folder', I cannot choose a folder in the dialog. The Ok button 
> never becomes available when trying to select a folder. I can select a 
> shapefile and the OK button is available. I might be misunderstanding what 
> this option is intended to do. When turning it off, I can select a folder, 
> but the tool crashed qgis. This was because my folder had mixed geometry 
> types. See output below. I suppose this crash should be avoided somehow.
Hmm, ok I'll look into this one, thanks for the update.
>
> One random thought arose as I tested the tools. Why is the random select tool 
> limited to 30 features?
What? It shouldn't be? Unless your layer only has 30 features?

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] bug queue

2011-03-06 Thread Carson Farmer
> I think the interested devs should cast their vote ;)
Sure, that will certainly make it easier to find all the relevant bugs

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] macosx dialog issues

2011-03-06 Thread Carson Farmer
Hi Alexander,

> 'Select by layers in the folder' checkbox allow you to select and
> merge only some shapes not all available in folder. This can be usefull
> when in folder many shapes with different geometries or when you need
> only to merge only certain files.
>
> When this checkbox turned off tool will work with whole folder, but note
> that there is no geometry checks and output file will have same geometry
> as first pocessed file. This behaviour is fixed in separate MergeShapes
> plugin from GIS-Lab. I'll port it to fTools soon.
That would be great, thanks for that :-)


-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
Hi Devs,

One of my favorite outcomes from developing fTools, is actually when
one or two fTools functions become redundant due to new features in
base QGIS. The reason isn't because that means one less tool for me to
worry about, but rather because it means things are progressing... and
with QGIS things are progressing big time! In that vein, I would like
to propose several tool 'retirements' from fTools. While I tend to
feel that several ways to do the same thing is helpful/good, it can
also get confusing if those different procedures produce varying
results. As such, I think it would be appropriate to retire the
following tools:
- Export/add geometry columns (this can now be done quite easily from
the field calculator, and my version appears to have issues with
certain vector formats)
- Export to new projection (this can now be achieved by "Sav[ing] a
layer as...")
- Join attributes (this was never really meant as a 'solution', but
rather a temporary 'hack' to allow for table joints, but it is slow
and combersome, and requires the creation of a new field, whereas the
new join capabilities are excellent, fast, and excellent!)
- fTools information (nobody needs to know what fTools is anymore, and
frankly, this info should really be part of the help system and
documentation... also, I think this dialog often interferes with
help/about on macs?)

Some other potential 'retirees' are:

- Select by location (I think there is a 'Spatial Query' plugin which
has this functionality plus much more, and appears to be quite fast)
- Define current projection (Is this covered by the new 'Set CRS of
Layer(s)' tool? I haven't had much of a play with this one yet, but it
sounds like it should, and is more convenient being part of the main
GUI)

Let me know what you think. Should these be completely retired, or
should they perhaps just be wrappers around their replacements to keep
things familiar? I think I'd be leaning more towards full retirement,
which should hopefully promote doing things 'the right way' (i.e.
using the new core QGIS functionality).

Regards,

Carson


-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
> the field calculator misses to compute the perimeter of the polygons.
> Once it will do it you can retire "Export/add geometry columns" ;)
Ok, I'll have a look at that tonight then

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
> I find your solution more intuitive for newbies, and I would like to
> keep it, at least for now. Can calculator extract x and y from points?
No it can't, and perimeter calculation seems to be an issue as well.
Ok, well then I might change this to be a wrapper around the field
calculator, that way it will be intuitive for beginners, and still
have the added functionality of x and y values and perimeter.
>> - Export to new projection (this can now be achieved by "Sav[ing] a
>> layer as...")
>
> Agreed.
Ok, I will remove this tonight
>> - Join attributes (this was never really meant as a 'solution', but
>> rather a temporary 'hack' to allow for table joints, but it is slow
>> and combersome, and requires the creation of a new field, whereas the
>> new join capabilities are excellent, fast, and excellent!)
>
> Agreed.
This one I will not be sad to see gone from fTools! Good riddance ;-)
>> - fTools information (nobody needs to know what fTools is anymore, and
>> frankly, this info should really be part of the help system and
>> documentation... also, I think this dialog often interferes with
>> help/about on macs?)
>
> It is a piece of history, and it is nice to give credits to your work,
> but it is true that now it seems a bit out of place.
I'll just move all the 'credit' related info to where it belongs in
the main QGIS about dialog I think. I don't like how it looks the way
it is now, and for the most part, fTools is now referred to as the
Vector menu, so beginners probably don't even know what fTools is
>
>> - Select by location (I think there is a 'Spatial Query' plugin which
>> has this functionality plus much more, and appears to be quite fast)
>
> Right, even though the spatial query is more complex to use.
Hmm, yes I tested it just now. It is a bit more complicated, but not
overly so... thoughts from others?

>> - Define current projection (Is this covered by the new 'Set CRS of
>> Layer(s)' tool? I haven't had much of a play with this one yet, but it
>> sounds like it should, and is more convenient being part of the main
>> GUI)
>
> AFAIK, the properties define a projection at runtime, whereas your tool
> actually writes a prj file. Am I wrong?
True, it does write the prj file, but I'm talking about the new
feature from recent builds... the tool doesn't have an icon yet... am
I crazy?
>
> BTW, I think now fTools could often avoid writing new shapefiles, just
> adding the new info on the existing layer instead (e.g. points in
> polygons, etc.).
> Would this be hard?
Not overly hard no, and there are really only a few tools that this
would apply to.

One thing I'd really like to do is add the capability to output other
formats besides shapefiles (I'm not a big shapefile fan these days,
field name limitations are a hassle). I might try move over the
geometry and geoprocessing tools first, as they seem to be the most
frequently used tools.

Carson


-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
>> > One thing I'd really like to do is add the capability to output other
>> > formats besides shapefiles (I'm not a big shapefile fan these days,
>> > field name limitations are a hassle). I might try move over the
>> > geometry and geoprocessing tools first, as they seem to be the most
>> > frequently used tools.
>>
>> Maybe it is better to create in-memory layer and let user to save it in
>> some desired format using Save As... option from layer context menu?
>
> H implementing other file formats to the QgsVectorFileWriter is quite
> easy, while AFAIK writing to the memory layer requires another approach. Maybe
> we should encapsulate the QgsVectorFileWriter to provide an universal class
> for the 1.7 API? Just a thought - it's late and my brain is busy with a few
> other threads ;)
My preference would be to add the capability to write to other
formats. Writing to a memory layer can become unwieldy when working
with large layers (which is common with geoprocessing operations).

Carson


-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
> Btw. When saving to files, kinda garbage collector would be extremely usable:)
Garbage collector? You mean memory-wise, or temporary file type garbage?

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
On Mon, Mar 7, 2011 at 10:33 PM, Borys Jurgiel  wrote:
> Dnia poniedziałek 07 marca 2011 o 23:31:28 Carson Farmer napisał(a):
>> > Btw. When saving to files, kinda garbage collector would be extremely
>> > usable:)
>>
>> Garbage collector? You mean memory-wise, or temporary file type garbage?
>
> temporary files :)
>
So a tool to delete vector(s)/raster(s) and associated files.
Something like a open file dialog where you can select x number of
QGIS supported vector/raster files, and delete them all in one go?
That *would* be handy...

C


-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
Ok, but we have to be careful here... because overwriting a layer that
we are currently working on could lead to problems when the data
provider tries to access features that have been overwritten/erased.
Also, what about the case where we have a line layer that we are
buffering?

Carson

On Mon, Mar 7, 2011 at 10:41 PM, Borys Jurgiel  wrote:
> Dnia poniedziałek 07 marca 2011 o 23:32:21 Nathan Woodrow napisał(a):
>> I would like to see one more option on that list:
>>
>>    - Save to current selected layer
>>
>> This would write straight back to the current selected layer.  I don't
>> always want a new layer when doing things like buffers etc.
>
> +1 And it should be probably implemented in qgis libs for easy use in plugins.
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-07 Thread Carson Farmer
Ok, I'm getting the overwhelming feeling that people want to be able
to 'write' to memory layers. I'll try to add this functionality.
However, I really don't think this should be the 'default' or
primary/sole output type. I think what I'll probably do is simply add
'output options' to the current output file dialog, such that users
can choose memory layer (this might require some work on a more
generic vector file writer), shapefile, kml, whatever...

Carson

On Mon, Mar 7, 2011 at 10:43 PM, Chris Crook  wrote:
> Yes please to this option (fTools writing to a memory layer)!!
>
> I was thinking of coding for a couple of the fTools functions I used myself.  
> It would be great to have it in fTools by default :-)
>
> Note: I've uploaded a memory saver plugin that allows memory layers to be 
> persisted alongside the project file (MemoryLayerSaver plugin).
>
> In discussing this before I've suggested that this should really be a core 
> function .. The memory layers shouldn't disappear without warning when you 
> save and reopen a project.  This provoked some discussion and different 
> points of view.  For example where and in what format should the memory layer 
> data be stored.
>
> I also think that if you save a memory layer to a persistant format, then at 
> least optionally the saved layer could replace the existing memory layer (ie 
> replace the memory data provider with the provider for the saved version and 
> retain the symbology and z order placement).
>
> Perhaps replacing the provider in this way should be option whenever any 
> vector layer is saved, as memory layers don't look different to  any other to 
> the user.
>
> Moving to using the memory layers as a working layer for tools would make 
> this a much more valuable enhancement.
>
> Cheers
> Chris
>
> -Original Message-
> From: Alexander Bruy [mailto:alexander.b...@gmail.com]
> Sent: Tuesday, 8 March 2011 10:08 a.m.
> To: Carson Farmer
> Cc: Qgis Developer List
> Subject: Re: [Qgis-developer] In with the new, out with the old?
>
> Hi Carson
>
> On Mon, 7 Mar 2011 18:16:23 +
> Carson Farmer  wrote:
>
>> - Export/add geometry columns (this can now be done quite easily from
>> the field calculator, and my version appears to have issues with
>> certain vector formats)
> Starting with r15381 Field calculator can extract X, Y and perimeter, so I 
> think this tool can be removed
>
>> > BTW, I think now fTools could often avoid writing new shapefiles,
>> > just adding the new info on the existing layer instead (e.g. points
>> > in polygons, etc.).
>> > Would this be hard?
>> Not overly hard no, and there are really only a few tools that this
>> would apply to.
>>
>> One thing I'd really like to do is add the capability to output other
>> formats besides shapefiles (I'm not a big shapefile fan these days,
>> field name limitations are a hassle). I might try move over the
>> geometry and geoprocessing tools first, as they seem to be the most
>> frequently used tools.
>
> Maybe it is better to create in-memory layer and let user to save it in some 
> desired format using Save As... option from layer context menu?
>
> --
> Alexander Bruy
>
> __
>
> This message contains information, which is confidential and may be subject 
> to legal privilege.
> If you are not the intended recipient, you must not peruse, use, disseminate, 
> distribute or copy this message.
> If you have received this message in error, please notify us immediately 
> (Phone 0800 665 463 or i...@linz.govt.nz) and destroy the original message.
> LINZ accepts no responsibility for changes to this email, or for any 
> attachments, after its transmission from LINZ.
>
> Thank you.
> __
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-08 Thread Carson Farmer
> In any case, I like your suggestion to put wrappers to all these new plugins
> (C++ also) under the "Vector" menu. THere's been a lot of discussion
> regarding consolidating plugins under categories /menu topics to make things
> easier to find. Any spatial query tools should, in my opinion appear under
> the Vector menu.
Oops, perhaps I was misleading here. I do not intent to 'wrap' any
*plugins* within the Vector menu! Only some of the new *core*
functions. The Vector menu is a set of 'out of the box' functions
based on the QGIS core library functions, and as such only contains
code that I can 'vouch for'. I think it is important to separate the
plugins from the core functions for many reasons, the primary reason
being that if we wrap plugins into the Vector menu, we will get a
bunch of bug reports on tools in this menu that should really be
reported to the plugin author, or using the new plugin web interface.

> Furthermore, there's the MMQGIS set of vector tools, some of which duplicate
> fTools functions (i.e. merge shapefile). Perhaps an effort to organize all
> these tools in one place would be worthwhile.
I haven't had much luck with the MMQGIS plugin myself, but it would
certainly be a good idea to organize the plugins in general. I know
there has been a lot of talk about this, but again, it is my feeling
that the 'plugins' should be organised separately from the core
functions/menus, like the Vector and Raster menus.

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] In with the new, out with the old?

2011-03-08 Thread Carson Farmer
Attached is a quick attempt at it... Pretty rough but it works...

Carson

On Tue, Mar 8, 2011 at 11:36 AM, Nathan Woodrow  wrote:
> Are you talking about my FileBrowser plugin, if so I was thinking about
> adding support to delete and rename files some time in the future just have
> been super busy and haven't had a chance.  If someone wants to try it for me
> the code is up on https://github.com/madmanwoo/QGIS-File-Browser you can
> just fork and do what you need.   I will happily take any help.
> - Nathan
> On Tue, Mar 8, 2011 at 10:18 PM, Borys Jurgiel 
> wrote:
>>
>> Dnia wtorek 08 marca 2011 o 11:26:50 Paolo Cavallini napisał(a):
>> > Il giorno lun, 07/03/2011 alle 22.43 +, Carson Farmer ha scritto:
>> > > So a tool to delete vector(s)/raster(s) and associated files.
>> > > Something like a open file dialog where you can select x number of
>> > > QGIS supported vector/raster files, and delete them all in one go?
>> > > That *would* be handy...
>> >
>> > This could be a fairly simple addition to QGIS file browser plugin.
>> > A very useful one, BTW.
>> > Could you add a wish to the trac?
>> > All the best.
>>
>> If so, please link also this ticket:
>> http://trac.osgeo.org/qgis/ticket/2719
>> I believe in the future we will merge FileBrowser and Gary's Browser,
>> won't
>> we?
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/


simple_changes.diff
Description: Binary data
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Raster providers

2011-03-08 Thread Carson Farmer
Works beautifully (I'm looking at a reprojected alaska landcover test
dataset as I type this)! One comment though: The Debug output is
*extremely* verbose... as in... it looks like the matrix screen with
numbers running down my console ;-) Is this necessary?

Carson

On Tue, Mar 8, 2011 at 11:32 PM, Borys Jurgiel  wrote:
> Finally! :-) It's impressing. I observe two issues only:
>
> 1. Histogram stretch doesn't work with OTFR enabled (both tools: the one in
> layer context menu and the one in toolbar). By the way, why there are the two
> tools for stretching? The one in toolbar works with grayscale rasters only,
> while the one in the layer context menu seems to work always.
>
> 2. GDAL TMS layers don't work. I get a warning messageBox:
>
> Cannot ChunkAndWarpImage : Integer overflow : nSrcXSize=1048576,
> nSrcYSize=1048576
>
> This is, for example, a TMS source that doesn't work any more:
>
> 
>        
>                
> http://tile.openstreetmap.org/${z}/${x}/${y}.png
>        
>        
>                -20037508.34
>                20037508.34
>                20037508.34
>                -20037508.34
>                16
>                1
>                1
>                top
>        
>        EPSG:900913
>        256
>        256
>        3
>        
>                .png
>        
> 
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Multipart to Singlepart: empty result

2011-03-12 Thread Carson Farmer
This is why I love open source!
> 2) The fTools have one BUG in method of  "multi_to_single":
> 2.1) Source:
> http://trac.osgeo.org/qgis/browser/trunk/qgis/python/plugins/fTools/tools/doGeometry.py
> 2.3) Adjust in code:
> 2.3.1) In line 354 put:
> geometryTypeWriter = vprovider.geometryType() - 3
> 2.3.2) In line 358 change:
>  vprovider.geometryType()  to geometryTypeWriter
If you haven't already opened the ticket, don't bother, this has now
been fixed in r15451.

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] geometryless tables

2011-03-13 Thread Carson Farmer
Hi Devs,

Does anyone know if it's possible to (programatically) load a layer as
a geometyless table? In other words, say I have a shapefile named
foo.shp, is it possible to load foo.dbf without the spatial
information? I know I can open PostGIS tables, and even csv files this
way... but if I try this with a dbf file that has an associated .shp
file, it automatically loads the shp files as well.I see from the
QgsOgrProvider source that there is a setRelevantFields() function
which looks to do what I want (uses OGR's SetIgnoreFields, where we
can use the special "OGR_GEOMETRY" specifier), but it is protected,
and my initial attempts to alter things to get access to it do not
seem to have worked... Any suggestions? Ultimately, what I'd like to
be able to do is white a simple plugin to load geometryless tables for
joining etc in QGIS. I'm about 90% of the way done (it already works
for csv files, and lone dbf files), but I'd like something a bit more
generic so it could work with pretty much any ogr supported format.
Has anyone else already done such a thing?

Cheers,

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] geometryless tables

2011-03-13 Thread Carson Farmer
Hi Jürgen,

Thanks for the reply.
> Not that I know.   But what's the problem adding the layer with geometry and
> not to use it?
Well *technically* nothing, but what I'd really like is for it to show
up in the layer list as a table (i.e. with the table icon), and more
importantly, I don't want it to be rendered at all, especially if it
is a particularly complex layer (geometry-wise). Currently, if I do
manage to import a geometryless table via org, I get the exact
behaviour I describe here, which is good. Now I just want to 'ensure'
that this happens when I want it to. Anyway, I'll obviously have to
have a look at QgsOgrProvider a bit more...

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools Add Geometry error

2011-03-16 Thread Carson Farmer
Hi Micha,

> Traceback (most recent call last):
>   File "/home/micha/.qgis/python/plugins/fTools/fTools.py", line 387, in
> docompGeo
>     d = doGeometry.GeometryDialog( self.iface, 5 )
>   File "/home/micha/.qgis/python/plugins/fTools/tools/doGeometry.py", line
> 17, in __init__
>     self.setupUi(self)
>   File "/home/micha/.qgis/python/plugins/fTools/tools/ui_frmGeometry.py",
> line 73, in setupUi
>     self.progressBar.setProperty("value", 0)
> TypeError: argument 2 of QObject.setProperty() has an invalid type

This is actually an error from the (auto) generated ui file. Have you
recently updated your Qt/PyQt version?

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] crs comparison inconsistencies

2011-03-16 Thread Carson Farmer
Hi devs,

I've noticed something with CRS comparison that (I think) bears
consideration. Below is an example from the QGIS Python console:

>>> mc = qgis.utils.iface.mapCanvas()
>>> first_layer = mc.layer(0)
>>> second_layer = mc.layer(1)
>>> first_layer.crs().toProj4()
PyQt4.QtCore.QString(u'+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.35
+x_0=20 +y_0=25 +ellps=mod_airy +units=m +no_defs')
>>> second_layer.crs().toProj4()
PyQt4.QtCore.QString(u'+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.35
+x_0=20 +y_0=25 +ellps=mod_airy +units=m +no_defs')
>>> first_layer.crs().toProj4() == second_layer.crs().toProj4()
True
>>> first_layer.crs() == second_layer.crs()
False

Ok, so that seems funny, so I checked further, turns out one is a user
defined CRS:
>>> first_layer.crs().authid()
PyQt4.QtCore.QString(u'EPSG:29902')
>>> second_layer.crs().authid()
PyQt4.QtCore.QString(u'USER:10')
>>> first_layer.crs().toWkt()
PyQt4.QtCore.QString(u'PROJCS["unnamed",GEOGCS["unnamed
ellipse",DATUM["unknown",SPHEROID["unnamed",6377340.189,299.324964544]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.35],PARAMETER["false_easting",20],PARAMETER["false_northing",25],UNIT["Meter",1]]')
>>> second_layer.crs().toWkt()
PyQt4.QtCore.QString(u'PROJCS["unnamed",GEOGCS["Modified
Airy",DATUM["unknown",SPHEROID["mod_airy",6377340.189,299.3249373654873]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",53.5],PARAMETER["central_meridian",-8],PARAMETER["scale_factor",1.35],PARAMETER["false_easting",20],PARAMETER["false_northing",25],UNIT["Meter",1]]')

Ok, so they aren't technically *exactly* the same... but for all
intents and purposes, they are equivalent. According to the docs, the
'equal()' function "use[s] OGR isSameCRS() or isSameGeoCRS() methods
as appropriate. Additionally logic may also be applied if the result
from the OGR methods is inconclusive." Has any additional logic been
applied? Would it perhaps be more appropriate to check for similarity
on multiple levels? I.E. something like:
if not crs1 == crs2:
ok, but they might still be equivalent...
if crs1.toProj4() == crs2.toProj4():
return see, I told you!
else:
return fine, you were right all along
else:
return aha, I knew it
return nope, sorry they aren't the same

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools Add Geometry error

2011-03-17 Thread Carson Farmer
Hmm, ok, was this a self build? If yes, it might be worth rebuilding the
included plugins. It looks like there is some issue with ui_frmGeometry.py,
which is actually auto-generated from frm_Geometry.ui at build time.

Carson

On Thu, Mar 17, 2011 at 8:34 AM, Micha Silver  wrote:

>  Hello Carson
>
>
>  On 16/03/2011 17:24, Carson Farmer wrote:
>
> Hi Micha,
>
>
>  Traceback (most recent call last):
>   File "/home/micha/.qgis/python/plugins/fTools/fTools.py", line 387, in
> docompGeo
> d = doGeometry.GeometryDialog( self.iface, 5 )
>   File "/home/micha/.qgis/python/plugins/fTools/tools/doGeometry.py", line
> 17, in __init__
> self.setupUi(self)
>   File "/home/micha/.qgis/python/plugins/fTools/tools/ui_frmGeometry.py",
> line 73, in setupUi
> self.progressBar.setProperty("value", 0)
> TypeError: argument 2 of QObject.setProperty() has an invalid type
>
>  This is actually an error from the (auto) generated ui file. Have you
> recently updated your Qt/PyQt version?
>
>
>
> No. This particular machine get's all updates from the debian.gfoss.itrepo.  
> I checked thru the apt logs and nothing there.
>
>
>
> Carson
>
>
>
>
> --
>
> [image: Hevra Logo]
>
> Micha Silver
>
> Arava Development Co
>
> 052-3666918
>
> http://www.surfaces.co.il
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
<>___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: Re: CLip and reprojection on the fly

2011-03-18 Thread Carson Farmer
>
> I think that requiring all layers to be on the same CRS for processing
> makes sense,
> we can live with that. Perhaps this fact should be stated in the
> documentation and
> even in the menu where the user selects reprojection on the fly (for
> example, adding
> "only for display of vector layers") and/or in all fTools menus (and/or
> fTools could actually check that
> CRS is consistent across layers and warn the user (rather than preventing
> him/her of actually performing the operation).
>
I think I'll opt for the warning in fTools functions, however, does this not
already happen? I'm pretty sure the dialog that pops up after the operation
has completed says something like "Warning: Non-matching CRSs detected,
results might be unexpected" or something to that effect (I don't actually
have my result computer here to check)?

Carson
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools Add Geometry error

2011-03-21 Thread Carson Farmer
This seems like a decent suggestion (frankly, it shouldn't be necessary!),
but no matter what I try/do, the generated ui_*.py file always has the
'value' property set for the progressBar. It doesn't appear to be an
option...

$ pyuic4 --version
Python User Interface Compiler 4.7.2 for Qt version 4.6.2

Any suggestions?

C

On Sat, Mar 19, 2011 at 10:35 AM, Giuseppe Sucameli wrote:

> Hi Carson,
>
> On Thu, Mar 17, 2011 at 10:50 AM, Carson Farmer 
> wrote:
>
>> Hmm, ok, was this a self build? If yes, it might be worth rebuilding the
>> included plugins. It looks like there is some issue with ui_frmGeometry.py,
>> which is actually auto-generated from frm_Geometry.ui at build time.
>
> for more compatibility, remove the progressBar value from the .ui and set
> it by code.
> This should be fix it.
>
> Have a look ad GdalTools Grid, but also other tools,
> progressBars and spinBoxes' default value is set by code in the
> constructor.
>
> Cheers.
>
> On Thu, Mar 17, 2011 at 8:34 AM, Micha Silver  wrote:
>>
>>>  Hello Carson
>>>
>>>
>>>  On 16/03/2011 17:24, Carson Farmer wrote:
>>>
>>> Hi Micha,
>>>
>>>
>>>  Traceback (most recent call last):
>>>   File "/home/micha/.qgis/python/plugins/fTools/fTools.py", line 387, in
>>> docompGeo
>>> d = doGeometry.GeometryDialog( self.iface, 5 )
>>>   File "/home/micha/.qgis/python/plugins/fTools/tools/doGeometry.py", line
>>> 17, in __init__
>>> self.setupUi(self)
>>>   File "/home/micha/.qgis/python/plugins/fTools/tools/ui_frmGeometry.py",
>>> line 73, in setupUi
>>> self.progressBar.setProperty("value", 0)
>>> TypeError: argument 2 of QObject.setProperty() has an invalid type
>>>
>>>  This is actually an error from the (auto) generated ui file. Have you
>>> recently updated your Qt/PyQt version?
>>>
>>>
>>>
>>> No. This particular machine get's all updates from the debian.gfoss.itrepo. 
>>>  I checked thru the apt logs and nothing there.
>>>
>>>
>>>
>>> Carson
>>>
>>>
>>>
>>>
>>> --
>>>
>>> [image: Hevra Logo]
>>>
>>> Micha Silver
>>>
>>> Arava Development Co
>>>
>>> 052-3666918
>>>
>>> http://www.surfaces.co.il
>>>
>>
>>
>>
>> --
>> Carson J. Q. Farmer
>> ISSP Doctoral Fellow
>> National Centre for Geocomputation
>> National University of Ireland, Maynooth,
>> http://www.carsonfarmer.com/
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>
>
> --
> Giuseppe Sucameli
>
>


-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
<>___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools Add Geometry error

2011-03-21 Thread Carson Farmer
Giuseppe,

> I'm pretty sure that, if you unset the "value" property from QtDesigner, it
> doesn't appear
> in the .ui file and then in the generated _ui.py file.
>
I'm sure you're right... but I am unable to 'unset' the value property in
QtDesigner

> You may also edit the .ui file by hand and remove that line from the xml.
>
Looks like this is the only workable solution... I'll go with this for now,
though it seems that the first solution should really work...

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Basic Vector Conversion Tools

2011-03-25 Thread Carson Farmer
FYI: fTools now also has lines to polygons, and it also has an
'extract nodes' tool, which extracts nodes from lines and polygons as
points.
>>       - Create new points along a line at specified distance, or by sample 
>> quantity.
This will likely also be added to fTools soon.
> I think a couple of them have been partially implemented as multiple
> plugins. It would be great to bring them all under a common menu and to
> make the interface consistent and robust (ie be able to choose a column
> to group features by).

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QGis fTools

2011-03-26 Thread Carson Farmer
Hi All,

> Documentation - Improve the ftools_help.xml files by filling in the 'inputs, 
> parameters and additional information'.
Yes please, fTools documentation is definitely in need of
improvements. However, I would prefer to 'leave behind' the
ftools_help.xml file in favor of the more integrated help system that
QGIS uses (see comment about help button below).
> Plugins - Develop a plugin for fTools, based on suggestions from the fTools 
> developers regarding what is currently needed/wanted.
This is also a great opportunity to add some of the features that
users have been requesting. It might also be nice to have a vote, and
simply build the most sought after tool (within the parameters of your
(or whoever ends up building it) interests of course)
> Vector Menu - Integrate existing plugins so they can become part of the core 
> qgis plugins, included in the 'Vector' menu.
This is always something people are looking for, but we always need to
make sure we are only explicitly adding plugin that have a strong-ish
track record for stability, are general enough that most everyone will
want to have them as part of their vector arsenal, and that someone is
willing to maintain/bug fix the tool(s). Because the Vector menu is
installed by default, I would recommend only stable and/or extremely
useful/universally applicable tools make it into this menu as part of
the QGIS core plugins. However, I don't see a problem with making it
easier to 'add' plugins to the Vector menu as additional 'add-ons'
that users can install themselves after the initial QGIS install.
> Help Button - Add help buttons to each tool vector tool UI which link to the 
> fTools help file.
Again, yes please! Help buttons on all the tools would be excellent.
However, as I mentioned above, a proper integration with the existing
QGIS help system would be much better, and would facilitate
translations etc, which simply isn't feasible with the (very basic)
XML file I am currently using. As an additional note, the XML file and
about dialog have been removed from trunk in favor of the main QGIS
about dialog. So this is obviously a good time to re-implement the
help in a more integrated fashion.
A short help page for each tool, with a simple diagram, explanation,
parameters and their uses, plus links to relevant cites (wikipedia
atticles, OGC for each tool would be great. See
http://jaspa.forge.osor.eu/ST_Buffer.html for a nice simple example of
what could be done within the QGIS help framework.

> Carson, would you be interested in mentoring Jackie for GSoC to work on
> adding more stuff to ftools and improving things. Since ftools is your
> baby you're probably the best qualified and this might be a good chance
> to get your wishlist taken care of in addition to things mentioned in
> the previous thread.
I would be more than happy to mentor Jackie for a GSoC project, and
fTools/Vector menu could really use the attention :-)
Please also see my comments to the suggestions/points above.

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Fwd: [Qgis-user] QgsVectorLayer causes "Failed to load" error

2011-06-16 Thread Carson Farmer
I'd like to 'second' this observation. No matter what combination of
PYTHONPATH, LD_LIBRARY_PATH etc I try, I can't seem to get this
working either. I'm forwarding this thread to the developers mailing
list as well. Any suggestions? I've never had this problem before,
though I'm sure its something I'm doing :-p

Carson

#

Hello,

I know this problem has been discussed many times, but the usual
remedies are not working.

First I run the following commands from the shell:

export LD_LIBRARY_PATH=/usr/local/qgis/lib
export PYTHONPATH=/usr/local/qgis/share/qgis/python


Then I run the following program:

from qgis.core import *

qgis_prefix = '/usr/local/qgis/'

QgsApplication.setPrefixPath('/usr/local/qgis/', True)
QgsApplication.initQgis()

vlayer=QgsVectorLayer('./tl_2009_09001_faces.shp','tl_2009_09001_faces','ogr')
print vlayer.isValid()


I get the error message "Failed to load".

I am using the 1.18 debian packages.  It works fine if I run these
commands from the python console in qgis.  Any suggestions?  Thanks.
___
Qgis-user mailing list
qgis-u...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Sponsoring Development.

2011-06-18 Thread Carson Farmer
Just a quick thought, which is sort of based on the 'groupon' concept
that appears to be quite popular at the moment:

Say a user/group/company wants a feature/bug fix/whatever; they could
nominate this work on the QGIS website, where developers could take a
look (perhaps there could also be an automated email to the developers
list or a separate list so developers don't have to manually check the
page all the time). If a developer decided it was something they might
like to work on, they could provide an estimate of cost, including the
cost of a proper estimate. This would then be added to the nominated
task on the website, and would open up the task for 'bidding', such
that any similarly interested groups could offer up as much as they
were wiling to offer (perhaps some minimum here could be established).
Eventually, if the task was popular enough, the suggested cost would
be reached, and at that stage the developer could begin development.
If the minimum cost was not reached (perhaps within a certain time
limit), then the task would be dropped from the page, and all parties
who had initially 'bid' on the task would get their 'bid' back. This
whole process is then quite open and transparent, and if users see
that a task it close to reaching the desired cost, they might be more
inclined to put forward that final bid to get it started!
This suggestion still doesn't really address the issue of an initial
estimate, but perhaps the initial estimate cost could be shouldered by
the original nominating group/user?

Just a thought,

Carson

On Sat, Jun 18, 2011 at 1:53 PM, Ramon Andinach  wrote:
> Hello all (developers and non-developers both),
> Consider this a reaction to "have you considered sponsoring development". 
> From a non-developer. Who is still trying to understand how the sponsoring 
> development idea works.
>
> It is likely to be a bit long. If you have time, I'd appreciate it if you 
> could read and comment on the long version. If not, this is a short version:
> 1. For me it would be easier to sponsor development, if I knew what it would 
> cost.
> 2. Numbers of people are asking for the same features, and numbers of people 
> are saying they're small and can't afford development.
>
> I've had a bit of a conversation with Paolo, and now realise that 1. is a 
> chicken and egg situation, and hence awkward, but 2. could be helped by 
> making groups of people who want a feature to sponsor it.
>
> So I'm wondering, from those who've had experience;
> a.) how does one get around, the "I'd like a cost estimate but the cost 
> estimate takes time and about half the work" problem?
> b.) has anyone tried putting groups of sponsors together? If so, how did it 
> go?
>
>
>
>
> 
> This is the long version.
> It's mostly what I'd been through with Paolo, but expanded a bit more so my 
> thought process is (hopefully) a bit clearer.[*]
>
> I'm attached to one of the many small companies that make use of QGIS. I had 
> thought that it would be good to provide support to QGIS, and I had been 
> thinking in the form of sponsoring development to go after either a few 
> annoying bugs or one or two features that I'd like. While I was thinking 
> about this a few thoughts occurred.
> 1. For me, and I suspect many others, it would be very useful to be able to 
> go my boss and say, "I'd like us to support QGIS develop , 
> and it will cost this much." ie, have a good estimate.[!]
> 2. I'm also noticing;
>  a. a number of features have been requested by a number of different people. 
> A good example of this is multi-column legends in the composer.[@]
>  b. a number of different people have (essentially) said, "we're really small 
> and can't afford to sponsor development."
>
> I remember reading on one of the QGIS lists that many feature developments 
> were not as expensive as most people thought, I recall €2-300 being 
> mentioned.[#]
>
> Somehow I've put these together and bits together and realised that if there 
> were 10 users who wanted  then suddenly they only need to 
> provide €20-30, which is much more manageable.
>
> I've asked Paolo for some thoughts and Paolo pointed out that:
> 3. There have previously been problems with payment after the development was 
> done, and
> 4. To get a really good estimate, this often costs about half the total cost 
> of the project so they may unwilling to work through to that point with out 
> some certainty of payment.
>
> 
> So from my non-developer stand point this makes 1. and 4. a problem. But for 
> the purposes of going forward, there are two ways of short-circuiting this 
> that might work:
> 5. Developer takes initiative - to attract development, features wanting 
> sponsorship get worked to a point where an estimate of total cost can be 
> made. (Probably not viable - see [%])
> 6. Users take initiative - For the purposes of getting a group of sponsors 
> running, start with an assumed cost, which can be refined later.
>
>
> So, from the User Initiativ

Re: [Qgis-developer] Centroid and centroid fill

2011-10-20 Thread Carson Farmer
Hi Paolo,
> I just noticed that the centroid, as calculated by fTools, is not in the
> same location as the centroid shown by the centroid fill. The difference is
> easily explained in the case of multipolygons, much less obvious in case of
> a compact single poligon.
IIRC, the centroid as returned by fTools is based on the GEOS centroid
calculation, whose documentation states:
Based on the usual algorithm for calculating the centroid as a
weighted sum of the centroids of a decomposition of the area into
(possibly overlapping) triangles. The algorithm has been extended to
handle holes and multi-polygons. See
http://www.faqs.org/faqs/graphics/algorithms-faq/ for further details
of the basic approach.

Not sure how the centroid fill centroid is calculated, but obviously
not the same?

Carson

-- 
Carson J. Q. Farmer
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Fail to load Rmanage plugin

2011-11-25 Thread Carson Farmer
Hi Otto,

I think Joona's directions should get you going... I suspect that the
packged version of R for OpenSUSE isn't built with the
--enable-R-shlib flag, so it can't be used as a shared library.
Building from source should sort this out. If not, please do let me
know, and hopefully we can try to figure out something else.

Carson

On Fri, Nov 25, 2011 at 8:47 AM, Joona Lehtomäki
 wrote:
> Hi Otto,
>
> While not exactly the same, your problem sounds related to problems I've had
> with rpy2, QGIS and ManageR on openSUSE 11.4 64-bit.
>
> At least at some point libRlapack.so shipping with R-base RPM for openSUSE
> 11.4 (and at least 11.2 and 11.3 before that) was built with incompatible
> version of libgfortran. I managed to find the details once, but didn't find
> them again, sorry.
>
> I got everything working on openSUSE 11.4 (64 bit), but this required
> building R from source. You can try the following (or at least steps 2 and 3
> if rpy2 just doesn't find your libR):
>
> 1. build R (2.14.0) from sources with --prefix=/usr and --enable-R-shlib and
> flags
>
> 2. try "from rpy2 import robjects". If you get an import error with "libR.so
> not found", add a file R-x86_64.conf into /etc/ld.so.conf with a single
> line:
>
> /usr/lib64/R/lib (or where ever your libR is located)
>
> 3. run ldconfig as root
>
> 4. Install rpy2 (2.2.4) with pip (or easy_install)
>
> Hope this helps,
>
> Joona
>
> On 25.11.2011 10:21, Otto Dassau wrote:
>>
>> Hi Carson,
>>
>> I would like to get your RManage plugin working but after loading rpy2 it
>> fails to load the rpy2.robjects module. Maybe you have a quick help for
>> me,
>> how to solve this?
>>
>> I work on opensuse 11.4 64bit with python 2.7, qgis 1.7.2 and R 2.14.0.
>>
> import rpy2.robjects as robjects
>>
>> Traceback (most recent call last):
>>   File "", line 1, in
>>   File "/usr/lib64/python2.7/site-packages/rpy2/robjects/__init__.py",
>> line
>> 14, in  import rpy2.rinterface as rinterface
>>   File "/usr/lib64/python2.7/site-packages/rpy2/rinterface/__init__.py",
>> line 75, in  from rpy2.rinterface.rinterface import *
>> ImportError: libR.so: cannot open shared object file: No such file or
>> directory
>>
>> Thanks a lot
>> Otto
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Robert Farmer
Haldon Construction Ltd.
[o]    250 652 8608
[m]   250 686 8933
[f]     250 652 8619
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] import proprietary code inside a python plugin

2012-03-26 Thread Carson Farmer
Keep in mind it is only a problem if you plan on distributing your
plugin... if it is just for internal use then I wouldn't worry about
it :-p

C

On Mon, Mar 26, 2012 at 11:45 AM, G. Allegri  wrote:
> I had to create a python plugin to obatin some interactions with the ESRI
> ArcGIS Geoprocessing python framework. To do that, I need to import ESRI's
> libraries in my plugin, which are clearly not GLP'd :)
> Following a previous thread on this topic, I wonder if it's legal from the
> side of QGis (obviously it is ok from the ArcGIS's side having a licence for
> it).
>
> giovanni
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Dr. Carson J. Q. Farmer
Centre for GeoInformatics (CGI)
School of Geography and Geosciences
Irvine Building, University of St Andrews
St Andrews, Fife, KY16 9AL
Scotland, UK
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Re: import proprietary code inside a python plugin

2012-03-27 Thread Carson Farmer
Apologies for the messy email, I'm on the bus :-p But see below:

> 2012/3/27 Giovanni Manghi 
>>
>> On Tue, 2012-03-27 at 09:51 +0200, G. Allegri wrote:
>> > Ops. How QGis can use GDAL which uses ECW?!
>>
>> > 3 - osgeo4w bundles gdal-ecw DLL
>>
>> I think there are no erdas libraries in the gdal-ecw package, it is just
>> a "bridge" (sorry if it is not the right term) between gdal and the
>> erdas libraries that the user must get and copy manually in his system.
>>
>> cheers
>
>
> Exactly, the same would happen with an LGPL bridge to ArcPy ;)
>
> *Forget Qgis for a moment*
> I create an LGPL library on top of arcpy. Stop
>
> Then, I release a GPL plugin for QGis that can import and use the above
LGPL library.
> QGis + GPL imports an LGPL library and ONLY USE ITS CODE. The GPL doesn't
import arcpy, nor use any proprietary code.

I think the question you have to ask here is this: does your plugin require
arcpy to function properly (whether via a bridge or not)? If it doesn't
work without it, then its a derivative work*... and since it obviously
doesn't work without pyqgis, which is gpl, it can't legally be released as
is.

Carson

* I'm not a lawyer, so take what I say with a grain of salt... blah blah...
>
> giovanni
>
>
>>
>> -- Giovanni --
>>
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] 'reload' a layer

2012-05-16 Thread Carson Farmer
Hi list, does anyone know of a clever way to (programmatically) reload
a layer without actually removing it and re-adding it to the layer
list. Some context: I have a layer that sometimes gets updated by an
external application, and I want to be able to 'refresh' the layer
from the Python console to reflect these changes (new features,
deleted features, new attributes, etc.). I *could* simply load the
layer again, but I'm hoping there is a more efficient way to do this
(also I want to keep the current styling, layer order, unique layer
id, etc).

Any thoughts/ideas? Note: assume we are working with a spatialite layer for now.

Carson

-- 
Dr. Carson J. Q. Farmer
Centre for GeoInformatics (CGI)
School of Geography and Geosciences
Irvine Building, University of St Andrews
St Andrews, Fife, KY16 9AL
Scotland, UK
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] 'reload' a layer

2012-05-17 Thread Carson Farmer
Hi Giovanni,

Thanks for the tip. To answer your question: I am trying to
synchronise the layer with the datasource. Having said that, I don't
seem to be able to get 'reload' to work. It looks like reload is
reimplemented in QgsVectorLayer, which in turns calls the
dataProvider's reloadData method, so this may vary by provider type? I
tried it with a shapefile and a spatialite layer, and it did not seem
to do anything: I deleted several fields from the shapefile and added
a field to the spatialite layer in an external program, and these
changes were not reflected when I 'reloaded' the layers. Am I missing
something here? Perhaps there is something else needed to get the
changes to 'show up'?

Cheers,

Carson

On Wed, May 16, 2012 at 4:36 PM, G. Allegri  wrote:
> Do you mean refresh the rendering or synchronizing the layer with the data
> source?
> I usually use QgsMapLayer::reload() for the latter, and
> QgsMapCanvas::refresh() for the first.
>
> giovanni
>
> 2012/5/16 Carson Farmer 
>>
>> Hi list, does anyone know of a clever way to (programmatically) reload
>> a layer without actually removing it and re-adding it to the layer
>> list. Some context: I have a layer that sometimes gets updated by an
>> external application, and I want to be able to 'refresh' the layer
>> from the Python console to reflect these changes (new features,
>> deleted features, new attributes, etc.). I *could* simply load the
>> layer again, but I'm hoping there is a more efficient way to do this
>> (also I want to keep the current styling, layer order, unique layer
>> id, etc).
>>
>> Any thoughts/ideas? Note: assume we are working with a spatialite layer
>> for now.
>>
>> Carson
>>
>> --
>> Dr. Carson J. Q. Farmer
>> Centre for GeoInformatics (CGI)
>> School of Geography and Geosciences
>> Irvine Building, University of St Andrews
>> St Andrews, Fife, KY16 9AL
>> Scotland, UK
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Dr. Carson J. Q. Farmer
Centre for GeoInformatics (CGI)
School of Geography and Geosciences
Irvine Building, University of St Andrews
St Andrews, Fife, KY16 9AL
Scotland, UK
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Vector Layer Generalization

2012-05-25 Thread Carson Farmer
Excellent! Topology preserving simplification is something I've been
looking for!
> But I want to ask your advice on one thing. Is it normal for user
> to simplify all the features on a layer at once? I'm just not sure
> which way is more suitable for a regular user:
> - simplify all the features at once as it is now in my current prototype;
> - simplify selected feature and all the corresponding vertexes of
> the neighboring features;
> - or simplify only selected features;
> - or even something else.
> Although it is not very important for current work, I want to make sure
> I don't implement useless functionality.
Personally, I normally simplify an entire layer at once... for mapping
purposes, or simply to reduce drawing time or for computational/space
efficiency. It might be nice to also have the option to simplify
selected features only, but if this was an option, then I would expect
*only* those selected features to be simplified... and *not* their
neighbouring features...

That's my two cents anyway, looking forward to trying it out!

Carson


-- 
Dr. Carson J. Q. Farmer
Centre for GeoInformatics (CGI)
School of Geography and Geosciences
Irvine Building, University of St Andrews
St Andrews, Fife, KY16 9AL
Scotland, UK
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools version masking

2012-06-07 Thread Carson Farmer
Hi Alex et al.,

The version of fTools that is in my repository has not been updated in
some time. In fact, it is likely that the core version should have its
version number updated, as it is much more up-to-date than the one in
my repo. Unfortunately, I am unable to work on fTools these days, so
would hope that one of the devs could updated the core fTools plugin
version number to 0.6.2, or perhaps even just keep the version number
up-to-date with the current QGIS version number.
In short: Forget the version in my repo, it is only there for
posterity sake, the only relevant version is the one in core, and its
version number should likely reflect this.

@Alex: Apologies if I have ignored your past emails, this past year
has been a hectic one for me, and I haven't been keeping up with QGIS
business much :-(


Carson

On Thu, Jun 7, 2012 at 12:41 PM, Alexander Bruy
 wrote:
> Hi Larry,
>
> this is because some time ago, when QGIS has version around 0.11,
> fTools was not core plugin, but 3rd part one. Later, it was accepted to
> core, but also remain available in Carson's repo. Now all development
> on fTools is done in master.
>
> AFAIK, fTools bundled with QGIS has correct version, but in repository
> we have an old version which have same number (0.6.1). I ask Carson
> several times about fTools version from his repo but unfortunately get
> no response.
>
> 2012/6/7 Larry Shaffer :
>> While attempting to fix issues with menu ordering, I noticed the new
>> version of fTools in master branch has same version as the one that
>> users may have installed recently: 0.6.1.
>>
>> The version for fTools in master branch should be incremented, so that
>> the 'older plugin is masking new plugin' dialog can be shown to users
>> who install QGIS 1.8.
>>
>> The new 0.6.1 plugin checks hasattr(self.iface,
>> "addPluginToVectorMenu") but the old 0.6.1 does not, and just adds the
>> menu. If there are other vector plugins using the new Vector category,
>> two Vector menus may be shown.
>>
>> Regards,
>>
>> Larry Shaffer
>> Dakota Cartography
>> Black Hills, South Dakota
>
>
> --
> Alexander Bruy
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
Dr. Carson J. Q. Farmer
Centre for GeoInformatics (CGI)
School of Geography and Geosciences
Irvine Building, University of St Andrews
St Andrews, Fife, KY16 9AL
Scotland, UK
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] fTools version masking

2012-06-07 Thread Carson Farmer
>> The version of fTools that is in my repository has not been updated in
>> some time. In fact, it is likely that the core version should have its
>> version number updated, as it is much more up-to-date than the one in
>> my repo. Unfortunately, I am unable to work on fTools these days, so
>> would hope that one of the devs could updated the core fTools plugin
>> version number to 0.6.2, or perhaps even just keep the version number
>> up-to-date with the current QGIS version number.
> Ok, I just set fTools version to 0.6.2 in QGIS master.
Great, thanks Alex!

Cheers,

Carson

-- 
Dr. Carson J. Q. Farmer
Centre for GeoInformatics (CGI)
School of Geography and Geosciences
Irvine Building, University of St Andrews
St Andrews, Fife, KY16 9AL
Scotland, UK
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer