Re: [Qgis-developer] QGIS MapServer and jQuery OpenLayer Client for Mobile Devices

2011-06-15 Thread Noli Sicad
Pirmin.

Thanks a lot.

~~
var wms = new OpenLayers.Layer.WMS(
  "WMS",
  "http://localhost/cgi-bin/qgis_mapserv.fcgi";,
  {
  'map': '/usr/local/share/qgis/QGIS-NaturalEarth-Example.qgs',
  'layers':'HYP_50M_SR_W,10m_lakes,10m_rivers_lake_centerline'} );
map.addLayer(wms);
~~

I hope we can have 1 live QGIS Mapserver running even just to serve
the above example.

Probably we can ask OSGeo to sponsor WMS QGIS Mapserver running in
OSGeo host network.

Thanks.

Noli





On 6/15/11, Pirmin Kalberer  wrote:
> Noli,
>
> Here is an example of using OpenLayers with QGIS server:
>
> http://live.osgeo.org/en/quickstart/openlayers_quickstart.html
>
> Pirmin
>
> Am Mittwoch, 15. Juni 2011, um 03.10:36 schrieb Noli Sicad:
>> Hi Pimin,
>>
>> Yes, I have been working on it and I heavily modified even to support
>> Spatialite query and it is running in Xcode (i.e compile in Xcode iOS
>> 4.2 to run local spatialite). I got the spatialite Geometry using
>> AsText / WKT but not display the WKT in OL yet.
>>
>> I got all the base maps in it i.e. Cloudmade, Google, Bing, Yahoo,
>> Mapbox, ArcGISRest + the Edit (navigate, point, lines, polygons,
>> modify, drag).
>>
>> Now,  Just lacking the QGIS Mapserver side as server:-).
>>
>> Noli
>>
>> On 6/15/11, Pirmin Kalberer  wrote:
>> > Hi Noli
>> >
>> > Look at http://openlayers.org/dev/examples/mobile-jq.html
>> >
>> > Regards
>> > Pirmin
>> >
>> > Am Mittwoch, 15. Juni 2011, 00.58:41 schrieb Noli Sicad:
>> >> Hi,
>> >>
>> >> The current QGIS  webclient is for PC (i.e. desktop, laptop, netbook).
>> >> I understand it is built using ExtJS, Geoexplorer hack.
>> >>
>> >> http://projects.opengeo.org/geoext/wiki/GeoExplorer
>> >> http://blog.opengeo.org/2009/06/17/geoexplorer-preview/
>> >> http://suite.opengeo.org/geoexplorer/composer
>> >>
>> >> I like to use QGIS Mapserver as server for Mobile Devices (i.e. iPad,
>> >> Android tablet, Meego tablet, HP WebOS tablet, etc) using jQuery, not
>> >> ExtJS (Sencha Touch) since I need local Spatialite support for these
>> >> devices.
>> >>
>> >> Again, I like to use jQuery instead of ExtJS as webclient for QGIS
>> >> Mapser.
>> >>
>> >> Now, how can I utilise QGIS Mapserver for these mobile webclients?
>> >>
>> >> Andreas, what would be the right access to WMS layer in QGIS Mapserver
>> >> (WMS)?
>> >>
>> >> ~~~
>> >> var base = new OpenLayers.Layer.WMS(
>> >>
>> >> "Medford Streets & Buildings",
>> >> "/geoserver/wms",
>> >> {layers: "medford"}
>> >>
>> >> 
>> >>
>> >> http://workshops.opengeo.org/openlayers-intro/vector/style.html
>> >>
>> >> Generic
>> >> 
>> >> map = new OpenLayers.Map('map');
>> >>
>> >> var wms = new OpenLayers.Layer.WMS(
>> >> "OpenLayers WMS",
>> >> "http://labs.metacarta.com/wms/vmap0";,
>> >>
>> >> {layers: 'basic,ground_01'}
>> >>
>> >> );
>> >>
>> >> 
>> >> http://vasir.net/blog/openlayers/openlayers-tutorial-part-2-layers/
>> >>
>> >> For example, this ZonePlan layer in http://gis.uster.ch/webgis/?
>> >>
>> >> http://gis.uster.ch/webgis/production/index.shtml?map=/home/www/projekte
>> >> /ra
>> >> umplanung/raumplanung.qgs&format=image/jpeg&visibleLayers=Gestaltungspl
>> >> %C3%
>> >> A4ne%20Beschriftung,Gemeindegrenze,Sondernutzungen,Sondernutzungen%20Ba
>> >> uzon
>> >> en%20mit%20Gestaltungsplanpflicht,Differenzierte%20L%C3%A4rmempfindlich
>> >> keit sstufe,Nutzungszonen,UEP%20%282009%29
>> >>
>> >> I just like to know the WMS layers, not the windowing ExtJS toolkit to
>> >> render the whole thing.
>> >>
>> >> Thanks.
>> >>
>> >> Noli
>> >> ___
>> >> Qgis-developer mailing list
>> >> Qgis-developer@lists.osgeo.org
>> >> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> >
>> > --
>> > Pirmin Kalberer
>> > Sourcepole  -  Linux & Open Source Solutions
>> > http://www.sourcepole.com
>
>
> --
> Pirmin Kalberer
> Sourcepole  -  Linux & Open Source Solutions
> http://www.sourcepole.com
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QGIS MapServer and jQuery OpenLayer Client for Mobile Devices

2011-06-15 Thread Pirmin Kalberer
Noli,

Here is an example of using OpenLayers with QGIS server:

http://live.osgeo.org/en/quickstart/openlayers_quickstart.html

Pirmin

Am Mittwoch, 15. Juni 2011, um 03.10:36 schrieb Noli Sicad:
> Hi Pimin,
> 
> Yes, I have been working on it and I heavily modified even to support
> Spatialite query and it is running in Xcode (i.e compile in Xcode iOS
> 4.2 to run local spatialite). I got the spatialite Geometry using
> AsText / WKT but not display the WKT in OL yet.
> 
> I got all the base maps in it i.e. Cloudmade, Google, Bing, Yahoo,
> Mapbox, ArcGISRest + the Edit (navigate, point, lines, polygons,
> modify, drag).
> 
> Now,  Just lacking the QGIS Mapserver side as server:-).
> 
> Noli
> 
> On 6/15/11, Pirmin Kalberer  wrote:
> > Hi Noli
> > 
> > Look at http://openlayers.org/dev/examples/mobile-jq.html
> > 
> > Regards
> > Pirmin
> > 
> > Am Mittwoch, 15. Juni 2011, 00.58:41 schrieb Noli Sicad:
> >> Hi,
> >> 
> >> The current QGIS  webclient is for PC (i.e. desktop, laptop, netbook).
> >> I understand it is built using ExtJS, Geoexplorer hack.
> >> 
> >> http://projects.opengeo.org/geoext/wiki/GeoExplorer
> >> http://blog.opengeo.org/2009/06/17/geoexplorer-preview/
> >> http://suite.opengeo.org/geoexplorer/composer
> >> 
> >> I like to use QGIS Mapserver as server for Mobile Devices (i.e. iPad,
> >> Android tablet, Meego tablet, HP WebOS tablet, etc) using jQuery, not
> >> ExtJS (Sencha Touch) since I need local Spatialite support for these
> >> devices.
> >> 
> >> Again, I like to use jQuery instead of ExtJS as webclient for QGIS
> >> Mapser.
> >> 
> >> Now, how can I utilise QGIS Mapserver for these mobile webclients?
> >> 
> >> Andreas, what would be the right access to WMS layer in QGIS Mapserver
> >> (WMS)?
> >> 
> >> ~~~
> >> var base = new OpenLayers.Layer.WMS(
> >> 
> >> "Medford Streets & Buildings",
> >> "/geoserver/wms",
> >> {layers: "medford"}
> >> 
> >> 
> >> 
> >> http://workshops.opengeo.org/openlayers-intro/vector/style.html
> >> 
> >> Generic
> >> 
> >> map = new OpenLayers.Map('map');
> >> 
> >> var wms = new OpenLayers.Layer.WMS(
> >> "OpenLayers WMS",
> >> "http://labs.metacarta.com/wms/vmap0";,
> >> 
> >> {layers: 'basic,ground_01'}
> >> 
> >> );
> >> 
> >> 
> >> http://vasir.net/blog/openlayers/openlayers-tutorial-part-2-layers/
> >> 
> >> For example, this ZonePlan layer in http://gis.uster.ch/webgis/?
> >> 
> >> http://gis.uster.ch/webgis/production/index.shtml?map=/home/www/projekte
> >> /ra
> >> umplanung/raumplanung.qgs&format=image/jpeg&visibleLayers=Gestaltungspl
> >> %C3%
> >> A4ne%20Beschriftung,Gemeindegrenze,Sondernutzungen,Sondernutzungen%20Ba
> >> uzon
> >> en%20mit%20Gestaltungsplanpflicht,Differenzierte%20L%C3%A4rmempfindlich
> >> keit sstufe,Nutzungszonen,UEP%20%282009%29
> >> 
> >> I just like to know the WMS layers, not the windowing ExtJS toolkit to
> >> render the whole thing.
> >> 
> >> Thanks.
> >> 
> >> Noli
> >> ___
> >> Qgis-developer mailing list
> >> Qgis-developer@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > 
> > --
> > Pirmin Kalberer
> > Sourcepole  -  Linux & Open Source Solutions
> > http://www.sourcepole.com


-- 
Pirmin Kalberer
Sourcepole  -  Linux & Open Source Solutions
http://www.sourcepole.com
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Annoying bug found in QGIS 1.7 (not present in 1.6)

2011-06-15 Thread luca_manganelli

Hi,

I wrote a PYTHON plugin that does a simple feature select on a
QgsVectorLayer:

  pnt = 
  myLayer= 
  tolerance = 1
  rectangle = QgsRectangle()
  rectangle.setXMinimum (pnt.x() - tolerance)
  rectangle.setXMaximum (pnt.x() + tolerance)
  rectangle.setYMinimum (pnt.y() - tolerance)
  rectangle.setYMaximum (pnt.y() + tolerance)
  myLayer.select(rectangle , True)

in QGIS 1.6 this code works with both shapefiles and postgis layers,
in QGIS 1.7 it works ONLY in postgis layers, on shapefile layers it always
returns 0 features.___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] qgis-mapserver: user authentication

