hi, relatively new GeoServer user here (most recent 1.5RC1). My question, in
brief: can you use <ogc:PropertyName> to shove colors into SLD's like you do
text labels? that is:
I have a column named 'color' on my postgis table/view and thus imagine the
following should work:
<CssParameter
name="fill"><ogc:PropertyName>color</ogc:PropertyName></CssParameter>
the same way this works for text labelling:
<Label><ogc:PropertyName>name</ogc:PropertyName></Label>
note: I have tried this with >color< and >COLOR< and have made the 'color'
column in my table have hex colors both with and without the '#' (i.e.
FF0000 and #FF0000) and it's never working -- the WMS just fails to render
the layer at all.
should this be working? any suggestions as to how to debug? this just
seems like an easier approach for simple GIS-like stuff than all the crazy
in SLD filters that it takes to display a range of colors.
thanks,
mike
--
View this message in context: http://www.nabble.com/Dynamic-Colors%2C-from-Attributes-Propreties-tf3254992.html#a9048975
Sent from the GeoServer - User mailing list archive at Nabble.com.
just kidding. of course it works; I was using a view and had not specified
the column type where the color was to be text. once I casted it (i.e.
select "#FF0000"::text) it works perfectly.
thanks for the awesome product,
mike
mfrumin wrote:
[resend, post-subscribing, not sure if my previous post got through]
hi, relatively new GeoServer user here (most recent 1.5RC1). My question,
in brief: can you use <ogc:PropertyName> to shove colors into SLD's like
you do text labels? that is:
I have a column named 'color' on my postgis table/view and thus imagine
the following should work:
<CssParameter
name="fill"><ogc:PropertyName>color</ogc:PropertyName></CssParameter>
the same way this works for text labelling:
<Label><ogc:PropertyName>name</ogc:PropertyName></Label>
note: I have tried this with >color< and >COLOR< and have made the 'color'
column in my table have hex colors both with and without the '#' (i.e.
FF0000 and #FF0000) and it's never working -- the WMS just fails to render
the layer at all.
should this be working? any suggestions as to how to debug? this just
seems like an easier approach for simple GIS-like stuff than all the crazy
in SLD filters that it takes to display a range of colors.
thanks,
mike
--
View this message in context: http://www.nabble.com/Dynamic-Colors%2C-from-Attributes-Propreties-tf3254992.html#a9050853
Sent from the GeoServer - User mailing list archive at Nabble.com.
So now that you made it work, care to write a quick example on the wiki?
The wiki is not getting the recognition it deserves (IMHO), and it has
helped me many times. If you decide to contribute, I can assure you
that your work will be much appreciated by others.
Here is the SLD tutorial collection on the wiki:
http://docs.codehaus.org/display/GEOSDOC/OGC+SLD+Explanations+and+Samples
Chris, where would be a good place for users to post SLD examples?
Alex
On 2/19/07, mfrumin <mfrumin@anonymised.com> wrote:
just kidding. of course it works; I was using a view and had not specified
the column type where the color was to be text. once I casted it (i.e.
select "#FF0000"::text) it works perfectly.
thanks for the awesome product,
mike
mfrumin wrote:
>
> [resend, post-subscribing, not sure if my previous post got through]
>
> hi, relatively new GeoServer user here (most recent 1.5RC1). My question,
> in brief: can you use <ogc:PropertyName> to shove colors into SLD's like
> you do text labels? that is:
>
> I have a column named 'color' on my postgis table/view and thus imagine
> the following should work:
> <CssParameter
> name="fill"><ogc:PropertyName>color</ogc:PropertyName></CssParameter>
>
> the same way this works for text labelling:
> <Label><ogc:PropertyName>name</ogc:PropertyName></Label>
>
> note: I have tried this with >color< and >COLOR< and have made the 'color'
> column in my table have hex colors both with and without the '#' (i.e.
> FF0000 and #FF0000) and it's never working -- the WMS just fails to render
> the layer at all.
>
> should this be working? any suggestions as to how to debug? this just
> seems like an easier approach for simple GIS-like stuff than all the crazy
> in SLD filters that it takes to display a range of colors.
>
> thanks,
> mike
>
--
View this message in context: http://www.nabble.com/Dynamic-Colors%2C-from-Attributes-Propreties-tf3254992.html#a9050853
Sent from the GeoServer - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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
http://docs.codehaus.org/display/GEOSDOC/SLD+Snippets is the place for examples. Though I've been meaning to clean it up a bit, make it more of a repository of good samples, consolidate the various places they're spread. But for now it'd be great if you could throw stuff in there.
Chris
Alexander Petkov wrote:
So now that you made it work, care to write a quick example on the wiki?
The wiki is not getting the recognition it deserves (IMHO), and it has
helped me many times. If you decide to contribute, I can assure you
that your work will be much appreciated by others.
Here is the SLD tutorial collection on the wiki:
http://docs.codehaus.org/display/GEOSDOC/OGC+SLD+Explanations+and+Samples
Chris, where would be a good place for users to post SLD examples?
Alex
On 2/19/07, mfrumin <mfrumin@anonymised.com> wrote:
just kidding. of course it works; I was using a view and had not specified
the column type where the color was to be text. once I casted it (i.e.
select "#FF0000"::text) it works perfectly.
thanks for the awesome product,
mike
mfrumin wrote:
[resend, post-subscribing, not sure if my previous post got through]
hi, relatively new GeoServer user here (most recent 1.5RC1). My question,
in brief: can you use <ogc:PropertyName> to shove colors into SLD's like
you do text labels? that is:
I have a column named 'color' on my postgis table/view and thus imagine
the following should work:
<CssParameter
name="fill"><ogc:PropertyName>color</ogc:PropertyName></CssParameter>
the same way this works for text labelling:
<Label><ogc:PropertyName>name</ogc:PropertyName></Label>
note: I have tried this with >color< and >COLOR< and have made the 'color'
column in my table have hex colors both with and without the '#' (i.e.
FF0000 and #FF0000) and it's never working -- the WMS just fails to render
the layer at all.
should this be working? any suggestions as to how to debug? this just
seems like an easier approach for simple GIS-like stuff than all the crazy
in SLD filters that it takes to display a range of colors.
thanks,
mike
--
View this message in context: http://www.nabble.com/Dynamic-Colors%2C-from-Attributes-Propreties-tf3254992.html#a9050853
Sent from the GeoServer - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
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,45da498135596309890654!
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org