Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-users] Label Priority

Thanks Jody,

Just to clarify, the extensions parameters do work, but if I close a project and open it up again, my style doesn't work anymore. I have to manually copy/paste the styles back into each layer each time I close/open a project. Is that expected behavior?

Jody Garnett wrote:
I do not think there are any issues; just that the validation checker
is checking against the exact SLD standard (rather than these vendor
specific extensions).

Jody

On Thu, May 7, 2009 at 3:34 AM, Rorie Overby <roverby@xxxxxxxxxxxxx> wrote:
Thanks Ugo,

I tried adding a Priority expression to prioritize city labels by POPULATION
as follows:
                      <sld:Priority>
                          <ogc:PropertyName>POPULATION</ogc:PropertyName>
                      </sld:Priority>

and it works, but it does not pass the validation test:
     (line 123, column 39)cvc-complex-type.2.4.d: Invalid content was found
starting with element 'sld:Priority'. No child element is expected at this
point.

And, after applying the style and closing the style editor, I go back to
make more edits to the xml and the above lines are changed to this:
                     <sld:Priority>
                          <sld:PropertyName>
                              <ogc:PropertyName/>
                          </sld:PropertyName>
                      </sld:Priority>

Do you see any issues with the SLD I'm using?

Ugo Taddei wrote:
Hello Rorie,

Rorie Overby wrote:
Does anyone know how uDig determines label priority? I've tried to use
multiple rules in the sld xml, first rule to draw larger cities, second to
draw smaller ones, but uDig seems to prioritize the smaller cities
regardless of the order of the rules. I've also tried using two layers, but
the smaller cities are still drawn over the larger ones, even when the
smaller cities layer is below the larger cities.
I think udig has its own label painter (with its own intelligence), and
might be messing around with your style. But that's just a thought. Another
thought is: sld is very complex, so your style might not be correct...

Anyway, you want to have a look at

http://geoserver.org/display/GEOSDOC/LabelingOptions

which has wonderful examples for what you're trying to do. I think it's
mainly about vendor options, but the code is in geotools (thus in udig), so
you should be able to profit from it. (Matter of fact, I've used vendor
options writing designing my own styles with udig.)

Another question I have regarding label priority is if there is any way
to define the label order by a layer's attributes, like (order by
'POPULATION' desc)?

Thanks in advance,

rorie
Cheers,

Ugo
_______________________________________________
udig-users mailing list
udig-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.refractions.net/mailman/listinfo/udig-users




Back to the top