2011-06-15 Thread Pirmin Kalberer
Paolo,

My quick comments...

Am Mittwoch, 15. Juni 2011, um 09.17:11 schrieb Paolo Cavallini:
> My first, *very* quick, review:
> 
> Il giorno mar, 14/06/2011 alle 23.07 +0200, Pirmin Kalberer ha scritto:
> > I don't think that authentication should be built into a WMS server.
> > There are many solutions around, doing authentication and authorisation
> > transparently on top of a WMS server:
> > * http://52north.org/communities/security/index.html
> 
> java :(

Most of security stuff is in Java :-(
Swisstopo plans to use 52north for securing their OGC services.

> 
> > * http://geoprisma.org/site/index.php
> 
> Could not (yet) find any major issues.

Belongs to the UMN MapServer "project stack".
FOSS4G presentation in Denver:
http://2011.foss4g.org/sessions/mapserver-project-stack

> 
> > * https://sites.google.com/site/geoshieldproject/home
> 
> One-man show, it seems.

FOSS4G presentation in Denver:
http://qurl.org/i91

> 
> > * http://www.secureows.org/
> 
> Seems dead (no commit in the last year).

But is in production use, AFAIK.

One advantage I didn't mention is that you delegate the in-depth security 
tests to these frameworks.

Regards
Pirmin

-- 
Pirmin Kalberer
Sourcepole  -  Linux & Open Source Solutions
http://www.sourcepole.com
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Re: python plugin and layer properties window

2011-06-15 Thread Camilo Polymeris
On Thu, Jun 9, 2011 at 5:18 AM, Michael Pfeiffer
 wrote:
> Hi everybody,
>
> no hints for this problem?
> I have the same problem with the mapcomposer window.
> When closing the mapcomposer window I want to get the close signal or close
> event of the window.
> I need this because I want to switch of some things in the map canvas
> automatically which I switched on when the user clicked the "Map Button" in
> the GUI.
>

Hello,
I am not sure I understand the question correctly, but:

Do none of the provided signals work for you, like
QMainWindow::destroyed() or QgsComposerView::finished() perhaps?
Or just QDialog::finished(int) in the case of the Layer Properties dialog?

You can get a pointer to those structures through QgsAppInterface, I
think. There is the activeComposers list, and, of course, the
mainWindow pointer.

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


Re: [Qgis-developer] qgis-mapserver: user authentication

2011-06-15 Thread Niccolo Rigacci
Here it is my opinion about WMS access control (not only QGIS 
Mapserver). This is mainly to Giovanni Manghi, which has to solve 
the problem: I think you can choose between solution #1 (short 
term) and solution #3 (mid term).

Three different approaches:

1) Authentication and redirect by the web server: users with
different privileges will be redirected to different backends
(different QGIS projects, in QGIS Mapserver case). All the work
is to make different projects with different views of the data.

2) QGIS Mapserver will implement some sort of Access Control: it
will give diffferent results for the same project/query, based on
the authenticated user. This seems simple, but an alarm bell is
that no WMS server exists which do that (except for Geoserver,
but I did not investigated how).
This approach is hard: whe have a standard protocol (WMS) and we
want to add some out-of-standard features (Access Control). As
far as I understand UMN-MapServer developers have avoided this at
all, will QGIS Mapserver developers endorse it instead?
Is not so simple even to define what is access control: layer
access? Attribute access? Vector? Raster? Read/Write? All of this
will be buried intimately into the WMS code: I don't like it
very much.

3) A "proxy" approach can leave the WMS code intact: an http
proxy will receive the query, parses it, apply Access Control and
pass the (eventually modified) query to the WMS. The response
will be eventually modified (e.g. stripping data from the XML
GetCapabilities response) and passes it to the client.
The granularity of the Access Control will be very rude, because 
the WMS protocol has a rude query syntax (layer on/off, not much 
more), but proxying is the only "right" way to filter a protocol 
without rewriting it.

All the software cited by Pirim uses the third approach, as far I 
can understand.

-- 
Niccolo Rigacci
Firenze - Italy
Tel. ufficio: 055-0118525
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Ellipse renderer

2011-06-15 Thread Marco Hugentobler
> (though there must be some magic to
> add the branch to a cloned main repository).

Ok, it works like this:

git remote add mhugent git://github.com/mhugent/Quantum-GIS.git
git fetch mhugent
git checkout --track mhugent/data_defined_symbollayer


> Am Dienstag, 14. Juni 2011, 17.50:12 schrieb Marco Hugentobler:
> Sorry, my git description does not work. It works with cloning my
> repository and checking out the branch (though there must be some magic to
> add the branch to a cloned main repository).
> 
> git clone git://github.com/mhugent/Quantum-GIS.git
> cd Quantum-GIS
> git checkout --track origin/data_defined_symbollayer
> 
> Marco
> 
> Am Dienstag, 14. Juni 2011, 15.48:29 schrieb Marco Hugentobler:
> > Hi QGIS devs
> > 
> > Recently, I was writing a symbollayer to render ellipse shapes (and also
> > rectangles, triangles, crosses by specifying width and height). Moreover,
> > the symbol layer allows to set all parameters (width, height, colors,
> > rotation, outline with) from data fields, in mm or map units.
> > 
> > The code is contained in my github clone int the branch
> > 'data_defined_symbollayer'. To give it a try, you can do the following:
> > 
> > git add remote add mhugent git://github.com/mhugent/Quantum-GIS.git
> > git checkout --track mhugent/data_defined_symbollayer
> > 
> > The reason it's in a branch is that data defined rendering in symbol
> > layers needed some API changes. They are quite small:
> > 
> > - A pointer to the rendered QgsFeature* has been added to
> > QgsSymbolV2RenderContext (such that the symbollayer has the possibility
> > to check the data defined attribute values)
> > 
> > - A symbollayer has the possibility to specify which attribute fields it
> > needs for rendering (by default, QgsSymbolLayerV2::usedAttributes returns
> > an empty set).
> > 
> > - The symbollayer widgets receive a pointer to their vector layer. Normal
> > symbol layer widgets don't use it, the widgets of  data defined symbol
> > layers get the available fields through that pointer.
> > 
> > At first, I tried to achieve the data defined layer without API change by
> > creating a new subclass of  QgsFeatureRendererV2 (as discussed with
> > Martin in Lisbon. However, it turned out this approach would need a lot
> > of duplication to provide graduated / unique / rule based classification
> > and to provide a seamless  integration with the existing symbology(ng).
> > 
> > What do you think?
> > 
> > Regards,
> > Marco


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] qgis-mapserver: user authentication

2011-06-15 Thread Marco Bernasocchi

Hi all,
On 06/15/2011 09:17 AM, Paolo Cavallini wrote:

My first, *very* quick, review:

Il giorno mar, 14/06/2011 alle 23.07 +0200, Pirmin Kalberer ha scritto:

I don't think that authentication should be built into a WMS server. There are
many solutions around, doing authentication and authorisation transparently on
top of a WMS server:
* http://52north.org/communities/security/index.html

java :(


* http://geoprisma.org/site/index.php

Could not (yet) find any major issues.


* https://sites.google.com/site/geoshieldproject/home

One-man show, it seems.

and Java (Tomcat)

* http://www.secureows.org/

Seems dead (no commit in the last year).
Java also and what is with the link to a romanian online casino on their 
wiki page?

All the best.

Ciao Marco

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


Re: [Qgis-developer] qgis-mapserver: user authentication

2011-06-15 Thread Paolo Cavallini
My first, *very* quick, review:

Il giorno mar, 14/06/2011 alle 23.07 +0200, Pirmin Kalberer ha scritto: 
> I don't think that authentication should be built into a WMS server. There 
> are 
> many solutions around, doing authentication and authorisation transparently 
> on 
> top of a WMS server:
> * http://52north.org/communities/security/index.html

java :(

> * http://geoprisma.org/site/index.php

Could not (yet) find any major issues.

> * https://sites.google.com/site/geoshieldproject/home

One-man show, it seems.

> * http://www.secureows.org/

Seems dead (no commit in the last year).

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


Re: [Qgis-developer] qgis-mapserver: user authentication

2011-06-15 Thread Paolo Cavallini
Il giorno mer, 15/06/2011 alle 08.56 +0200, Marco Hugentobler ha
scritto: 
> I'm not experienced with the software listed in Pirmins mail (e.g. if 
> everything requires a Java server). If there is a lightweight component for 
> access restriction, it could be an approach to bundle it together with QGIS 
> server to make it easier for the user.

Sounds quite reasonable to me (and yes, avoiding java would be a must).
So, if there are no different opinions, let's start selecting the best
sw among those listed by Pirmin.
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