[Geoserver-users] label with fid

I have tried to label a feature with SLD with its properties with success,
but how can I specify the FID attribute, what value I have to put between
the <ogc:PropertyName>tag?
...
                    <TextSymbolizer>
                        <Label>
                            <ogc:PropertyName>attribute</ogc:PropertyName>
                        </Label>
...
                    </TextSymbolizer>
...
--
View this message in context: http://www.nabble.com/label-with-fid-tf3354405.html#a9328873
Sent from the GeoServer - User mailing list archive at Nabble.com.

Sofronisco ha scritto:

I have tried to label a feature with SLD with its properties with success,
but how can I specify the FID attribute, what value I have to put between
the <ogc:PropertyName>tag?
...
                    <TextSymbolizer>
                        <Label>
                            <ogc:PropertyName>attribute</ogc:PropertyName>
                        </Label>
...
                    </TextSymbolizer>

Hum... fid is not a property in the strict sense. I fear there is no
way to create a label with fids, but haven't really checked the
code to see if there is any way.

Maybe someone else knows better.
Cheers
Andrea

In geoserver 1.6 you should be able to specify "gml:id" to get the
feature id.

<TextSymbolizer>
  <Label>
    <ogc:PropertyName>@gml:id</ogc:PropertyName>
  </Label>
</TextSymbolizer>

Sofronisco wrote:

I have tried to label a feature with SLD with its properties with success,
but how can I specify the FID attribute, what value I have to put between
the <ogc:PropertyName>tag?
...
                    <TextSymbolizer>
                        <Label>
                            <ogc:PropertyName>attribute</ogc:PropertyName>
                        </Label>
...
                    </TextSymbolizer>
...

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

I'm using geoserver 1.4 in production environment and so I've decided to use
views, so fid is not the primary key I wanted to display on the map, but
It's very interesting that geoserver 1.6 permits it.
Thank you for your answers and sorry for being so late answering you.

Justin Deoliveira-4 wrote:

In geoserver 1.6 you should be able to specify "gml:id" to get the
feature id.

<TextSymbolizer>
  <Label>
    <ogc:PropertyName>@gml:id</ogc:PropertyName>
  </Label>
</TextSymbolizer>

Sofronisco wrote:

I have tried to label a feature with SLD with its properties with
success,
but how can I specify the FID attribute, what value I have to put between
the <ogc:PropertyName>tag?
...
                    <TextSymbolizer>
                        <Label>
                           
<ogc:PropertyName>attribute</ogc:PropertyName>
                        </Label>
...
                    </TextSymbolizer>
...

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/label-with-fid-tf3354405.html#a9648640
Sent from the GeoServer - User mailing list archive at Nabble.com.