Skip to main content
10 votes
Accepted

Qgis exported SLD file is not valid on Geoserver

Current QGIS releases export invalid SLD 1.1 in various ways. In your example, you should amend the gap this way: <se:Gap>3</se:Gap> There are also other issues like wrong sizes and the ...
Andrea Aime's user avatar
  • 17.5k
9 votes

Geoserver SLD external graphic path

Check if you have created the style definition inside a workspace. If you are in this situation you have to place the png image into $GEOSERVER_DATA_DIR/wokspaces/{Name}/styles directory or any ...
Juan Jaraices's user avatar
9 votes
Accepted

Rotation in GeoServer SLD

Something like this should work, using the math operators - please note it is untested: <Rotation> <ogc:Div> <ogc:Sub> <ogc:Literal>450</ogc:Literal&...
JimT's user avatar
  • 2,383
8 votes
Accepted

Filtering number of features in GeoServer using SLD?

Personally, I would try to separate data store access/publishing from layer styling. You could create a SQL View for the datastore, effectively adding a new layer with the query result table. The ...
geozelot's user avatar
  • 30.4k
7 votes

Does QGIS support .sld style files for raster layers?

There is a plugin in the Official Repository that seems to be what you were looking for. It's called SLD4raster. https://plugins.qgis.org/plugins/SLD4raster/
Alexandre Neto's user avatar
7 votes

Using Conditional Statement in SLD GeoServer

You can use something like this: <ogc:Mul> <ogc:PropertyName>variable</ogc:PropertyName> <ogc:Function name="if_then_else"> <ogc:Function name="between"> ...
Zoran Kokeza's user avatar
6 votes

Force all labels visible in GeoServer

You can use : <VendorOption name="partials">true</VendorOption> to tell geoserver to render labels that are partially visible
Olyster's user avatar
  • 171
6 votes

Converting ArcGIS layer style to Styled Layer Descriptor (SLD) file?

I have confirmed that arcmap2sld tool is working fine on ArcGIS Desktop 10.1+. The program can be downloaded from this link and the readme docs are here. The program transforms an ArcMap project's ...
Alex Tereshenkov's user avatar
6 votes
Accepted

SLD : setting Multiple Values in one Literal Tag

I would go with something like: <ogc:Function name="in"> <ogc:PropertyName>name</ogc:PropertyName> <ogc:Literal>1</ogc:Literal> <ogc:Literal>11</ogc:...
Ian Turton's user avatar
  • 82.2k
6 votes
Accepted

Geoserver tiles missing point labels that show up fine when serving as a single tile

I did further research, and the following three "vendorOption" parameters were recommended where labels are left off when you really want them labeled in the tiles. I'll explain each briefly and why ...
Brian B's user avatar
  • 815
6 votes
Accepted

Using Math in SLD file - wkt

You can do math in SLD in most places, but a WellKnownMark element is not one of them. This is what the standard says, GeoServer has a custom extension allowing to stick a CQL expression in the ...
Andrea Aime's user avatar
  • 17.5k
6 votes
Accepted

Geoserver SLD labels dynamic displacement to resolve overlap conflicts?

I found the answer to my problem with the "maxDisplacement" vendor option. For lines, normally GeoServer labels a line at its center point only. If this label conflicts with another one it ...
Psymøn's user avatar
  • 191
6 votes
Accepted

Show custom string as label in SLD Geoserver

You just ad BC to the label line. <TextSymbolizer> <Label> <ogc:PropertyName>STATE_ABBR</ogc:PropertyName> Ian </Label> <Font>...
Ian Turton's user avatar
  • 82.2k
6 votes
Accepted

Problem with GeoServer modifying a style when uploading an SLD via the REST API

You are mixing an SLD 1.1.0 file (or Symbology Encoding) with the SLD 1.0.0 format so GeoServer is filtering out the 1.1.0 elements to make it compliant with 1.0.0. You need to set the content-type to ...
Ian Turton's user avatar
  • 82.2k
6 votes
Accepted

Geoserver SLD stylesheets - what does "se" namespace mean?

XML prefixes don't mean anything, though by convention they are often chosen to relate to the schema they are importing. If you look at (usually) the first line of your XML you will see something like:...
Ian Turton's user avatar
  • 82.2k
6 votes
Accepted

GetLegendGraphic and getLegendUrl function filter by extent

