Re: [Qgis-developer] Question on inverted polygon renderer

2014-06-17 Thread Régis Haubourg
Hi Bernard, 
plugin is coming this week I think.

Bernhard Ströbl wrote
 Thinking about QGIS server: Would there be a chance to use what you 
 describe to keep labels staying away from the edge of the requested map?
 
 Bernhard

current implementation adds a In_mask(srid) expression, that can be used
anywhere in style or labeling settings. If QGIs server fill current mask
geometry with a bbox, slightly smaller than true extent, you will avoid
drawing labels to close from the edges. I'm not sure this is the best design
option, it sounds more like a hack to me.
I will let Hugo explain detailed implementation. 
Cheers
Régis



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Question-on-inverted-polygon-renderer-tp5146099p5146226.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Question on inverted polygon renderer

2014-06-17 Thread Mathieu Pellerin
Here's a quick example of what the combination of inverted polygon and
shapeburst fill can do: http://i.imgur.com/7n6rxJx.jpg

Since shapeburst fill can use map-based units, the outer glows-like
effect of polygons can be spatially relevant, i.e. in the above map, the
glow could represent a specific distance, 2km, within which a growing
impact on local population is to be expected.

Math


On Tue, Jun 17, 2014 at 4:15 AM, Nyall Dawson nyall.daw...@gmail.com
wrote:


 On 17/06/2014 6:44 am, Régis Haubourg 
 regis.haubo...@eau-adour-garonne.fr wrote:
 
  inverted style + shapeburst give crazy cool rendering!

 A quick tip if you're using shapeburst with inverted polygons - you must
 have the shade to a set distance option selected, and set a relatively
 small distance. Otherwise you'll see shading from the canvas edges (refs
 #10570, #9757).

 Mathieu Pellerin also has some nice examples of inverted shapeburst fills
 used to shade the exterior of polygons in a thematic map - i'm not sure if
 he's posted them on the flickr group yet.

 Nyall

 ___
 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

Re: [Qgis-developer] Question on inverted polygon renderer

2014-06-17 Thread Hugo Mercier
Hi,

Le 17/06/2014 09:32, Régis Haubourg a écrit :
 Hi Bernard, 
 plugin is coming this week I think.

Yes, it is already available at https://github.com/Oslandia/mask_plugin
A 1.0 version for the official qgis repository is on its way.

 
 Bernhard Ströbl wrote
 Thinking about QGIS server: Would there be a chance to use what you 
 describe to keep labels staying away from the edge of the requested map?

 Bernhard
 
 current implementation adds a In_mask(srid) expression, that can be used
 anywhere in style or labeling settings. If QGIs server fill current mask
 geometry with a bbox, slightly smaller than true extent, you will avoid
 drawing labels to close from the edges. I'm not sure this is the best design
 option, it sounds more like a hack to me.
 I will let Hugo explain detailed implementation. 

Well, I don't know exactly what is the problem with the labeling part of
the server. This label filtering feature has not been designed for such
a use-case. The current implementation of atlas with mask relies on
signals that are catched within a plugin to update the mask layer.
We could imagine something similar for the server, but I agree that
would be a hack.

