[Geoserver-devel] WMS and SVG

Hi all,

Using the following WMS request for getting a SVG image :
-----
http://localhost:8080/geoserver/wms?request=getMap&bbox=-5.37588,41.11496,10.51521,51.10804&width=548&height=520&srs=4326&format=image/svg+xml&layers=map2x0:serie_rouge,map2x0:serie_rouge,map2x0:serie_rouge&styles=sr250c,R21,sr250n&
-----

The rendering is a file with requested styles (attribute class on g tag), but
the styles are not rendered : styles definitions are not part of the svg
file.

Furthermore, the extent of the SVG seems to be incorrect (viewBox="-5 41 16
10") : the data are not shown completly (using squiggle and zoom out, shows
evething), while the real extent is : -5.4, 41.15, 10.51, 51.11. Changing the
viewBox to "-6 41 17 11" shows the whole data.

Finally, does something succeed in viewing SVG files produced by WMS (I can
only see them under the batik browser squiggle - while I can see squiggle
sample SVG files under mozilla).

OS:Linux
Datastore: postgreSQL
Web client: mozilla 1.1 to 1.4 (tested)

didier

Hi Ricchard,

Richard didier wrote:

Hi all,

Using the following WMS request for getting a SVG image :
-----
http://localhost:8080/geoserver/wms?request=getMap&bbox=-5.37588,41.11496,10.51521,51.10804&width=548&height=520&srs=4326&format=image/svg+xml&layers=map2x0:serie_rouge,map2x0:serie_rouge,map2x0:serie_rouge&styles=sr250c,R21,sr250n&
-----

The rendering is a file with requested styles (attribute class on g tag), but the styles are not rendered : styles definitions are not part of the svg file.

Unfortunatelly styles in SVG rendering is not implemented yet. I manage it declaring the styles on my SVG client as CSS entities, but yes, it is a pain to not have them encoded in the resulting svg map. I hope to have the time to do it shortly, but *really* I don't think I will in the next couple of months due to another priority tasks. Ofcuorse any contribution should be greately appreciated :slight_smile:

Furthermore, the extent of the SVG seems to be incorrect (viewBox="-5 41 16 10") : the data are not shown completly (using squiggle and zoom out, shows evething), while the real extent is : -5.4, 41.15, 10.51, 51.11. Changing the viewBox to "-6 41 17 11" shows the whole data.

mmmm... looks clearly as a bug. The same, I hope to have the time to check it out the sooner possible.

Finally, does something succeed in viewing SVG files produced by WMS (I can only see them under the batik browser squiggle - while I can see squiggle sample SVG files under mozilla).

Strange. did you tried with adobe svg viewer?.
Is it a line layer or a polygon one?
The first think I can imagine is that perhaps your mozilla version does not manages well percent stroke widths. Try replacing the stroke width in the generated SVG by a fixed value and see what happens.

Best regards,

Gabriel Roldán

OS:Linux
Datastore: postgreSQL
Web client: mozilla 1.1 to 1.4 (tested)

didier

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel