[Geoserver-devel] Re: SV: SLD for smal displays

Rasmus,

There's probably something incorrect in your SLD file. Could you send
it?

dave
ps. I also sent this to the geoserver-devel list so other could help.

Rasmus Lindberg wrote:

Hallo Chris and Dave

Now I have tried and tried but I can't get teh geoserver to do as I

wan't

to.
I have one layer with major roads and when I use the normal style I get

a

default boring blackline map. Now I have tried to make an SLD-file

where I

define the LineSymbolizer to make a 10 pixel width red line.
Then in config/data/style.do I have created a new style and uploaded my
redline.xml
In /config/data/typeSelect.do I have choosen the layer with the major

road

and changed
Style to redline and "Submit", "Apply", "Save"

Now when I run my klient I hoped to get a red roadnet, but I don't.

What have I made wrong?

/ Rasmus

-----Ursprungligt meddelande-----
Fran: Chris Holmes [mailto:cholmes@anonymised.com]
Skickat: den 14 mars 2005 21:15
Till: Rasmus Lindberg
Kopia: David Blasby
Amne: Re: SLD for smal displays

Hey, this is going to be a quick answer, since I'm moving to Africa in

6

hours. But David should be able to help you out - he is geared to make

a

much nicer sld tutorial/introduction probably in april.

Hallo Chris

My name is Rasmus Lindberg and I'm studing Land Survaying in Lund,

Sweden.

Now I'm doing my Master thesis at GIS-centrum in
Lund. I will write about Catografy for small screens, more exactly how

to

best present nice looking maps in PDA and cellphones.

Sounds cool.

I'm planning to use SLD tolayou the data in our GeoServer or our
Deegreeserver. For some days I have searched the webb to find

something

more

than the spec, which I started to read but didn't understand much of.

Friday

last week I found you page "A quick introduction to SLD" which made me
understand much more what I'm trying to do. I hope that I now will
understand a bit more what is said in the spec.

Yeah, that introduction needs a ton of improvement. There really is a
dearth of good information.

But I have some questions that maybee you can answear.

Yes, I can try to answer these. But could you do me a big, big favor

if I

do? The page you found is a wiki, and editable, so if you could

improve

it with your findings, it would make many people happy. Sample SLD

files

would be great, and more detailed introductions and examples. Really
whatever you want. We're all about the open source philosophy -

throwing

the beginnings of something useful up and hoping that others

contribute.

Can I make one SLD-file that can work for several layers? And if, do I

then

have to cover all possible objects?

Yeah, you can make one sld file that works for several layers, but it

has

to be fairly general. You don't specify the name of the layer, and it
will match against others. But it means that you can't really do

filters

against the names of properties, unless of course the layers share
property names. Which is possible, especially if you are the one

making

the layers. But basically, yes, you can have one sld file that works

for

several layers, and I don't think you have to cover all possible

objects.

I think that line symbolizers will work for polygons, for example, at
least in our implementation. Though probably would not work for

points.

As I understand you can't send SLD-files to the server, but that will

be

pssible in 1.3. When will 1.3 be relised?

We should have a beta out this week, and hopefully a release candidate

at

the end of the month. The functionality should be in on subversion

(the

source tree), we just haven't tested or released yet.

Do you have any bigger SLD-file that I can look at to understand a bit
better how SLD works? The normal-file that I found in GeoServer does't

say

so much.

No, I don't have any bigger ones. I'm far from an expert on sld - I

just

wanted to put up an intro for people who knew nothing. If/when you do

get

some larger sld files please do share them with us. Oh wait, there are
more than the 'normal' file in geoserver. If you have the binary

version

check the server/geoserver/data/styles directory. There are a few with
filters and a couple more interesting things than 'normal'.

Do you have any experiances of cartografy for small displays?

Nope.

Hope that you can help me, and that I maybee can help you later on.

Cool. I hope this helps. Like I said, I'm not an sld expert. But the
next big goal for geoserver is very solid sld support _and_ tutorials

to

get everyone making much prettier maps.

best regards,

Crhsi

Whish you a happy day/ Rasmus

---
Rasmus Lindberg
Student at the M.Sc. Programme in Land Surveying at the
Lund Insitute of Technology, Sweden.
Email: cil00lr8@anonymised.com
Phone: +46735-070278

--

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

Probobly there are. I can't realy understand that it can be so hard to get
it to work.
I suppose that either is my sld-file wrong, the setup of the geoserver wrong
or there are som problems with the data in our database.
Yesterday I found out that I have to write redline in the "style="-thing in
the URL i send. So now I get a map which I didn't before. But it is stil
green ( I wrote wrong before, it is green and not black)

If you go to this link you can see how it looks like. It is a map of primary
and secondary roads in the comunity of Lund, Sweden.
http://raz.dns2go.com/tobias/WMS_Client.html

If you check this javascript-file you can see how the client works. Now I'm
using line 11 in each vaiablearray.
http://raz.dns2go.com/tobias/functions.js

I realy would be happy to get something to work, so that I can start to do
what I should do, to find out what is good catography for small screens.

/ Rasmus

-----Ursprungligt meddelande-----
Från: dblasby@anonymised.com [mailto:dblasby@anonymised.com]
Skickat: den 30 mars 2005 02:45
Till: geoserver-devel@lists.sourceforge.net
Kopia: Rasmus Lindberg
Ämne: Re: SV: SLD for smal displays

Rasmus,

There's probably something incorrect in your SLD file. Could you send
it?

dave
ps. I also sent this to the geoserver-devel list so other could help.

Rasmus Lindberg wrote:

Hallo Chris and Dave

Now I have tried and tried but I can't get teh geoserver to do as I

wan't

to.
I have one layer with major roads and when I use the normal style I get

a

default boring blackline map. Now I have tried to make an SLD-file

where I

define the LineSymbolizer to make a 10 pixel width red line.
Then in config/data/style.do I have created a new style and uploaded my
redline.xml
In /config/data/typeSelect.do I have choosen the layer with the major

road

and changed
Style to redline and "Submit", "Apply", "Save"

Now when I run my klient I hoped to get a red roadnet, but I don't.

What have I made wrong?

/ Rasmus

-----Ursprungligt meddelande-----
Fran: Chris Holmes [mailto:cholmes@anonymised.com]
Skickat: den 14 mars 2005 21:15
Till: Rasmus Lindberg
Kopia: David Blasby
Amne: Re: SLD for smal displays

Hey, this is going to be a quick answer, since I'm moving to Africa in

6

hours. But David should be able to help you out - he is geared to make

a

much nicer sld tutorial/introduction probably in april.

Hallo Chris

My name is Rasmus Lindberg and I'm studing Land Survaying in Lund,

Sweden.

Now I'm doing my Master thesis at GIS-centrum in
Lund. I will write about Catografy for small screens, more exactly how

to

best present nice looking maps in PDA and cellphones.

Sounds cool.

I'm planning to use SLD tolayou the data in our GeoServer or our
Deegreeserver. For some days I have searched the webb to find

something

more

than the spec, which I started to read but didn't understand much of.

Friday

last week I found you page "A quick introduction to SLD" which made me
understand much more what I'm trying to do. I hope that I now will
understand a bit more what is said in the spec.

Yeah, that introduction needs a ton of improvement. There really is a
dearth of good information.

But I have some questions that maybee you can answear.

Yes, I can try to answer these. But could you do me a big, big favor

if I

do? The page you found is a wiki, and editable, so if you could

improve

it with your findings, it would make many people happy. Sample SLD

files

would be great, and more detailed introductions and examples. Really
whatever you want. We're all about the open source philosophy -

throwing

the beginnings of something useful up and hoping that others

contribute.

Can I make one SLD-file that can work for several layers? And if, do I

then

have to cover all possible objects?

Yeah, you can make one sld file that works for several layers, but it

has

to be fairly general. You don't specify the name of the layer, and it
will match against others. But it means that you can't really do

filters

against the names of properties, unless of course the layers share
property names. Which is possible, especially if you are the one

making

the layers. But basically, yes, you can have one sld file that works

for

several layers, and I don't think you have to cover all possible

objects.

I think that line symbolizers will work for polygons, for example, at
least in our implementation. Though probably would not work for

points.

As I understand you can't send SLD-files to the server, but that will

be

pssible in 1.3. When will 1.3 be relised?

We should have a beta out this week, and hopefully a release candidate

at

the end of the month. The functionality should be in on subversion

(the

source tree), we just haven't tested or released yet.

Do you have any bigger SLD-file that I can look at to understand a bit
better how SLD works? The normal-file that I found in GeoServer does't

say

so much.

No, I don't have any bigger ones. I'm far from an expert on sld - I

just

wanted to put up an intro for people who knew nothing. If/when you do

get

some larger sld files please do share them with us. Oh wait, there are
more than the 'normal' file in geoserver. If you have the binary

version

check the server/geoserver/data/styles directory. There are a few with
filters and a couple more interesting things than 'normal'.

Do you have any experiances of cartografy for small displays?

Nope.

Hope that you can help me, and that I maybee can help you later on.

Cool. I hope this helps. Like I said, I'm not an sld expert. But the
next big goal for geoserver is very solid sld support _and_ tutorials

to

get everyone making much prettier maps.

best regards,

Crhsi

Whish you a happy day/ Rasmus

---
Rasmus Lindberg
Student at the M.Sc. Programme in Land Surveying at the
Lund Insitute of Technology, Sweden.
Email: cil00lr8@anonymised.com
Phone: +46735-070278

--

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

(attachments)

redline.sld (1.3 KB)

Probobly there are. I can't realy understand that it can be so hard to get
it to work.

Well, because we aren't doing our job well. The first problem is that we
don't check to see if styles are valid when they are uploaded. Hopefully
we can get this fixed soon. Right now we just fail to show the style.

I suppose that either is my sld-file wrong, the setup of the geoserver wrong
or there are som problems with the data in our database.
Yesterday I found out that I have to write redline in the "style="-thing in
the URL i send. So now I get a map which I didn't before. But it is stil
green ( I wrote wrong before, it is green and not black)

Oh, it's green. And your client looks svg-ey. Um (cringe) styles don't
work with svg. When Gabriel implemented them he did styling on the client
side. We actually could get styling if we used batik. It runs slower,
but it will do styles. The current svg implementation is based on doing
things a lot more quickly, at the expense of styles. Perhaps we should
somehow offer both . an svg-fast and an svg-styled. Gabriel, any thoughts
on this? Use batik for one, your old code for the other?

If you go to this link you can see how it looks like. It is a map of primary
and secondary roads in the comunity of Lund, Sweden.
http://raz.dns2go.com/tobias/WMS_Client.html

If you check this javascript-file you can see how the client works. Now I'm
using line 11 in each vaiablearray.
http://raz.dns2go.com/tobias/functions.js

I realy would be happy to get something to work, so that I can start to do
what I should do, to find out what is good catography for small screens.

/ Rasmus

-----Ursprungligt meddelande-----
Från: dblasby@anonymised.com [mailto:dblasby@anonymised.com]
Skickat: den 30 mars 2005 02:45
Till: geoserver-devel@lists.sourceforge.net
Kopia: Rasmus Lindberg
Ämne: Re: SV: SLD for smal displays

Rasmus,

There's probably something incorrect in your SLD file. Could you send
it?

dave
ps. I also sent this to the geoserver-devel list so other could help.

Rasmus Lindberg wrote:

>Hallo Chris and Dave
>
>Now I have tried and tried but I can't get teh geoserver to do as I
wan't
>to.
>I have one layer with major roads and when I use the normal style I get
a
>default boring blackline map. Now I have tried to make an SLD-file
where I
>define the LineSymbolizer to make a 10 pixel width red line.
>Then in config/data/style.do I have created a new style and uploaded my
>redline.xml
>In /config/data/typeSelect.do I have choosen the layer with the major
road
>and changed
>Style to redline and "Submit", "Apply", "Save"
>
>Now when I run my klient I hoped to get a red roadnet, but I don't.
>
>What have I made wrong?
>
>/ Rasmus
>
>-----Ursprungligt meddelande-----
>Fran: Chris Holmes [mailto:cholmes@anonymised.com]
>Skickat: den 14 mars 2005 21:15
>Till: Rasmus Lindberg
>Kopia: David Blasby
>Amne: Re: SLD for smal displays
>
>
>Hey, this is going to be a quick answer, since I'm moving to Africa in
6
>hours. But David should be able to help you out - he is geared to make
a
>much nicer sld tutorial/introduction probably in april.
>
>>Hallo Chris
>>
>>My name is Rasmus Lindberg and I'm studing Land Survaying in Lund,
Sweden.
>>Now I'm doing my Master thesis at GIS-centrum in
>>Lund. I will write about Catografy for small screens, more exactly how
to
>>best present nice looking maps in PDA and cellphones.
>
>Sounds cool.
>
>>I'm planning to use SLD tolayou the data in our GeoServer or our
>>Deegreeserver. For some days I have searched the webb to find
something
>
>more
>
>>than the spec, which I started to read but didn't understand much of.
>
>Friday
>
>>last week I found you page "A quick introduction to SLD" which made me
>>understand much more what I'm trying to do. I hope that I now will
>>understand a bit more what is said in the spec.
>
>Yeah, that introduction needs a ton of improvement. There really is a
>dearth of good information.
>
>>But I have some questions that maybee you can answear.
>
>Yes, I can try to answer these. But could you do me a big, big favor
if I
>do? The page you found is a wiki, and editable, so if you could
improve
>it with your findings, it would make many people happy. Sample SLD
files
>would be great, and more detailed introductions and examples. Really
>whatever you want. We're all about the open source philosophy -
throwing
>the beginnings of something useful up and hoping that others
contribute.
>
>>Can I make one SLD-file that can work for several layers? And if, do I
>
>then
>
>>have to cover all possible objects?
>
>Yeah, you can make one sld file that works for several layers, but it
has
>to be fairly general. You don't specify the name of the layer, and it
>will match against others. But it means that you can't really do
filters
>against the names of properties, unless of course the layers share
>property names. Which is possible, especially if you are the one
making
>the layers. But basically, yes, you can have one sld file that works
for
>several layers, and I don't think you have to cover all possible
objects.
>I think that line symbolizers will work for polygons, for example, at
>least in our implementation. Though probably would not work for
points.
>
>
>>As I understand you can't send SLD-files to the server, but that will
be
>>pssible in 1.3. When will 1.3 be relised?
>
>We should have a beta out this week, and hopefully a release candidate
at
>the end of the month. The functionality should be in on subversion
(the
>source tree), we just haven't tested or released yet.
>
>>Do you have any bigger SLD-file that I can look at to understand a bit
>>better how SLD works? The normal-file that I found in GeoServer does't
say
>>so much.
>
>No, I don't have any bigger ones. I'm far from an expert on sld - I
just
>wanted to put up an intro for people who knew nothing. If/when you do
get
>some larger sld files please do share them with us. Oh wait, there are
>more than the 'normal' file in geoserver. If you have the binary
version
>check the server/geoserver/data/styles directory. There are a few with
>filters and a couple more interesting things than 'normal'.
>
>>Do you have any experiances of cartografy for small displays?
>
>Nope.
>
>>Hope that you can help me, and that I maybee can help you later on.
>
>Cool. I hope this helps. Like I said, I'm not an sld expert. But the
>next big goal for geoserver is very solid sld support _and_ tutorials
to
>get everyone making much prettier maps.
>
>best regards,
>
>Crhsi
>
>>Whish you a happy day/ Rasmus
>>
>>---
>>Rasmus Lindberg
>>Student at the M.Sc. Programme in Land Surveying at the
>>Lund Insitute of Technology, Sweden.
>>Email: cil00lr8@anonymised.com
>>Phone: +46735-070278
>>
>
>--
>
>

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

--

Oh, it's green. And your client looks svg-ey. Um (cringe) styles don't work with svg. When Gabriel implemented them he did styling on the client side. We actually could get styling if we used batik. It runs slower, but it will do styles. The current svg implementation is based on doing things a lot more quickly, at the expense of styles. Perhaps we should somehow offer both . an svg-fast and an svg-styled. Gabriel, any thoughts on this? Use batik for one, your old code for the other?

darn I just need to find out the time to implement it. Adding style support to the streamed svg encoder would not be so dificult, since SLD properties are pretty inline with the CSS properties used in SVG. I had some plans to do that. Basically, I want to decouple some of the functionality the svg encoder used to have in two pieces, for WMS and as another WFS output format. The point is that I used to send feature attribute values embedded in the SVG, but I feel it should fit better to not overload the WMS part (that is, just create a map properly styled), and if you want feature attributes just issue a WFS request asking for svg output.

Providing style support to svg encoder was always one of my pending tasks, but it wasn't a requirement for my project when I implement it. Though, streamed encoding and supporting output attributes was. Actually, since I had to do that in a too contrained period of time, I was never too much happy about the implementation, and now I think it should be better to decouple the svg encoder from geoserver, send it to geotools and rework it to work on the geotools xml framework. But as this seems becoming increasingly difficult to find the time, that I indeed thought on deprecating the svg encoder until styling were incorporated.

About using batik, it would be easy to do the test, by just creating a DefaultRasterMapProducer subclass and providing the batik Graphics2D implementation. I was discouraged on using batik since it build a whole DOM, and I was working with pretty large datasets, and batik produces a lot of garbage (style and transformation is set on a per geometry basis), which is not good for bandwidth economy.

hope this answer your questions, bug me if not.

best regards,

Gabriel.