Re: [Qgis-user] Problems saving layer style as SLD for use in Geoserver 2.5

2015-09-14 Thread Luigi Pirelli
I remember geoserver support SLD 1.0 and QGIS 1.1... more info here:

http://qgis.boundlessgeo.com/static/docs/intro.html#styling-limitations

regards
Luigi Pirelli

**
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Elance: https://www.elance.com/s/edit/luigipirelli/
* GitHub: https://github.com/luipir
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
**


On 11 September 2015 at 15:51, Chris Buckmaster
 wrote:
> Hi
>
>
>
> I am trying to style my layers in Geoserver with the SLD files I am creating
> through QGIS but am encountering some errors, for example when using
> diagonal lines for a polygon layer:-
>
>
>
> · Parsing failed for Filter: java.lang.RuntimeException: Unable to
> find function Literal
>
> · line 23: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Filter'. One of
> '{"http://www.opengis.net/ogc":expression}' is expected.
>
> · line 24: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Literal'. One of
> '{"http://www.opengis.net/ogc":spatialOps,
> "http://www.opengis.net/ogc":comparisonOps,
> "http://www.opengis.net/ogc":logicOps, "http://www.opengis.net/ogc":_Id}' is
> expected.
>
>
>
> I have read that there are some issues when trying to use SLD generated
> files from QGIS in Geoserver as they are not set in the correct standard? Is
> that right? Are there any plugins that might export the styles out for use
> in Geoserver? I don’t really want to have to write all my styles from
> scratch L
>
>
>
> My SLD is below:-
>
>
>
> 
> http://www.opengis.net/sld;
> xmlns:ogc="http://www.opengis.net/ogc;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; version="1.1.0"
> xmlns:xlink="http://www.w3.org/1999/xlink;
> xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd;
> xmlns:se="http://www.opengis.net/se;>
>   
> air_quality_management_areas
> 
>   air_quality_management_areas
>   
> 
>   Single symbol
>   
> 
>   
> 
>   
> horline
> 
>name="stroke">#5c98e6
>name="stroke-width">0.25
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   45
> 
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   
> horline
> 
>name="stroke">#5c98e6
>name="stroke-width">0.25
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   135
> 
>   
>   
> 0
> 0
>   
> 
>   
> 
>   
>   
> 
>   #5c98e6
>   0.5
>name="stroke-linejoin">bevel
>name="stroke-linecap">square
> 
>   
> 
>   
> 
>   
> 
>
>
>
>
>
> Thanks, Chris
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Problems saving layer style as SLD for use in Geoserver 2.5

2015-09-14 Thread Giuseppe Sucameli
Hi Chris,
Luigi is right, the version is different.

Anyway the one you reported looks like a bug:  tag is not
expected within  tag!

Try to remove it but keeping the ogc:Literal tag, it must looks like:


  135



Then tell us if this change is enough.

Best Regards.

Giuseppe


Sent from mobile. Sorry for being short.

On Fri, Sep 11, 2015 at 3:51 PM, Chris Buckmaster <
chris.buckmas...@runnymede.gov.uk> wrote:

> Hi
>
>
>
> I am trying to style my layers in Geoserver with the SLD files I am
> creating through QGIS but am encountering some errors, for example when
> using diagonal lines for a polygon layer:-
>
>
>
> · Parsing failed for Filter: java.lang.RuntimeException: Unable
> to find function Literal
>
> · line 23: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Filter'. One of 
> '{"http://www.opengis.net/ogc":expression}'
> is expected.
>
> · line 24: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Literal'. One of 
> '{"http://www.opengis.net/ogc":spatialOps,
> "http://www.opengis.net/ogc":comparisonOps, 
> "http://www.opengis.net/ogc":logicOps,
> "http://www.opengis.net/ogc":_Id}' is expected.
>
>
>
> I have read that there are some issues when trying to use SLD generated
> files from QGIS in Geoserver as they are not set in the correct standard?
> Is that right? Are there any plugins that might export the styles out for
> use in Geoserver? I don’t really want to have to write all my styles from
> scratch L
>
>
>
> My SLD is below:-
>
>
>
> 
> http://www.opengis.net/sld; xmlns:ogc="
> http://www.opengis.net/ogc; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance; version="1.1.0" xmlns:xlink="
> http://www.w3.org/1999/xlink; xsi:schemaLocation="
> http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd; xmlns:se="
> http://www.opengis.net/se;>
>   
> air_quality_management_areas
> 
>   air_quality_management_areas
>   
> 
>   Single symbol
>   
> 
>   
> 
>   
> horline
> 
>   #5c98e6 se:SvgParameter>
>   0.25 se:SvgParameter>
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   45
> 
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   
> horline
> 
>   #5c98e6 se:SvgParameter>
>   0.25 se:SvgParameter>
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   135
> 
>   
>   
> 0
> 0
>   
> 
>   
> 
>   
>   
> 
>   #5c98e6
>   0.5
>   bevel se:SvgParameter>
>   square se:SvgParameter>
> 
>   
> 
>   
> 
>   
> 
>
>
>
>
>
> Thanks, Chris
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



-- 
Giuseppe Sucameli
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Problems saving layer style as SLD for use in Geoserver 2.5

2015-09-14 Thread Victor Olaya
Chris,

The SLD written by QGIS is not compatible with the one expected by QGIS

The QGIS OpenGeo plugin [1] tries to solve that by converting it and
modifying it. You can upload your layers and styles to GeoServer using
the OpenGeo plugin.

If you want to automate that conversion or do it manually, you will
find a convertQgsToGs() method in the sldadapter module of the plugin
to do so (see [2])

Let me know if you have questions

Regards


[1] https://github.com/boundlessgeo/suite-qgis-plugin
[2] 
https://github.com/boundlessgeo/suite-qgis-plugin/blob/master/src/opengeo/qgis/sldadapter.py#L32

2015-09-11 15:51 GMT+02:00 Chris Buckmaster :
> Hi
>
>
>
> I am trying to style my layers in Geoserver with the SLD files I am creating
> through QGIS but am encountering some errors, for example when using
> diagonal lines for a polygon layer:-
>
>
>
> · Parsing failed for Filter: java.lang.RuntimeException: Unable to
> find function Literal
>
> · line 23: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Filter'. One of
> '{"http://www.opengis.net/ogc":expression}' is expected.
>
> · line 24: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Literal'. One of
> '{"http://www.opengis.net/ogc":spatialOps,
> "http://www.opengis.net/ogc":comparisonOps,
> "http://www.opengis.net/ogc":logicOps, "http://www.opengis.net/ogc":_Id}' is
> expected.
>
>
>
> I have read that there are some issues when trying to use SLD generated
> files from QGIS in Geoserver as they are not set in the correct standard? Is
> that right? Are there any plugins that might export the styles out for use
> in Geoserver? I don’t really want to have to write all my styles from
> scratch L
>
>
>
> My SLD is below:-
>
>
>
> 
> http://www.opengis.net/sld;
> xmlns:ogc="http://www.opengis.net/ogc;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; version="1.1.0"
> xmlns:xlink="http://www.w3.org/1999/xlink;
> xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd;
> xmlns:se="http://www.opengis.net/se;>
>   
> air_quality_management_areas
> 
>   air_quality_management_areas
>   
> 
>   Single symbol
>   
> 
>   
> 
>   
> horline
> 
>name="stroke">#5c98e6
>name="stroke-width">0.25
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   45
> 
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   
> horline
> 
>name="stroke">#5c98e6
>name="stroke-width">0.25
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   135
> 
>   
>   
> 0
> 0
>   
> 
>   
> 
>   
>   
> 
>   #5c98e6
>   0.5
>name="stroke-linejoin">bevel
>name="stroke-linecap">square
> 
>   
> 
>   
> 
>   
> 
>
>
>
>
>
> Thanks, Chris
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Problems saving layer style as SLD for use in Geoserver 2.5

2015-09-14 Thread Chris Buckmaster
Hi Victor

Thanks very much for that info, I will give it a try.

Chris

-Original Message-
From: Victor Olaya [mailto:vola...@gmail.com] 
Sent: 14 September 2015 14:51
To: Chris Buckmaster
Cc: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Problems saving layer style as SLD for use in 
Geoserver 2.5

Chris,

The SLD written by QGIS is not compatible with the one expected by QGIS

The QGIS OpenGeo plugin [1] tries to solve that by converting it and modifying 
it. You can upload your layers and styles to GeoServer using the OpenGeo plugin.

If you want to automate that conversion or do it manually, you will find a 
convertQgsToGs() method in the sldadapter module of the plugin to do so (see 
[2])

Let me know if you have questions

Regards


[1] https://github.com/boundlessgeo/suite-qgis-plugin
[2] 
https://github.com/boundlessgeo/suite-qgis-plugin/blob/master/src/opengeo/qgis/sldadapter.py#L32

2015-09-11 15:51 GMT+02:00 Chris Buckmaster :
> Hi
>
>
>
> I am trying to style my layers in Geoserver with the SLD files I am 
> creating through QGIS but am encountering some errors, for example 
> when using diagonal lines for a polygon layer:-
>
>
>
> · Parsing failed for Filter: java.lang.RuntimeException: Unable to
> find function Literal
>
> · line 23: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Filter'. One of 
> '{"http://www.opengis.net/ogc":expression}' is expected.
>
> · line 24: cvc-complex-type.2.4.a: Invalid content was found
> starting with element 'ogc:Literal'. One of 
> '{"http://www.opengis.net/ogc":spatialOps,
> "http://www.opengis.net/ogc":comparisonOps,
> "http://www.opengis.net/ogc":logicOps, 
> "http://www.opengis.net/ogc":_Id}' is expected.
>
>
>
> I have read that there are some issues when trying to use SLD 
> generated files from QGIS in Geoserver as they are not set in the 
> correct standard? Is that right? Are there any plugins that might 
> export the styles out for use in Geoserver? I don’t really want to 
> have to write all my styles from scratch L
>
>
>
> My SLD is below:-
>
>
>
>   xmlns="http://www.opengis.net/sld;
> xmlns:ogc="http://www.opengis.net/ogc;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; version="1.1.0"
> xmlns:xlink="http://www.w3.org/1999/xlink;
> xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd;
> xmlns:se="http://www.opengis.net/se;>
>   
> air_quality_management_areas
> 
>   air_quality_management_areas
>   
> 
>   Single symbol
>   
> 
>   
> 
>   
> horline
> 
>name="stroke">#5c98e6
>name="stroke-width">0.25
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   45
> 
>   
> 
>   
> 
>   
>   
> 
>   
> 
>   
> horline
> 
>name="stroke">#5c98e6
>name="stroke-width">0.25
> 
>   
>   5
>   
> http://www.opengis.net/ogc;>
>   135
> 
>   
>   
> 0
> 0
>   
> 
>   
> 
>   
>   
> 
>   #5c98e6
>   0.5
>name="stroke-linejoin">bevel
>name="stroke-linecap">square
> 
>   
> 
>   
> 
>   
> 
>
>
>
>
>
> Thanks, Chris
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Problems saving layer style as SLD for use in Geoserver 2.5

2015-09-11 Thread Chris Buckmaster
Hi

I am trying to style my layers in Geoserver with the SLD files I am creating 
through QGIS but am encountering some errors, for example when using diagonal 
lines for a polygon layer:-

* Parsing failed for Filter: java.lang.RuntimeException: Unable to find 
function Literal
* line 23: cvc-complex-type.2.4.a: Invalid content was found starting 
with element 'ogc:Filter'. One of '{"http://www.opengis.net/ogc":expression}' 
is expected.
* line 24: cvc-complex-type.2.4.a: Invalid content was found starting 
with element 'ogc:Literal'. One of '{"http://www.opengis.net/ogc":spatialOps, 
"http://www.opengis.net/ogc":comparisonOps, 
"http://www.opengis.net/ogc":logicOps, "http://www.opengis.net/ogc":_Id}' is 
expected.

I have read that there are some issues when trying to use SLD generated files 
from QGIS in Geoserver as they are not set in the correct standard? Is that 
right? Are there any plugins that might export the styles out for use in 
Geoserver? I don't really want to have to write all my styles from scratch :(

My SLD is below:-


http://www.opengis.net/sld; 
xmlns:ogc="http://www.opengis.net/ogc; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; version="1.1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xsi:schemaLocation="http://www.opengis.net/sld 
http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd; 
xmlns:se="http://www.opengis.net/se;>
  
air_quality_management_areas

  air_quality_management_areas
  

  Single symbol
  

  

  
horline

  #5c98e6
  0.25

  
  5
  
http://www.opengis.net/ogc;>
  45

  

  

  
  

  

  
horline

  #5c98e6
  0.25

  
  5
  
http://www.opengis.net/ogc;>
  135

  
  
0
0
  

  

  
  

  #5c98e6
  0.5
  bevel
  square

  

  

  



Thanks, Chris
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user