The problem you have might be somehow related to how qgis clips vectors
before rendering them, as Nyall pointed out
(http://hub.qgis.org/issues/9757)

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

[Qgis-developer] untranslatable strings

2014-06-17 Thread matteo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi guys,
the Italian GUI is 100% translated but I noticed that some strings of
the GUI are still in English.

For now I found:
* Properties - Filed Tab - Edit widget. The title of the dialog
window is in English
* within the Edit widget dialog:
* Photo tab - the string the field contains a filename
   is in English
* Web tab - the string field contains a filename is in
 English

Is this issue present also for other languages?

Cheers

Matteo

-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQEcBAEBAgAGBQJToA+eAAoJEBy7UYf0gaEOwE0H/1rJxOyPINUcx4WEWS+23X0e
vXcBLeAAHiFb9unH5ME1YmTA3ntp6U084iELPbpBEEGGRBUFz0i8ajyKytSYiALN
ADGwbPXEn+E0DCviRWfcKsZHX5xSPfl94ZzJOar73+52XEZ0ewM6onCeQ+B85w0G
ENY6pdNOYF8m3nQqVgqYp1fwcI2s+34RVgZWgjESJV+dNxH8P6UBppibj36raGpo
enQCIo3pkJjVWeN9tLffBh1mqykI5PtYBO6IBCpKw1AYQTRkxnxYPwOFIvpC6nPU
CxeBw7+wNLoleNxtGkQ+L9McqAA4eA3t4CFT/i4l8qCnHF98uuumLtXE8wSKaEM=
=X3hG
-END PGP SIGNATURE-
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Question on inverted polygon renderer

2014-06-17 Thread Bernhard Ströbl

Hi Hugo,

let me explain: I use mapcache to preproduce tiles of my background 
layers rendered by QGIS server. Thus sometimes labels get cut because 
they are rendered too close to the edge of the requested map.
I was attracted by Régis Label features of layers only for objects 
intersecting the mask region and was thinking if one could use that to 
address my problem, especially if it goes into core (needs to be for 
server I reckon). There won't be a dedicated mask layer, of course, but 
I imagined server creating the mask feature otf from the bbox parameter 
of the GetMap request (minus a distance set in OWS server tab).
If you integrate this into core and there might be a chance to use it as 
I described I would be happy if you integrated it in a way that would 
allow to enhance QGIS server to use it.


Bernhard

Am 17.06.2014 10:22, schrieb Hugo Mercier:

Hi,

Le 17/06/2014 09:32, Régis Haubourg a écrit :

Hi Bernard,
plugin is coming this week I think.


Yes, it is already available at https://github.com/Oslandia/mask_plugin
A 1.0 version for the official qgis repository is on its way.



Bernhard Ströbl wrote

Thinking about QGIS server: Would there be a chance to use what you
describe to keep labels staying away from the edge of the requested map?

Bernhard


current implementation adds a In_mask(srid) expression, that can be used
anywhere in style or labeling settings. If QGIs server fill current mask
geometry with a bbox, slightly smaller than true extent, you will avoid
drawing labels to close from the edges. I'm not sure this is the best design
option, it sounds more like a hack to me.
I will let Hugo explain detailed implementation.


Well, I don't know exactly what is the problem with the labeling part of
the server. This label filtering feature has not been designed for such
a use-case. The current implementation of atlas with mask relies on
signals that are catched within a plugin to update the mask layer.
We could imagine something similar for the server, but I agree that
would be a hack.

The problem you have might be somehow related to how qgis clips vectors
before rendering them, as Nyall pointed out
(http://hub.qgis.org/issues/9757)

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




__ Information from ESET Mail Security, version of virus signature 
database 9957 (20140617) __

The message was checked by ESET Mail Security.
http://www.eset.com


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

Re: [Qgis-developer] Question on inverted polygon renderer

2014-06-17 Thread Andreas Neumann
Hi Régis,

Thank you for the explanations and for funding it!

I think it is very cool, but as it is an unusual feature it probably
needs a bit of explaining in the manual. Esp. if you combine it with the
ShapeBurst fill.

People need to understand that they are styling anything but the current
/ selected feature.

Anyway - it is a powerful addition to QGIS.

Andreas

Am 16.06.2014 20:43, schrieb Régis Haubourg:
 Hi Andreas, 
 I'm the funder, Hugo Mercier from Oslandia is the developper. It's the right
 time to do some teasing I guess ;-).
 
  The inverted polygon renderer idea appeared when writing specifications for
 an improved mask tool . We will soon release new version of mask plugin that
 allows the following:
 
 - generate a ROI layer from current polygon selection, or from another
 plugin's call.
 
 - Label features of layers only for objects intersecting the mask region
 (several spatial operators inside). Users wish that a lot to do professional
 mapping. Unwanted side effect is that labeling is a lot more readable by
 giving more affordable space to labeling engine. 
 
 - Automagically reuse current mask style to generate a mask on the fly on
 Atlas coverage feature. 
 
 inverted style + shapeburst give crazy cool rendering!
 Another positive point, instead of making a big bbox with a hole, as current
 mask plugin does, an inverted style allowed a much cleaner solution, and
 sounded a lot more reusable.  And now, it's much more clear for the user to
 be able to zoom to the layer extent and not be zoomed out far away.
 
 We were unsure about real performances of such spatial filtering, so we
 decided to start with a plugin, and share with you..  And, we found that
 filtering labels gives less work to pal engine, so the spatial intersection
 seems to be less consuming than labeling, for average layers. 
 
 Many thanks to Oslandia Team and Hugo for the hard work. We're about to
 release the plugin, Hugo will launch a thread about this, and maybe a port
 to core, if you like it.  
 
 I already see what we could do next, like label features only on the parts
 really intersecting that ROI.. 
 
 Stay tuned! 
 Régis
 
 
 
 --
 View this message in context: 
 http://osgeo-org.1560.x6.nabble.com/Question-on-inverted-polygon-renderer-tp5146099p5146162.html
 Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
 ___
 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

Re: [Qgis-developer] Question on inverted polygon renderer

2014-06-17 Thread Régis Haubourg
I just released the mask plugin version 1.0 in qgis repository. I'll be glad
to have some feedback on it.

We still need to document it, what will be done in github dedicated wiki.

Documenting inverted polygon renderer should be done in qgis main doc. How
do we proceed to add sections in it? 

Cheers, 
Régis






--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Question-on-inverted-polygon-renderer-tp5146099p5146281.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Testing/Master renders 7times slower than 2.2

2014-06-17 Thread Martin Dobias
Hi Anita

I am a bit late to join the discussion, but anyway... I cannot really
replicate the slowness you are experiencing. I can see some slowdown
which I assume is mainly related to the labeling - in 2.4 there have
been some changes that will likely slow down labeling even more - e.g.
checking of validity of polygons (due to issues with invalid polygons
from simplification) and the subsequent fixing with buffer.

For a good comparison, I would suggest to have a look where the
slowness really comes from. Apart from labeling, there could be many
more factors affecting the speed - data-defined symbology, expressions
in rule-based renderer, used symbol layers, reprojections etc.

Generally speaking, we should try to handle the performance
regressions more seriously - in the process of adding new features it
is easy to introduce something that negatively affects the rendering
speed. Radim has done some effort to build a benchmarking system for
QGIS some time ago, maybe it is time to bring it back to life and
start watching it more closely.

Btw. nice project for testing purposes. The multipolygons layer
contains a bunch of invalid geometries, it helped to find bugs in some
of the new features :-)

