[Geoserver-users] KML Output options

Hi,

my problem :

<Document>
<name>STREETS_1.4d28c7:10e184cdefb:-73c5</name>

is generated by geoservers KML output....the geometries are stored in an
oracle DB.

i would like to have an specified value in the <name></name> field. for
example

a column "ROUTE_NUM" with value "A61". i like to have the value from
ROUTE_NUM
in the <name> field. is this possible by giving some parameters to the
geoserver?
--
View this message in context: http://www.nabble.com/KML-Output-options-tf2388073.html#a6657422
Sent from the GeoServer - User mailing list archive at Nabble.com.

You can configure your style (SLD document) that has a text symbolizer that points to that column you want as your name.
Take a look at the 'popshade.sld' style that comes with GeoServer, it does this. It is used by the states layer.

<TextSymbolizer>
            <Label>
                <ogc:PropertyName>STATE_ABBR</ogc:PropertyName>
            </Label>

            <Font>
                <CssParameter name="font-family">Times New Roman</CssParameter>
                <CssParameter name="font-style">Normal</CssParameter>
                <CssParameter name="font-size">14</CssParameter>
            </Font>
            <Fill>
                <CssParameter name="fill">#000000</CssParameter>
            </Fill>
</TextSymbolizer>

Brent Owens
(The Open Planning Project)

wrobel wrote:

Hi,

my problem :

<Document>
<name>STREETS_1.4d28c7:10e184cdefb:-73c5</name>

is generated by geoservers KML output....the geometries are stored in an
oracle DB.

i would like to have an specified value in the <name></name> field. for
example

a column "ROUTE_NUM" with value "A61". i like to have the value from
ROUTE_NUM
in the <name> field. is this possible by giving some parameters to the
geoserver?
  

hi,

that works fine, but i dont want to have the value displayed in the graphic,

it should in the <Document><name>value</name></Document>

so that in the "tree view" under my places the value is shown instead of

these "STREETS_1.4d28c7:10e184cdefb:-73c5".

Brent Owens wrote:

You can configure your style (SLD document) that has a text symbolizer
that points to that column you want as your name.
Take a look at the 'popshade.sld' style that comes with GeoServer, it
does this. It is used by the states layer.

<TextSymbolizer>
            <Label>
                <ogc:PropertyName>STATE_ABBR</ogc:PropertyName>
            </Label>

            <Font>
                <CssParameter name="font-family">Times New
Roman</CssParameter>
                <CssParameter name="font-style">Normal</CssParameter>
                <CssParameter name="font-size">14</CssParameter>
            </Font>
            <Fill>
                <CssParameter name="fill">#000000</CssParameter>
            </Fill>
</TextSymbolizer>

Brent Owens
(The Open Planning Project)

wrobel wrote:

Hi,

my problem :

<Document>
<name>STREETS_1.4d28c7:10e184cdefb:-73c5</name>

is generated by geoservers KML output....the geometries are stored in an
oracle DB.

i would like to have an specified value in the <name></name> field. for
example

a column "ROUTE_NUM" with value "A61". i like to have the value from
ROUTE_NUM
in the <name> field. is this possible by giving some parameters to the
geoserver?
  
-------------------------------------------------------------------------
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/KML-Output-options-tf2388073.html#a6676020
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ah, I see what you mean.
If people would like the output to look like that I can make the change. It seems to make sense.

Brent Owens
(The Open Planning Project)

wrobel wrote:

hi,

that works fine, but i dont want to have the value displayed in the graphic,

it should in the <Document><name>value</name></Document>

so that in the "tree view" under my places the value is shown instead of

these "STREETS_1.4d28c7:10e184cdefb:-73c5".

Brent Owens wrote:
  

You can configure your style (SLD document) that has a text symbolizer that points to that column you want as your name.
Take a look at the 'popshade.sld' style that comes with GeoServer, it does this. It is used by the states layer.

<TextSymbolizer>
            <Label>
                <ogc:PropertyName>STATE_ABBR</ogc:PropertyName>
            </Label>

            <Font>
                <CssParameter name="font-family">Times New Roman</CssParameter>
                <CssParameter name="font-style">Normal</CssParameter>
                <CssParameter name="font-size">14</CssParameter>
            </Font>
            <Fill>
                <CssParameter name="fill">#000000</CssParameter>
            </Fill>
