4

The querylayer jar is self contained, the css one has a number of other jars it depends onto (parboiled, asm, and so on), that is probably the reason why one works and the other does not.


4

The trick is to draw three dashed lines offset from each other so that a complete line is drawn. So first you draw a red dashed line with 3 pixel dashes and 6 pixel spaces, then an blue line with a 3 pixel offset and then 3 pixels and 6 spaces and the same for the green line. In SLD this would look like: <?xml version="1.0" encoding="ISO-8859-1"?> &...


3

The CSS plugin does a CSS to SLD conversion, the opposite is not always possible as long as CSS cascading is enabled. On the current developer series (GeoServer 2.9.x) we have a directive to disable cascading, e.g., @mode "Simple"; at the top of the file, that would allow one to write a SLD -> CSS translator... but it's not there yet. Contributions ...


3

Stackexchange is not the best place to discuss issues (works better for questions), please report on the geoserver-users mailing list.


3

I don't think this is currently possible in GeoServer, there is an autoWrap vendor option that allows you to specify a maximum width in pixels for a label but that breaks on white space not a specified character. It would certainly be possible for you to provide a new function or an extension to the existing autoWrap functionality


2

Recently a patch of mine was integrated into GeoTools 15 (I think) to solve this issue for title and abstract (style name is on the way). https://github.com/geotools/geotools/pull/1017 It uses the not well known possibility of CSS directives within a CSS style. @styleTitle "myStyleTitle is here"; @styleAbstract "myStyleAbstract is here"; so your style ...


2

I believe this has little to do with CSS per se, it's just that the attribute checking happens before the FTS are selected out and it's not even considering that the rule would not actually apply to the layer. You can open a ticket at https://osgeo-org.atlassian.net/projects/GEOS/summary, and even better if you can, make a pull request to fix the issue, see ...


2

At the moment there is no way to show a single title, two SLD feature type styles with two rules are going to be generated no matter what language you use (CSS, ySLD and so on, all translate back to SLD internally) and GeoServer does not yet know to merge them back into a single representation for legend. You can however provide your own hand-painted legend....


2

You can, I would suggest removing the brackets from the [color] with the code as below; [userid = 1] { stroke: color; stroke-width: 3px; stroke-linecap: round; z-index: 0, 1; } This tutorial provides a similar code block


2

As you can see in the documentation this is achieved by applying two (or more) marks to the point. So for your example something like: [usage='example'] { mark: symbol('square'), symbol('circle'); } [usage='example'] :nth-mark(1) { size: 16px; fill: yellow; } [usage='example'] :nth-mark(2) { size: 14px; fill: red; }


2

The CSS Cookbook shows an example of this * { stroke: blue; stroke-width: 3px; stroke-dasharray: 5 2; }


2

Here is the CSS solution for geoserver: /* ---------------- BUILDING ------------- */ /* @title Building 60K - 5K */ [building='yes'][@scale>5000][@scale<60000], [building='house'][@scale>5000][@scale<60000] { /* In EPSG900913 so offset equates to meters */ ...


2

The CSS syntax does not allow to use functions with a colon in the middle of the name. Instead of building it as a WPS process, built it as a filter function instead, and you'll be able to give it a simple name callable by CSS. See: http://docs.geotools.org/latest/userguide/tutorial/function.html


2

This happened: https://osgeo-org.atlassian.net/browse/GEOS-8524 The ticket has been solved, but in the meantime, you can just remove the old asm 3.1 that was contained in it and it should be back working.


2

CSS is "cascading", so the rules are getting mixed with each other, generating two rules with the same title: First rule covers 1:1 to 1:15k, and has the label and the stroke Second rule activates past 1:15k, and only has the stroke See also: http://docs.geoserver.org/latest/en/user/styling/css/cascading.html I can think of two options: Try to use "flat" ...


2

id is a keyword in CQL, you cannot use it like that. If you have a "id" attribute in your data, and it's visible in GeoServer layer page (e.g., it's not actually the primary key in a database, or you told the store to expose primary keys) then you can try using "id" (notice the double quotes). As a second note, filter functions do receive the entire ...


2

Try using stroke-offset, that can be sized in pixels, e.g.: stroke: gray, green; stroke-offset: 0, 2; stroke-width: 1, 2;


2

CSS eventually gets transformed to SLD, where transformations happen at the FeatureTypeStyle level. So you need to force two separate FeatureTypeStyles. The translation code does not do it for you, but I believe you can force it manually by setting a different z-index in the two rules.


1

* { fill: [recode(strTrim(name), 'Akmola Region', env('color_Akmola','#6495ED'), 'Aktobe Region', env('color_Aktobe','#B0C4DE'))]; fill-opacity:0.4; stroke: lightgrey; } /* &env=color_Akmola:%23ff0000 */


1

If you can make sure during preprocessing/querying your data that the lower left corner is always the n-th (e.g. first) point in the geometry data, you could use the pointN function to get this point for labeling. Not the cleanest solution, but should work...


1

It seems not to be implemented in the CSS parser so if you wanted to you could (or sponsor someone else to) provide a pull request to implement it.


1

If the band is named "dir" and it is in degrees, then the following change should do: <Rotation> <ogc:PropertyName>dir</ogc:PropertyName> </Rotation> You might still have to account for differences in expected rotation direction (clockwise vs counterclockwise).


1

In the SLD, you would need to use a CQL filter for the dynamic external graphic. One trick in CSS is to write this CQL filter as plain text that will later be interpreted in SLD. * { mark: url('${image_url}'); mark-mime: "image/png"; mark-rotation: [rotation_angle]; }


1

I had the same problem and it worked like this for my CSS style: * { label: [PART1][PART2]; -gt-label-auto-wrap: 1; } For me it worked with '1', maybe you need to adapt this value. If you want it to work in your SLD style I think you need to really add the return between the square brackets in your document. So write: <Label> <ogc:...


1

I've never tried it in CSS but in SLD you would use a CDATA block containing the new line: <ogc:PropertyName>Name_1</ogc:PropertyName><![CDATA[ ]]><ogc:PropertyName>Name_2</ogc:PropertyName> so you could try: * { stroke-width: 0.2; label: [STATE_ABBR]<![CDATA[ ]]>[OTHER_VAL]; label-anchor: 0.5 0.5; font-...


1

Geoserver uses SLD stylesheets by default. They are relatively simple and intuitive to use. You can acces them via Data/Styles in the main window. Geoserver has detailed documentation on this: http://docs.geoserver.org/latest/en/user/styling/index.html There is also css extension that allows you to use css instead (it is converted to sld by geoserver): http:...


1

I think the problem is use of 'or' inside the selector. You need to use ',' to imply OR in the sense you mean. Whereas a space between indicators mean AND See here for details about using selectors: https://tilemill-project.github.io/tilemill/docs/guides/selectors/ EDIT: Also you can tidy up and not have so many LIKE statements by using regex in the ...


1

It looks as if you are overwhelming the translation engine with choices, please read this for full details but the short answer is to add @mode "Simple"; at the top of your styles to reduce the amount of simplification the translation engine tries to apply. You could also try the Exclusive mode but you will need to be patient (and probably increase the ...


1

Based on the documentation it appears your query would be written as: [name LIKE '%police%'] It doesn't appear that you can change the wildcard characters based on this: Patterns use _ to indicate a single unspecified character and % to indicate an unknown number of unspecified characters.


1

GeoServer rendering functions are independent of the styling language used. For examples of function usage in CSS see this page. So something like (completely untested): *{ vec:PointStacker(parameter(data),parameter(cellsize,30),parameter(outputBBOX(env(wms_bbox)),.... }


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