[pal-developer] RE: pal-developer Digest, Vol 4, Issue 3

Vianney Dugrain Vianney.Dugrain at nateko.lu.se
Mon Jul 12 07:47:40 EDT 2010


Hi Maxence,

According to my supervisors, I am using an old version of PAL: the dll I am using are issued from the tags 0.1. But I am not familiar with that format. Do you know a way to update these dll files?

Thank you!
Cheers,
Vianney
________________________________________
From: pal-developer-bounces at lists.osgeo.org [pal-developer-bounces at lists.osgeo.org] On Behalf Of pal-developer-request at lists.osgeo.org [pal-developer-request at lists.osgeo.org]
Sent: 09 July 2010 18:00
To: pal-developer at lists.osgeo.org
Subject: pal-developer Digest, Vol 4, Issue 3

Send pal-developer mailing list submissions to
        pal-developer at lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.osgeo.org/mailman/listinfo/pal-developer
or, via email, send a message with subject or body 'help' to
        pal-developer-request at lists.osgeo.org

You can reach the person managing the list at
        pal-developer-owner at lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of pal-developer digest..."


Today's Topics:

   1. Some optimizations and bug corrections (Marc-Antoine Nussli)
   2. Re: Some optimizations and bug corrections (Maxence Laurent)
   3. displayAll (Vianney Dugrain)
   4. Re: displayAll (Maxence Laurent)


----------------------------------------------------------------------

Message: 1
Date: Thu, 08 Jul 2010 18:42:46 +0200
From: Marc-Antoine Nussli <marc-antoine.nuessli at euratlas.com>
Subject: [pal-developer] Some optimizations and bug corrections
To: pal-developer at lists.osgeo.org
Message-ID: <4C360006.2030308 at euratlas.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi PAL folks,

I've used PAL for one project last year. Thus, I had the opportunity to
make some little corrections and optimizations which bring big
improvements for the computation time of polygons labeling.

So, here is a patch to include these modifications as well as some
explanations of the various changes made.
Maxence will surely integrate all, or a part, of the changes in the
development version of PAL but you can use the patch in the meantime.

Here are the explanations of the changes:
-Use 'const GEOSGeometry' and 'const PalGeometry' instead of non-const
ones. This allows to use in more general context where you don't
necessarly have access to non-const Geometry.

-In function extractXYCoord (Util.cpp), possible bugfix to avoid
removing the last point of a polygon which should always be equal to the
first point. At least, this(last point=first point) is something which
seems to be assumed in other functions doing geometrical computations on
polygons.

-In fucntion splitGeom (Util.cpp), added a compiler option to skip
butterflying detection. This is a quite long operation on big polygons
and it can be avoided if we know that the polygons are valid. More
generally, it may be interesting to have some way to specify whether pal
can trust the input geometries and thus avoid useless tests/corrections.

-In LabelPosition::setCostFromPolygon (labelposition.cpp), simple
changes making very big differences... Coordinates where fetched
multiple times for each features without any reason...

-In Pal::getLayer (Pal.cpp) removed an exception thrown when the layer
was inexisting. Seemed not very usefull to me to have an exception here.
Moreover, with the NULL value, we can use this to check if some layer
exists or not...

Best regards

ma

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pal-nuessli-branch-07-07-10-general-changes.patch
Type: text/x-patch
Size: 10719 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/pal-developer/attachments/20100708/c5c06d52/pal-nuessli-branch-07-07-10-general-changes-0001.bin

------------------------------

Message: 2
Date: Fri, 9 Jul 2010 09:03:46 +0200
From: Maxence Laurent <maxence.laurent at heig-vd.ch>
Subject: Re: [pal-developer] Some optimizations and bug corrections
To: pal-developer at lists.osgeo.org
Message-ID: <4C36C9D2.6020209 at heig-vd.ch>
Content-Type: text/plain; charset="ISO-8859-1"

Thanks for your work, Marc-Antoine,

Patch applied in revision 118 of the trunk.

@vianney are you using the trunk or the pal-0.2 tags ? You should switch
to the trunk version in the latter case.

cheers
maxence

On 08/07/10 18:42, Marc-Antoine Nussli wrote:
> Hi PAL folks,
>
> I've used PAL for one project last year. Thus, I had the opportunity to
> make some little corrections and optimizations which bring big
> improvements for the computation time of polygons labeling.
>
> So, here is a patch to include these modifications as well as some
> explanations of the various changes made.
> Maxence will surely integrate all, or a part, of the changes in the
> development version of PAL but you can use the patch in the meantime.
>
> Here are the explanations of the changes:
> -Use 'const GEOSGeometry' and 'const PalGeometry' instead of non-const
> ones. This allows to use in more general context where you don't
> necessarly have access to non-const Geometry.
>
> -In function extractXYCoord (Util.cpp), possible bugfix to avoid
> removing the last point of a polygon which should always be equal to the
> first point. At least, this(last point=first point) is something which
> seems to be assumed in other functions doing geometrical computations on
> polygons.
>
> -In fucntion splitGeom (Util.cpp), added a compiler option to skip
> butterflying detection. This is a quite long operation on big polygons
> and it can be avoided if we know that the polygons are valid. More
> generally, it may be interesting to have some way to specify whether pal
> can trust the input geometries and thus avoid useless tests/corrections.
>
> -In LabelPosition::setCostFromPolygon (labelposition.cpp), simple
> changes making very big differences... Coordinates where fetched
> multiple times for each features without any reason...
>
> -In Pal::getLayer (Pal.cpp) removed an exception thrown when the layer
> was inexisting. Seemed not very usefull to me to have an exception here.
> Moreover, with the NULL value, we can use this to check if some layer
> exists or not...
>
> Best regards
>
> ma
>



------------------------------

Message: 3
Date: Fri, 9 Jul 2010 16:00:28 +0200
From: Vianney Dugrain <Vianney.Dugrain at nateko.lu.se>
Subject: [pal-developer] displayAll
To: "pal-developer at lists.osgeo.org" <pal-developer at lists.osgeo.org>
Message-ID:
        <1AE83D2C4D186C4A88F447CA64120D80ED4B546E97 at UWEXMBX01.uw.lu.se>
Content-Type: text/plain; charset="us-ascii"

Hi!

Thank you for your answers, I hope that my numerous questions does not trouble you. I have a last one before the WE:
If the boolean displayAll used as parameter in the function labeller() is set to False, does it mean that labels overlapping with any kind of other item is removed, or only labels which overlap each other?
In my example, the labels overlapping with obstacle layers are displayed, even when the boolean is set to false. Is it normal?

Regards!
Vianney

------------------------------

Message: 4
Date: Fri, 9 Jul 2010 16:21:22 +0200
From: Maxence Laurent <maxence.laurent at heig-vd.ch>
Subject: Re: [pal-developer] displayAll
To: pal-developer at lists.osgeo.org
Message-ID: <4C373062.9090203 at heig-vd.ch>
Content-Type: text/plain; charset="ISO-8859-1"

Hello,

"displayAll=true" indicates we want to label each features, even if
overlaps occur between labels
"displayAll=false" indicates that labels overlapping  are forbidden

There is no way to forbid putting a label over obstacles.
A obstacle layer just define locations where we want to avoid putting a
label on: it's a wish and not a strict rule.

cheers

On 09/07/10 16:00, Vianney Dugrain wrote:
> Hi!
>
> Thank you for your answers, I hope that my numerous questions does not trouble you. I have a last one before the WE:
> If the boolean displayAll used as parameter in the function labeller() is set to False, does it mean that labels overlapping with any kind of other item is removed, or only labels which overlap each other?
> In my example, the labels overlapping with obstacle layers are displayed, even when the boolean is set to false. Is it normal?
>
> Regards!
> Vianney_______________________________________________
> pal-developer mailing list
> pal-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pal-developer
>
>



------------------------------

_______________________________________________
pal-developer mailing list
pal-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pal-developer


End of pal-developer Digest, Vol 4, Issue 3
*******************************************


More information about the pal-developer mailing list