Hi Jody, Thanks so much.

I am definitely styling on Scale and Attribute, for example

[landuse='forest'][@scale>60000][@scale<100000]{
  z-index: 30;
  stroke: #CBEBB6;
  fill: #CBEBB6, url("
http://icons.markware.net/geoserver/icons/img/areas/forest.png";);
  fill-size: 20px;
}
[landuse='forest'][@scale<60000]{
  z-index: 30;
  stroke: #CBEBB6;
  fill: #CBEBB6, url("
http://icons.markware.net/geoserver/icons/img/areas/forest.png";);
  fill-size: 30px;
}
[landuse='commercial'][@scale<1000000] {
  z-index: 40;
  stroke: #5F9EA0;
  fill: #87CEFA, url("
http://icons.markware.net/geoserver/icons/img/areas/commercial.png";);
  stroke-width: 0.5px;
  fill-opacity: 0.75;
  label: [name];
  font-size: 10px;
  font-fill: #000000;
}
(I use scale a lot to change the colors or graphic fills, and have a ton of
poly attributes to style)

I use z-index a lot to get the featuretypestyles in the right order.

I need to get my head out of SLD thinking .. I think that is my biggest
issue.

I would love to attend your workshop, but I am quite remote in the
philippines so it is not practical for me, unfortunately. It is a loong way
to travel, but I do avidly look forward to the published papers

Regards

Mark




Regards

Mark Cupitt

"If we change the world, let it bear the mark of our intelligence"

See me on Open StreetMap <https://www.openstreetmap.org/user/Mark_Cupitt>

See me on LinkedIn <http://ph.linkedin.com/in/markcupitt>


*See me on StackExchange <http://gis.stackexchange.com/users/17846/mark-c>*

===============================================================================================
The contents of this email are intended only for the individual(s) to whom
it is addressed and may contain
confidential or privileged information. If you are not the intended
recipient, you must not disclose, copy, distribute,
or use the contents of this email. If you have received this email in
error, please notify the sender immediately and
delete the email and any attachments.
===============================================================================================



On Wed, Jun 25, 2014 at 12:17 PM, Jody Garnett <jody.garn...@gmail.com>
wrote:

> I expect you are producing a "power set" between when you combine your two
> files, this is often done by:
> 1) only using rules to style
> 2) doing your theme based on more than one aspect of your data
> - example; theme based on scale and attribute
> - example: theme based on two attributes
> - example: theme based on scale and several attributes
>
> You can notice this if your resulting SLD has many rules that accomplish
> the same thing, except at a different scale (or with a different attribute
> combination).
>
> Recommendation:
>
> 1) Use rules for scale first! Since that *only* works for rules.
>
> If you need to "break up the party" you can set up a group layer with
> several child layers - each child layer configured with CSS for a a
> different scale. Clients can draw the group layer and GeoServer will draw
> the appropriate child based on scale. This also has the *key* advantage of
> allowing you to draw simplified datasets when zoomed out which is a killer
> optimisation technique.
>
> This approach will prevent a power set based on differences of scale, you
> are stuck with some duplicate configuration but you would get that anyway
> as you optimise performance.
>
> 2) Use a combination of rules and symbology encoding functions when
> theming based on more that one attribute. This is especially useful when
> the aspect you are theming is contained like font size or polygon color.
>
> -
> http://boundlessgeo.com/2012/08/thematic-map-creation-with-sld-is-now-much-easier/
>
> Here is an example of recode from a workshop I am doing at foss4g this
> year:
>
> * {
>   fill:[
>     recode(mapcolor9,
>       1,'#8dd3c7', 2,'#ffffb3', 3,'#bebada',
>       4,'#fb8072', 5,'#80b1d3', 6,'#fdb462',
>       7,'#b3de69', 8,'#fccde5', 9,'#d9d9d9')
>   ];
>   stroke: gray;
>   stroke-width: 0.5;
> }
>
> The alternative is:
>
> [mapcolor9=1] {
>    fill: #8dd3c7;
> }
> [mapcolor9=2] {
>    fill: #ffffb3;
> }
> [mapcolor9=3] {
>    fill: #bebada;
> }
> [mapcolor9=4] {
>    fill: #fb8072;
> }
> [mapcolor9=5] {
>    fill: #80b1d3;
> }
> [mapcolor9=6] {
>    fill: #fdb462;
> }
> [mapcolor9=7] {
>    fill: #b3de69;
> }
> [mapcolor9=8] {
>    fill: #fccde5;
> }
> [mapcolor9=9] {
>    fill: #d9d9d9;
> }
> * {
>   stroke: gray;
>   stroke-width: 0.5;
> }
>
> Now if you imagine doing this with scale rules as well the power set idea
> is clear:
>
> 1) With mapcolor9 rules and 5 zoom levels we have 45 SLD rules generated
> 2) With mapcolor9 recode function and 5 zoom levels we have 5 SLD rules
> generated
>
> Hope that helps Mark.
>
> If you want to attend the workshop it is here:
> https://2014.foss4g.org/schedule/workshops/
> Both the docs.geoserver.org and foss4g websites are down for me right
> now, hopefully they will be back when you get this.
>
> Jody Garnett
>
>
> On Wed, Jun 25, 2014 at 12:40 PM, Mark Cupitt <markcup...@gmail.com>
> wrote:
>
>> Good Day all. I am still having trouble with the Geoserver CSS Module
>> with large CSS files.
>>
>> I have two smaller CSS files that process nicely and produce expected
>> SLD, but when I combine them, they produce a humungus 84K line sld
>>
>> I am certain I am missing something, or have I have possibly hit a
>> limitation of the CSS module.
>>
>> ANy help or suggestions are very much appreciated.
>>
>> The files are available at http://markware.net/css.zip
>>
>> osmph_polys.csss  (4 seconds to process)  (160 lines)
>> osmph_polys.sld ( result = 2895 lines)
>>
>> osmph_polys_landuse.csss  (5 seconds to process) (357 lines)
>> osmph_polys_lamduse.sld ( result = 1209 lines)
>>
>> osmph_polys_combined.csss ( 9 minutes to process, 100% cpu, 100% java
>> Container Memory) (500 lines)
>> osmph_polys_combined.sld (result = 80,440 lines)
>>
>> Regards
>>
>> Mark Cupitt
>>
>> "If we change the world, let it bear the mark of our intelligence"
>>
>> See me on Open StreetMap <https://www.openstreetmap.org/user/Mark_Cupitt>
>>
>> See me on LinkedIn <http://ph.linkedin.com/in/markcupitt>
>>
>>
>> *See me on StackExchange
>> <http://gis.stackexchange.com/users/17846/mark-c>*
>>
>>
>> ===============================================================================================
>> The contents of this email are intended only for the individual(s) to
>> whom it is addressed and may contain
>> confidential or privileged information. If you are not the intended
>> recipient, you must not disclose, copy, distribute,
>> or use the contents of this email. If you have received this email in
>> error, please notify the sender immediately and
>> delete the email and any attachments.
>> ===============================================================================================
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Open source business process management suite built on Java and Eclipse
>> Turn processes into business applications with Bonita BPM Community
>> Edition
>> Quickly connect people, data, and systems into organized workflows
>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> http://p.sf.net/sfu/Bonitasoft
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to