Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

GetMap problem with a SLD style #14

Open
julienlgl opened this issue Oct 8, 2012 · 10 comments · Fixed by orbisgis/ogc-custom-jaxb#2
Open

GetMap problem with a SLD style #14

julienlgl opened this issue Oct 8, 2012 · 10 comments · Fixed by orbisgis/ogc-custom-jaxb#2

Comments

@julienlgl
Copy link

A white image is returned when using the SLD parameter instead of LAYERS/STYLES

I used the following request: http://localhost:9000/wms/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&CRS=EPSG:27582&BBOX=-156192.28836424963,1620431.0,1401694.2883642497,2677441.0&WIDTH=874&HEIGHT=593&FORMAT=image/png&pixelSize=0.024&SLD=http://poulpe.heig-vd.ch/scapc2/sld/polygons.sld

@oertz
Copy link

oertz commented Nov 2, 2012

Well, the problem is even more critical. The SLD schema used by this version of the server is wrong! Look at SLD 1.1 spec 05-078r4, section 11.2, the choice between a NamedStyle and UserStyle must be kept for our SLD 1.2. Indeed, the UserStyle itself seems to have disappeared in this version of the server. Of course, something has to be changed to do the link with our SE 2.0, but it concerns the choice WITHIN UserStyle which can be replaced by an se:AbstractStyle (given that se namespace refers here to our SE 2.0).

Just like this:

sld:UserStyle
se:Name ... </se:Name> [0..1]
se:Description ... </se:Description> [0..1]
sld:IsDefault ... </sld:IsDefault> [0..1]
se:AbstractStyle ... </se:AbstractStyle> [1]
</sld:UserStyle>

@agueganno
Copy link
Contributor

Ok, so I've worked on it a bit more. Now that we have fixed schemas in our dedicated Jar, I've updated the dependency to them in orbisgis/orbisgis#241 . This has caused some compilation problems in orbisgis-server, so I've fixed them in #23 .

All the parameters of UserStyle may not be taken in account. But that should be better than before...

@agueganno
Copy link
Contributor

It seems to be working now, so please test and close/comment.

@ebocher
Copy link
Member

ebocher commented Jul 4, 2013

Doesn't work for me and the SLD term seems to be unsupported by WMS 1.3.0 . Am I wrong ?

@oertz
Copy link

oertz commented Jul 4, 2013

What do you mean "unsupported" ? Indeed, WMS does not manage SLD and this is why SLD comes as a profile of WMS (including 1.3.0) to add new capabilities.

I would like to test the stuff, but play compile fails :-( ... I try again and come back to you.

@agueganno
Copy link
Contributor

BTW, @ebocher, it would be nice to know what you did in order to understand your problem with more accuracy.

@ebocher
Copy link
Member

ebocher commented Jul 5, 2013

I will push a pr with a unit that exposes the problem.

@agueganno
Copy link
Contributor

Indeed it does not work anymore : I fixed and broke it back when I changed the way we manage http parameters. Fix incoming.

@agueganno
Copy link
Contributor

The file originally tested in this issue may be invalid. It declares a Layer rather than a NamedLayer. I don't find "Layer" to be a valid tag name in SLD.

I'm working on it. @ebocher provided a useful automated tests I've used in addition to things I already made. I still have to test and to perform the PR.

agueganno pushed a commit to agueganno/orbisgis-server that referenced this issue Jul 5, 2013
I perform more accurate tests to define if an input request is valid ot
not. I also fix two potential NPEs introduced while reworking the code.
Finally, I fix the sample SLD as it is not valid.
@agueganno
Copy link
Contributor

Use http://www.orbisgis.org/store/styles/polygons.sld if you want to test - I've fixed the SLD.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants