Wednesday, 7 November 2018

qgis - Issues with datasets when custom SLD loaded into geoserver


I have created my SLD's in QGIS and want to use them in Geoserver. I have imported and validated them without any problems


but when I try to view the data using Layer Preview --> OpenLayers-->Go it tries to download the data rather than let me view it. With the default symbology it works fine.


Is there something fundamental that I have to change in the SLD from Geoserver for it to work?


One of the simple and 2 complex SLD's are below (roads at different zoom levels)


Roads - Simple



    


Roads_GHD_20121121

Roads_GHD_20121121


GHD Roads
250000



#ff0000
0.4
bevel
square
5 2









Roads - Complex


                       xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"

xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Road with border

Road with border







State_cont
Y


0
1787



#CDAA66
12
round









State_cont
Y


0
1787


#FFFFFF

11
round





Arial

10
normal






1




#FFFFFF


1





#000000

true
30
800
1000










State_cont
Y


1787

3573


#CDAA66
7
round









State_cont
Y


1787
3573



#FFFFFF
6
round





Arial
10
normal







1



#FFFFFF


1





#000000

true
30
800
1000










State_cont
Y



3573
28573


#CDAA66
4
round









Points Complex with SVG files.


                        
State_cont

Y


3573
28573


#FFFFFF
3
round






Arial
10
normal







1




#FFFFFF


1




#000000


true
30
800
1000










State_cont
Y


28573
114287



#D7C29E
1











State_cont
state


0
1787



#CDAA66
13
round









State_cont
state


0
1787



#FFFF00
12
round






Arial
10
normal






1




#FFFF00


1





#000000

true
30
800
1000










State_cont
state



1787
3573


#CDAA66
7
round









State_cont
state


1787

3573


#FFFF00
6
round





Arial
10
normal







1



#FFFF00


1





#000000

true
30
800
1000










State_cont

state


3573


#CDAA66
5
round









State_cont
state



3573


#FFFF00
4
round






Arial
10
normal







1



#FFFF00



1




#000000

true
30
800

1000







Answer



QGIS produces SLD 1.1 while Geoserver only seems to support SLD 1.0 currently. The Geoserver blog indicates that they are working on it though, e.g. http://blog.geoserver.org/2013/02/26/geoserver-2-3-rc1-released/


No comments:

Post a Comment