As specified in the docs of GeoServer : https://docs.geoserver.org/stable/en/user/services/wms/get_legend_graphic/index.html#content-dependent-legends Content dependent evaluation is enabled via ...
jossefaz's user avatar
  • 237
5 votes

Converting/using ArcGIS *.style file for/in QGIS (QML or SLD)?

There's now a tool ("slyr") which will do basic .style to qgis symbol conversion. See https://github.com/nyalldawson/slyr
ndawson's user avatar
  • 27.8k
5 votes

SLD encoding in GeoSever on Ubuntu

If files created by Geoserver are in us-ascii, it means that the Java VM is running using this encoding. In your Geoserver starting script, add the Java option (JAVA_OPTS) -Dfile.encoding=UTF-8
JGH's user avatar
  • 42.3k
5 votes

Qgis exported SLD file is not valid on Geoserver

I had to adapt many complicated, hundred of clases simbology sld made in qgis to be used in Geoserver some time ago. I tried some programs with no luck, so finally I changed a few things in the QGis ...
A_NeriWinter's user avatar
5 votes
Accepted

SAXParseException GeoServer SLD error

You can Convert Hex value of color to base 10. for example use 4359924 (BASE 10) instead of #4286f4 (BASE 16) in CssParameter tag: <CssParameter name="fill">4359924</CssParameter>
Seyed Arman Fatemi's user avatar
5 votes
Accepted

GeoJSON style in Leaflet from GeoServer

GeoJSON is a data output format, if you want GeoServer to style the output then you need to request a WMS image output such as png or jpg. Leaflet has styling options too but they are distinct from ...
Ian Turton's user avatar
  • 82.2k
5 votes

SLD - break in hatch

The solution is to use something similar to something you already used in the past (for reference Using Math in SLD file - wkt), <PolygonSymbolizer> <Fill> <GraphicFill>...
Miroslav Vujasinovic's user avatar
5 votes
Accepted

Dynamic label in SLD Style

The documentation does not include "label" as an attribute that can take expressions, it states "Most of the ColorMapEntry attributes (color, quantity and opacity) can be defined using cql expressions"...
Andrea Aime's user avatar
  • 17.5k
5 votes
Accepted

Geoserver SLD style PointSymbolizer ExternalGraphic issue

Check please if your style isn't in some workspace - workspaces has their own store, so images for styles in workspace should be placed in (geoserver_data_dir)/workspaces/(workspace_name)/styles not ...
Jendrusk's user avatar
  • 2,617
5 votes

Relative path to the plugin folder for SVG file in QGIS3 .SLD file

When you use relative path in SLD file, that path is relative to the current working directory (CWD), not relative to SLD file. If you change CWD into your plugin folder, relative path in SLD file ...
Kadir Şahbaz's user avatar
5 votes

Relative path to the plugin folder for SVG file in QGIS3 .SLD file

Well the solution was to add the folder to the SVG paths And then use .qml files to store the layer in instead of .sld files and in the .qml file specify the path relative to plugin_folder. prop v=...
axel_ande's user avatar
  • 2,044
5 votes
Accepted

Relative path to the plugin folder for SVG file in QGIS3 .SLD file

In QGIS2.18 I could specify the path to the svg marker as: :/PLUGIN_NAME/IMAGE_FOLDER/FILENAME.svg Paths that start with :/ (and qrc:///) are paths to Qt resources. I assume there is a .qrc file ...
Matthias Kuhn's user avatar
5 votes
Accepted

GeoServer styling line feature with border in conjunction

The usual way to fix this is to draw all of the casings and then draw the road centres in reverse order of importance. For example this OS road style: <sld:FeatureTypeStyle> <sld:Name&...
Ian Turton's user avatar
  • 82.2k
5 votes
Accepted

GeoServer polygon transparency (SLD style file)

You will need to specify an opacity as a CssParameter <sld:Fill> <sld:CssParameter name="fill-opacity">0</sld:CssParameter> </sld:Fill>
JGH's user avatar
  • 42.3k
5 votes
Accepted

SLD filter -it is possible to write a unique filter that would filter values ​that contains substering “NEW”

It sounds like you need a PropertyIsLike filter rather than a PropertyIsEqualsTo filter - this would allow you to write a filter like: <Filter> <PropertyIsLike wildCard='%'> &...
Ian Turton's user avatar
  • 82.2k

Only top scored, non community-wiki answers of a minimum length are eligible