</TextSymbolizer>

Brent Owens
(The Open Planning Project)

wrobel wrote:
    

Hi,

my problem :

<Document>
<name>STREETS_1.4d28c7:10e184cdefb:-73c5</name>

is generated by geoservers KML output....the geometries are stored in an
oracle DB.

i would like to have an specified value in the <name></name> field. for
example

a column "ROUTE_NUM" with value "A61". i like to have the value from
ROUTE_NUM
in the <name> field. is this possible by giving some parameters to the
geoserver?
  

-------------------------------------------------------------------------
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

Brent Owens ha scritto:

Ah, I see what you mean.
If people would like the output to look like that I can make the change. It seems to make sense.
  

Hum... how do you discriminate between labels that you want to be displayed and stuff
you want to add as an "attribute" in kml?
It seems something we would need to add as a custom extension to sld, no idea how difficult
that would be to implement thought

Cheers
Andrea

Well if the person specifies a text symbolizer, then we can assume that is the main label they want, and we can use it as the name field in the kml description.
It is making assumptions, but it could be a useful one.
Another SLD option could be done but I really don't want one specifically for KML.

Brent Owens
(The Open Planning Project)

aaime@anonymised.com wrote:

Brent Owens ha scritto:

Ah, I see what you mean.
If people would like the output to look like that I can make the change. It seems to make sense.
  

Hum... how do you discriminate between labels that you want to be displayed and stuff
you want to add as an "attribute" in kml?
It seems something we would need to add as a custom extension to sld, no idea how difficult
that would be to implement thought

Cheers
Andrea

aaime@anonymised.com wrote:

Brent Owens ha scritto:

Ah, I see what you mean.
If people would like the output to look like that I can make the change. It seems to make sense.
  

Hum... how do you discriminate between labels that you want to be displayed and stuff
you want to add as an "attribute" in kml?
It seems something we would need to add as a custom extension to sld, no idea how difficult
that would be to implement thought

Yeah, that's the conclusion I came to. The SLD spec guys (or at least Markus Mueller) didn't like that solution so much. I'd like to see something like label with an attribute for 'name' or 'description'.

I think it's not too bad now to add vendor specific extensions to our SLD code. Jody?

Chris

Cheers
Andrea

-------------------------------------------------------------------------
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

!DSPAM:1003,45267df8138492051017194!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Brent Owens ha scritto:

Well if the person specifies a text symbolizer, then we can assume that is the main label they want, and we can use it as the name field in the kml description.
It is making assumptions, but it could be a useful one.
Another SLD option could be done but I really don't want one specifically for KML.

A comparison of a few legitimate requests:
* I want the label to be shown in the map (current behaviour)
* I want the label used as the kml description, but not the label around, in every layer (that may be something
   that a global variable of some kind could achieve)
* I want both (another global setting would do)
* I want the label used as kml description, but only in a few layers, in others I want only the label,
   in others both (here we need a map of options, one setting for each layer)
* I want to choose based on the feature attributes (now I'm being picky, I know).

An extra setting on the symbolizers in SLD would allow to handle all cases,
a global one out of sld just the first two...

Cheers
Andrea

Valid points. I will take a look at the options after this release and see what we can do. It shouldn't be too difficult.

Brent Owens
(The Open Planning Project)

aaime@anonymised.com wrote:

Brent Owens ha scritto:

Well if the person specifies a text symbolizer, then we can assume that is the main label they want, and we can use it as the name field in the kml description.
It is making assumptions, but it could be a useful one.
Another SLD option could be done but I really don't want one specifically for KML.

A comparison of a few legitimate requests:
* I want the label to be shown in the map (current behaviour)
* I want the label used as the kml description, but not the label around, in every layer (that may be something
  that a global variable of some kind could achieve)
* I want both (another global setting would do)
* I want the label used as kml description, but only in a few layers, in others I want only the label,
  in others both (here we need a map of options, one setting for each layer)
* I want to choose based on the feature attributes (now I'm being picky, I know).

An extra setting on the symbolizers in SLD would allow to handle all cases,
a global one out of sld just the first two...

Cheers
Andrea