Regards
Martin



On Sun, Jun 1, 2014 at 7:49 PM, Anita Graser anitagra...@gmx.at wrote:
 Hi,

 I have a project with Spatialite and Shapefile layers and I found that
 it's around 7times slower to render in the current test version than
 in 2.2.

 The project is online, so you can try it yourself:
 https://drive.google.com/folderview?id=0Bwc-5JFVTnfIZkZOM3Y0Um9jOHcusp=sharing

 I've tried different rendering options including parallel rendering
 but found no way to improve the rendering speed in Testing.

 I'd love to know if it's a general problem or if I have misconfigured 
 something.

 Best wishes,
 Anita
 ___
 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] Use GEOS reentrant API (_r functions) and update requirement to GEOS = 3.1.0

2014-06-17 Thread Even Rouault
Hi,

I've submitted the following (big in terme of lines changed, but mostly 
boring) pull request https://github.com/qgis/QGIS/pull/1461 :

Currently QGIS uses the 'classic' GEOS API that uses a global context.
This can conflict with libraries that would also use the global context
and potentially finalize it whereas QGIS will still use it later.

See https://groups.google.com/forum/#!topic/spatialite-users/9YSU6c5AVQ4 for
such an example of such a recent issue with Spatialite.

The _r API is available since GEOS 3.1.0, which is already an ancient GEOS
version. For example, old-old-stable Ubuntu (Lucid 10.04) and Debian (squeeze)
ship with GEOS 3.1.0 or later.

Such move has also been done in GDAL 1.11
(http://lists.osgeo.org/pipermail/gdal-dev/2013-August/036877.html)
and MapServer 7.0 (mapserver/mapserver#4733)

There's no easy way unfortunately to check at compile time that you don't
use the non _r API. I have patched my geos_c.h header to #ifdef that API 
(quite painfull to do..). A postprocessing check can be done however with :

objdump -T output/lib/*.so | grep -v Base | grep GEOS | grep -v _r | grep -v 
_ZN | grep -v GEOSversion

It should return nothing.

To test the conditional branches on GEOS versions for advanced GEOS features, 
compile-tested by simulating GEOS 3.1.0 and GEOS 3.4.2


One thing that comes to mind is if QGIS might use GEOS concurrently from 
multiple threads. If so, then this patch will not improve (nor worsen) the 
situation with respect to potential problems that might arise from that.

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer