Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] TextSymbolizer

I have been unable to get the label displacement working as well. My SLD validates and I spent ages trying all sorts of different things without luck. I didn't follow the problem up with GeoTools (I think it's a problem in their basic renderer) because I stopped using labels anyway.

Not very helpful... just letting you know that it's not just you!

Mark

M.S.Bachler wrote:

Hi!

Thanks for the tip about setting the Label in Simple view.
It allowed me to correct my SLD text by looking at the XML it produced.

However, I have adjusted my SLD, and now it draws the label, but it is
ignoring my Displacement values.
It draws it at 0,0 displacement (over my icon).

I tried looking at the SLD in the XML section of the Style Editor and it
had the displacement as 0,0?
Q: Is the XML section not a view of the associated SLD file?

I tried adding displacement values in the XML section, and pressed
'Apply' and it went of in one of it's never-ending hour glasses and I
had to crash out again. It does this a lot, even if I just swap between
Simple and XML view!
Maybe it's my machine.

Anyway, I have attached a zip with sld and shp etc for my point layer
(otter.zip), that definitely has one point with label Fred (sorry about
last time).
I have also attached the base layer map that the otter sits on
(border.zip - it does not seem to draw without the base map there)
I have also attached the otter picture I am using (you will need to
adjust the path in the sld file).

When you load all this into uDig you will see that it seems to ignore
the placement values and draws the text 'fred' over the otter picture by
the hidden point, instead of below it where I have asked it to in the
SLD displacements.

Maybe it is just me, still doing something wrong in my SLD?

Thanks for your help with this.

Michelle


-----Original Message-----
From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Cory
Horner
Sent: 03 April 2006 19:04
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] TextSymbolizer


M.S.Bachler wrote:

I have attached the shapefile and sld in a zip.

Anyone have any ideas?

<<border-heron1.zip>>

Hi Michelle,

The attached shapefile seems to have zero features.
I have tried adding a TextSymbolizer rule to my SLD and now it is broken. I have checked it by eye and from reading the 'Styled Layer Descriptor Implementation Specification'. But can't see where I am going wrong. When I try validating it with the uDig XML validation button in the Style Editor, it runs for ages but never seems to finish

and I have to crash out.

I'll add some proper feedback to this right now... it hasn't crashed, it

just doesn't tell you the xml validation passed.

Basically I want to draw a label under my icons (points).
The only bit of the TextSymbolizer I was unsure of was:

       <sld:Label>
               <ogc:PropertyName>ID</ogc:PropertyName>
       </sld:Label>

Is this PropertyName, the name of an attribute in my shapefile? That is what I assumed. Each of my Points has an attribute called 'ID'

This is correct -- PropertyName is the attribute type. The "Simple" page in the Style Editor will also generate this for you, under "Label".

Cheers,
Cory.
_______________________________________________
User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


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

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

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


--
This message has been scanned for viruses and dangerous
content by MailScanner, and is believed to be clean.

begin:vcard
fn:Mark Presling
n:Presling;Mark
email;internet:mark@xxxxxxxxxxxx
tel;home:+6442322774
tel;cell:+6421549540
version:2.1
end:vcard


Back to the top