Hot answers tagged sld
16
You can try these:
Altas Styler
Udig
Kosmo or OpenJump
And Qgis either natively or with the help of the SLD plugin
10
Arc2Earth
The Community Edition can only export single layers, you'll need to upgrade to Pro if you want create a single SLD file for your entire Map. After your selection, click on the Export button and you will be asked for a location to export to.
http://help.arc2earth.com/help/faqs/arc2earth-desktop/export-map-symbols-to-styled-layer-descriptor-sld
6
Take a look at OL's SLD.html example. They use SLD to style GML, but should work for WFS (a vector layer) as well.
Credit: OL's Nabble.com forum
6
No, that won't work. Geoserver is expecting an SLD, so it will fail parsing any PHP code you insert there.
What you can do is generate the SLD outside of Geoserver and pass it over when requesting the map from Geoserver. In OpenLayers it works like this:
var sld = '<StyledLayerDescriptor version ="1.0.0" ...> more xml here ...
5
In Mapserver you can either set the OPACITY at the LAYER level or for each individual STYLE. A layer can have multiple styles for each of the different line types.
This method relies on you being able to split your linestrings into different classes based on an attribute (such as year in the example below).
LAYER
CLASSITEM "year"
...
CLASS
NAME "Lines"
...
5
I assume from your question that you are generating an SLD file and then copying it to the style directory in GeoServer.
As you have seen, that approach won't work because I believe the style also needs to be registered as a catalogue item in GeoServer - if you look in the style folder you will see companion XML files with the SLD files. The best way to ...
4
Short answer is no - WFS sends you the data and then you are responsible for styling it in the client. OpenLayers uses a stylemap to style a vector layer. See http://docs.openlayers.org/library/feature_styling.html for details of how to style a vector layer.
4
GeoServer has some examples of how to style using SLD called SLD cookbook.
In your case you want to combine the Attribute-based point example and the Point as graphic example.
4
You really need to learn about SLD (yes I know it looks complex but it's quiet simple really) I'd start with http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/index.html. Even if it doesn't work out with this server if you intent to play with styling WMS layers it is the only game in town. Once you have a rough idea of what you want get and read ...
4
This is how an SVG symbol is defined in QML:
<symbol outputUnit="MapUnit" alpha="0.329412" type="marker" name="0">
<layer pass="0" class="SvgMarker" locked="0">
<prop k="angle" v="0"/>
<prop k="fill" v="#000000"/>
<prop k="name" v="/leaf2.svg"/>
<prop k="offset" v="0,0"/>
<prop ...
4
The SLD spec includes a string concatenation function. Here's an example of how to use it with labels:
<Label>
<ogc:Function name="Concatenate">
<ogc:Literal>No. </ogc:Literal>
<ogc:PropertyName>postalNumber</ogc:PropertyName>
</ogc:Function>
...
4
You have to define 2 different sld:Rules using MaxScaleDenominator. In the first one, add the style to render the label (the TextSymbolizer in my example), and specify the desired zoom level with the right MaxScaleDenominator.
In the second rule, define a different style without the label.
Basically, a rule contains a style, an only the style whith the ...
3
If you are an ArcGIS Desktop user. Have a look at GeoCat Bridge: http://geocat.net.
If you're looking for webbased solutions, try GXP Styler: http://gxp.opengeo.org.
QGIS now has native support for SLD.
3
Note that OpenLayers now supports (as of Aug 2) reading and writing of multiple symbolizers per rule and multiple FeatureTypeStyle elements per UserStyle. This greatly increases the SLD elements that we can round trip through the OpenLayers SLD parser (and consequently, through Styler).
I've also recently added support for reading and writing custom ...
3
It is a bad idea to write data to /var/www ; Check whether apparmor for apache is enabled, it may disable writing to that directory (but it is better to use a different one anyway, and chown it 1777).
sudo aa-status
(to check whether apparmor is enabled for apache)
3
I think the concept of "TextLayer" is a bit odd, you have a text property, along with a geometry.
In Geoserver (and SLD) you can have a rule with just a TextSymbolizer, to write out your text.
Some examples:
http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/lines.html#optimized-label-placement (remove the lineSymbolizer to write just text)
...
3
Easiest way is to have two SLD files and change the style in the WMS request depending on if you want labels on or off.
Alternatively you could have a separate layer with just labels and turn that on/off as needed.
Or you could try to have a local SLD file and upload it with each request but that will be slower and much harder to handle on the client.
3
Try an SLD like this, using ogc:PropertyName to include the accuracy value:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
...
3
The label placement algorithm will almost certainly decide not to show both labels as they will overlap. There are various vendor options that you can use to make it less picky about overlaps and clutter but it will end up looking ugly.
The better solution is to combine the two properties into one label (this will give you much more control over the way ...
2
The best solution I've seen for arcgis to sld conversion is GeoCat Bridge. It's not free, but then again neither is ArcGIS 10. It'll publish directly to your GeoServer, using its REST config API (and also stick your metadata on GeoNetwork).
2
I was looking for the same thing just the other day and found this http://wald.intevation.org/projects/arcmap2sld/ . There is a bit more information here http://geoserver.org/display/GEOSDOC/ArcGIS+to+SLD+tool. I haven't tried it yet though so will be interested to hear if you do.
2
Check out the SLD Cookbook for examples of this. Despite it being on the GeoServer site it is nearly all applicable to all SLD implementations (and the bits that are GeoServer extensions are clearly marked)
2
When scaling point symbols, it's good to scale them in a way that double value results in doubled symbol area (not diameter). Therefore, one has to use the square root of the value as a multiplicand.
While calculating square root, normalization can be applied at the same time e.g. using Field Calculator in QGIS.
Update:
The Field Calculator query would ...
2
I was sure that there used to be a google like SLD but I can't find it - you may be able to start with https://github.com/mitchelljj/openstreetmap-sld and convert it to give what you are looking for.
Alternatively AtlasStyler and UDig both provide graphical style editors which will allow you to build a style that matches Google as closely as you need.
...
2
The link to the rest interface curl examples:
http://docs.geoserver.org/2.0.0/user/extensions/rest/rest-config-examples-curl.html
If you upload the stylesheet through the rest API, it will be reloaded.
2
U can use the geoserver restful interface to change all the catalog objects on-the-fly including styles. Check the documentation for examples, its quite straigthfoward.
curl -u admin:geoserver -XPUT -H 'Content-type: application/vnd.ogc.sld+xml' -d @roads.sld http://localhost:8080/geoserver/rest/styles/roads_style
where "roads.sld" is a file with all the ...
2
There is a converter being developed by Dave Winslow at https://github.com/dwins/mapnik2geotools that may be able to do what you want. If you just want SLD to style OSM then you could look at https://github.com/darrell/openstreetmap-sld
2
They may not be exactly right, but I am working with modified versions of the ones included in OSM-in-a-Box (http://dev.ifs.hsr.ch/redmine/projects/osminabox/wiki). A preview is available at that first link.
You can get to the SLDs directly in the source from:
...
2
If we are talking about styling in general it differs for a WMS layer and for a feature (WFS let's say)
If your layer is WMS then you have to create your sld request (you can do that dynamically) and attach it to your WMS request. Then WMS renders the layer based on your SLD.
If your layer is a feature then rendering is a responsibility of the Openlayers. ...
2
Try adding matchCase="true" like this:
<ogc:PropertyIsEqualTo matchCase="true">
<ogc:PropertyName>Vendor</ogc:PropertyName>
<ogc:Literal>firstVendor</ogc:Literal>
</ogc:PropertyIsEqualTo>
I know it doesn't really make sense, but comparing yours to mine, that's the only difference i see.
Only top voted, non community-wiki answers of a minimum length are eligible