Mapping in GeoServer with SLD and CSS

Video in TIB AV-Portal: Mapping in GeoServer with SLD and CSS

Formal Metadata

Mapping in GeoServer with SLD and CSS
Title of Series
CC Attribution - NonCommercial - ShareAlike 3.0 Germany:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date
Production Year
Production Place
Seoul, South Korea

Content Metadata

Subject Area
Various software can style maps and generate a proper SLD document for OGC compliant WMS like GeoServer to use. However, in most occasions, the styling allowed by the graphical tools is pretty limited and not good enough to achieve good looking, readable and efficient cartographic output. For those that like to write their own styles CSS also represents a nice alternatives thanks to its compact-ness and expressiveness. Several topics will be covered, providing examples in both SLD and CSS for each, including: mastering multi-scale styling, using GeoServer extensions to build common hatch patterns, line styling beyond the basics, such as cased lines, controlling symbols along a line and the way they repeat, leveraging TTF symbol fonts and SVGs to generate good looking point thematic maps, using the full power of GeoServer label lay-outing tools to build pleasant, informative maps on both point, polygon and line layers, including adding road plates around labels, leverage the labelling subsystem conflict resolution engine to avoid overlaps in stand alone point symbology, blending charts into a map, dynamically transform data during rendering to get more explicative maps without the need to pre-process a large amount of views. The presentation aims to provide the attendees with enough information to master SLD/CSS documents and most of GeoServer extensions to generate appealing, informative, readable maps that can be quickly rendered on screen.
Presentation of a group Standard deviation Server (computing) Texture mapping Mapping Open source Multiplication sign Projective plane Range (statistics) Execution unit Sound effect Bit Flow separation Formal language Simplex algorithm Personal digital assistant Electronic visual display output Codec Endliche Modelltheorie Extension (kinesiology) Physical system
Point (geometry) Medical imaging Standard deviation Polygon Core dump Triangle Genetic programming Energy level Perturbation theory Mereology System call Frame problem
Decision tree learning Point (geometry) Complex (psychology) Standard deviation Server (computing) Texture mapping Computer file Java applet Code Genetic programming Parameter (computer programming) Computer font Food energy Rule of inference System call Web 2.0 Medical imaging Type theory Uniform resource locator Arithmetic mean Factory (trading post) Triangle Genetic programming
Point (geometry) Software developer Polygon Genetic programming Triangle Window
Web page Pixel Uniform resource locator Different (Kate Ryan album) Core dump Polygon Genetic programming Computer programming Equivalence relation
Area Diagonal Multiplication sign Genetic programming Bit Shape (magazine) Field (computer science) Number Different (Kate Ryan album) Computer configuration Phase transition Genetic programming Spacetime
Polygon Expression
Category of being Interior (topology) String (computer science) Genetic programming Normal (geometry) Sound effect Circle Genetic programming Spacetime
Pixel Genetic programming Circle
Point (geometry) Presentation of a group Standard deviation Pixel Computer configuration Interrupt <Informatik> Number Spacetime
Point (geometry) Default (computer science) Group action Server (computing) Multiplication Inheritance (object-oriented programming) Variety (linguistics) Multiplication sign Displacement Mapping Range (statistics) Polygon Sheaf (mathematics) Bit Shape (magazine) Number Category of being Goodness of fit Software Computer configuration Authorization Position operator Resultant Row (database)
Point (geometry) Revision control Texture mapping Computer configuration Metaheuristik Polygon Zoom lens Genetic programming Energy level Set (mathematics) Function (mathematics) Number
Dynamical system State of matter Concentric Expression Function (mathematics) Client (computing) Number Medical imaging Message passing Personal digital assistant Hypermedia Endliche Modelltheorie Form (programming) Physical system
Metre Distribution (mathematics) Game controller Maxima and minima Parameter (computer programming) Element (mathematics) Medical imaging Gaussian elimination Software Vector space Personal digital assistant Computer configuration Electronic visual display Endliche Modelltheorie Acoustic shadow Reading (process) God
Point (geometry) Beat (acoustics) Building Presentation of a group Game controller Pixel Transformation (genetics) Connectivity (graph theory) Direction (geometry) Parameter (computer programming) Order of magnitude Machine vision Touch typing Energy level Acoustic shadow Physical system Area Projective plane Moment (mathematics) Limit (category theory) Process (computing) Vector space Personal digital assistant Musical ensemble Geometry
Medical imaging Auditory masking Source code Image processing Morley's categoricity theorem Generic programming
Game controller Texture mapping Observational study State of matter Polygon Source code Combinational logic Sound effect Function (mathematics) Graph coloring Rule of inference System call Medical imaging Sparse matrix Vector space Auditory masking Personal digital assistant Buffer solution Endliche Modelltheorie
Message passing Software Bit rate Computer configuration Energy level Physical system
Game controller Scaling (geometry) Inheritance (object-oriented programming) Tesselation Weight Image resolution Multiplication sign Source code Sound effect Set (mathematics) Database Limit (category theory) Variable (mathematics) Number Attribute grammar Fraction (mathematics) Data management Arithmetic mean Radius Telecommunication Order (biology) Universe (mathematics) Energy level Quicksort
Stapeldatei Multiplication Code Structural load Data storage device Stress (mechanics) Client (computing) Limit (category theory) Element (mathematics) Type theory Software Semiconductor memory Personal digital assistant Order (biology) File system Hard disk drive Moving average Quicksort Fingerprint Computer architecture
PPLR charter
about some problems with the display system OK so many things that I'm in this presentation is about nothing would induce a room with a the CSS I'm going to show you are a showcase of the just over a mapping
abilities and compare and contrast this practice of which you languages so 1st of all you interaction my employer it's just solutions is the colonies on the input and these companies a strong continue to produce a range of tools we also contribute to genetic journal the some pictures for c in and so on so we heavily involved in several open source projects so today said that I'm going to introduce a bit of mapping units of the essence S. uh so this is what you are probably used to use your server it's very well what is the standard simplex effects on obeys its marbles but somebody from its own nationals and then we have a duty assessing just over which is an extension model that you can which uses this syntax it's of so much simpler to understand them and the region right but it's not a standard there are several assesses for maps out there there is the 1 from comfortably be there this cascade naked there's users as they are not compatible with each other so you can move around this time for 1 problem to the other so they're very nice in that you can quickly but we your starting my hand but on the other side you cannot move that result from 1 problem to deal with 1 nice thing about the user 1 is that it's actually a translator plus so the undercover so it generates the mess of the fight or thing in case you want to move away you also have the use of these this so I'm going to learn going to go
through 0 point aligned polygon unrest styling and some extras so without any
part of the way of how do I style symbol symbol with as so the and and CSS that say I have mountain peaks and I want to spend them with a little triangle mature out how well you can see that the this of the image of the frame of very well anyway so I'm doing a point symbolizes with a graphic with a mark inside and we were using a well known where there are like 5 1 0 marks in the standard and some specifying the corazon HTML call that compared with a CSS this says it's much shorter and it's easier to understand in my opinion I matching everything with a simple called triangle and there is a special selected call hot but we use it to a specified the caller all of them are because if you would feel at the top level you're trying to say I want to feel polygons and these are points instead of using this special select you're saying I want to fulfill their mark as you can see we can use named core which is also nice so let's pump up
on the complexity of the 2 let's say I have 6 different by 4 points I wanted to display and I'm going to start using a triangle for the mountain peaks but I want to use a legal prepared you measures for everything else like airports you consider shopping carts you can see the crosses for their cemeteries the books for the schools and so on so how do I do that thing that I minus of the starts to get other painful i have to specify a few there in XML of this 1 as always the call these C. 3 at the 1 because that's how the school then the user is external graphic with a URL to walk up the energy that's and it's uh to make that little more than US 600 lines of examined for 6 rules which she is my 1 and it doesn't profit which what if I wanted to use CSS instead of freedom again it's it from images so it's difficult to to see some and I think I can do anything about it so sorry any race is just 7 lines compared to 600 switch it's a marked improvement in the uh mn there the rule of the Baltimore is the 1 that specifies the type of symbol is the idea of being there a marker Coleman than the URL to the to the file and the ruler of the top using standard from specifying of the delayed what if I want to make it even shorter than they can move the name of their time of day he must find and I want to use into the active use of my data and they're like an expanded using that syntax of dollar curly brace image that embrace sigh I have ability to expand after the names and with there you else uses CSS but you of fully you can do the same to something in this main means that the whole map can be coded with 15 lines of thought of CSS instead of you know the 600 original lines of recently in OK I still
talking about points you can you can use OpenType fonts as far as marks so there are like 6 well-known marks and so the but server we made of a names likeable and extensible so that anyone can in Java can create new markets and that these marks are normally a full and symbol factories and that can be driven by some parameters in the name like in this example I'm extracting symbols from a web things and they're all have to do is to use name that sounds like PDF columns the slash and then the fonts name and then the code of the chart that symbol they want to use in the code you can get from the charm of the kitchen
while another example also I X similar reflecting is a wind Bob's with mark wind blobs are are rather complicated the symbol depending on the style the strength of the window you start with a with a little point and then aligned and then you start having than the takes on the side and then it becomes the triangle if you are be beyond a certain speed in there if you are in the southern continent you to to the takes on 1 side of the of the wind barb but the genome development on the other side so it's not a sophisticated symbology and we encode all of that being in a symbol name during in which we specified the speed in the whether or if you want to specify also the atmosphere you can do that and so this helps creating dynamic remarks are going to show you an example later so this is what I want to
say about points the switch the polygons
of polygon filling solid feeling is normally using the the amount was supposed to be grade of white but anyways so in a so the idea of of of 104 you simoizen with a fill in their core expressed x emotional in and then I'm going to say 0 yeah this program around the follicles is going to be half a pixel and the equivalent in CSS is much easier to understand that I use from user name it costs and other than the syntax is really really cold what
quantifying moving tool mob more sophisticated feeling I can feel polygons by repeating images and into it like you know the old age of pages in which we used to have these repeating backgrounds and you can see a lot of stuff we would it this little symbol has been taken from OpenStreetMap and basically saying OK pollutants summarize graphic feel and then Cybergraphic that I want to repeat over and over and over and this is the syntax in the uh so the in that it is more 1 of all these different syntax ina CSS is just 1 line feel URL and and the location of the invisible
sometimes especially in in Italy you wanted to feel let with the i repeated lines and I know it doesn't show there but the their the shape as been filled with the vertical lines and then the 1st days or even the lines in the 2nd phase a diagonal and then crossing and so on you can see that there that he'll single and imagine a particularly excited the field so we have a special of symbols learning especially for hatching and uh again I guess you
probably don't see but there was an animal a colleague representing areas that can be flooded so without cross-hatch and uh this can be done by specifying very few columns symbol shape times in CSS in a slightly more complicated way in something sometimes what you really want when repeating symbols is a really spacing them a bit you don't want them to be touching each other and that we have and the option to that it's called the graphic merging it's like they're graphic merging CSS so if you specify 1 number it's uniform spacing around the all symbol but you can specify 2 numbers to ever different spacing in their example and practical collection and you can even specify 4 numbers who have a different spacing top left right you want
on so this is the simpler for a polygon let's see what we can do with
lines of course within the solid lines of initially you would use the lines symbolize the with a stroke and stroke we have in the in in CSS uh it's again more or less the same semantically but with a much shorter expression and the courts so with the lines you
can do dashing uh the art of the is that you cannot see the string I'm sorry but it's about line so it's about space not space looks baseline and that you can do that we using them than the charade that syntax uh in which you basically specify if they just give remember like to itself 2 pixels spinning down to peaks and then outside and dry river or anything in them and the benefits and so on so all of a sudden the success in Texas so much nicer I'm working on a and usury you
can mix and match that she is with remarks and graphics so you can repeat a little symbol along the line and I made after that that this little example in which so I'm drawing a line and then drawing a circle and then drawing a line in the normal inner circle effect which choline symbolizes 1 on top of each other properly synchronized so that when you wanna spend down the than that and using a special property called the best offset to the move 1 of the 2 symbols of it so that it gets into the spacing of your of your and this is the
very same of thing that you can do with the CSS with CSS instead of specifying 2 different line symbolizes like any as of the you visit this as twice the property so that I have a struck background which is a continuous line and then the comma symbol circle so I'm going to think 1st we the line and then with a circle and then specified in assuring them some pixels down for thinking so laughter and so on and for the silicon columns that is going to be sick sperm pixel down making the peaks of and then the best offset by I offset only the and the line to make it aligned with the the whole speaking the circles of what
about labeling texts the mothers
all labeling is a very long topic and it would require some presentation I just want to show you some of the options that we have a beyond that the standard so beyond here so the to make a good looking labeled mark you have to normally make some effort of what and you and so we have a larger number of and options that you can use to control how the label as go are going to displaying going to show you some examples
so this 1 is a point to map with the labels uh below it so you can see that the label of his being placed below and the the the labels are being wrapped so we have our using the old overlap of interruption after 100 pixels to make to just over look at a want very lonely will not be below the peaks of Robert automatically so that we study doesn't consume about the horizontal space so you might have our names as long as you want such as the Democratic Republic of book of Congo and register OK wrap it up and 3 lines because that's going to be too long in the old
labeling is normally of challenging for variety of reasons so we have a number of then the options that that that we want to use this example uses the CSS and syntax so I'm a specifying label group to tell just server to take all the little pieces making up the line was your money in old network you have 15 records for a 1 line because they have broken think sections so you have a literally at the same feature displayed many times and then with the label group you tell it OK they call the pieces if they have the same label them together label a single long like not so don't try to label each little piece of it on and then I enables line 2 of the late is very labels follow the shape of the road much displacement of to tell it so well OK some of the natural position of the label in the middle of the line is easy then you can move it I allow you to move it a bit goes you notice I we never paint to labels on top of each other authorities there is an option to tell it to do that but you know you use it um
yes and therefore polygons I have more or less the same business as some point symbolizes so I am on October up option again I have a much displacement of to allow it to to moving inside a polygon bits and the idea of our goodness of fit property telling well then display the label if it's not that person inside the public so sometimes you have our use multi super tiny polygon with that is bigger label and not only the that because you can see the polygon anymore so there's this goodness of fit the value that you're ranges between 0 and 1 it's a percentage so the default I think it's 0 7 so by divulges rewards display label it it's not so much as an aside but you can tweak to get a different result and a nice thing is that uh
uh sometimes a symbol is so important but you don't want a label to go over it but in your map and you can mark it as our label obstacle there's and option for the can be applied normally 2 . 2 can be applied also planar polygons but it doesn't work very well for them but for point symbolizes is there are marks on your map that you don't want to the labels to cover you mark them as the obstacles and the levels will stay away from them also there is uh a number of people that
are in the business of free laying out their labels they are not like and you server do it because they want to aim of Cartographic output adjuster regards the layout of the labels on the fly so it has to be at this year's a set of heuristics that are not perfect these guys say OK we got to this is i z and the French National Cartographic institution of the they say OK we have a map of France former 20 zoom level we layout and Marcel delay labels without of intelligence artificial agreed on whatever that makes almost perfect labeling then that we have humans check you can fix it by hand and then we have a point map with on to their labels should be placed and users should not be messing with that it's possible to tell just to do that adding those than the options you turn off the conflicts of conflict-resolution sorry turned off because the solution and introduce users that it's OK to place a light label even goes outside of them and goes to oxygen you can get pretty laid out labels to switch us styling
vs. citing has been relatively
boring until uh so normally if you have an aerial image you don't cite it's just visible as it is but what if you have additional additional model the concentration of a pollutant or anything that is out of Sir face represented roster which the peaks of contain and number in that case you use a quorum hyperparameters are as of the tool to pass state a caller with a value and then on the caller with another value and tell the system OK I'm giving you a reference is linearly interpolate between them so you can get a continuous appearance of on the course on your now recently there we added the ability and injures automated to actually put expression into their values so that you can tweak our dead decorum up from the climb so it's not fixed anymore you can put this in the function uh and these are the members ically setting the low value to load the and the value to me you in the media money to meet you in the high-value I and then I can pass low medium and high values from their request so that makes for a dynamic form of today the client can decide how to display In GeoServer to 9 and
to wait uh uh were also we want but for the we will have support for his shading also known as shaded relief of in this case I'm showing the CSS syntax selected this wasn't a text of of an image so I have my corner which has the and distribution model display and then I have a couple of elements to specify that the forefront don't so how much I exaggerated in elimination because you know there the is utterly quite flat even if some places of 8 thousand meters uh in the uh and and I can have the the shadows either be placed on the the corrupt or if I want to I can not use a quorum up and have the shadows the applied to a previously rendered vector much so maybe I am I don't network awesome style and I can apply shows we have
improved a conference the nascent um having some vendor options that help decide that we should freedom of God 1st announcement I really going to use in the control of the size the obligation parameters so that you can and to you know how they're conversant announcement is done in this case is a and doing a normalized with a stretch to mean maximum but then there are only other reasons planting back to the and and so on and then uh we I we can set the minimum maximum in mind reading salivating the called of the world so that the values automatically which helps because sometimes the minimum maximum are all players that with we would like not to
all we become the 1st formations nerd due to induce a
we have extended the so the CSS but in such a way that it allows you to transform a beat either the geometry or the layer reform painting at this is 1 example in which I'm doing the shadow of the building by simply taking the geometry of in the beat and painting at the darker and then I think the polygraph that the building on top of it so this is called durative information if available in both the the CSS or I can do more than take the whole layer and transform it into something else basically applying a special analyzes are written on the fly before printing it in this case I'm using it so the and and telling uh the the system OK you got arrested it's vision others from although I wanted to extract the control lines of these levels uh so the discovery we give me back lines with the elevation of touch to it and then I can start it as lines and this is done on the fly and it's also fast because it's always working only in the area in which it's applied and a that solution which I'm looking at the so yes but there are several transformation that 1 can apply all none of them is available in assesses the moment of the 1 limitation of successive doesn't yet support for rendering of relations this is another example in which I have on the but the to bend the bands contain there the component of the winter the projections of the wind vector on the 2 axes I'm taking this process which is called the rest of the point election uh to turn all the pixels in 2 points I'm providing a parameter of subsampling so that I don't expect actually all the points that are visible but maybe once every 10 or maybe 15 in the uh once I have have the points with a unique of born infected little must in in a so the to turn them in to magnitude and direction and then I can go there the wind was so 1 single style does all of this and it does a kind of like
so core-binding on composite thing
uh and getting into to the end uh so efficient that we have introduced there are just over 2 7 is the ability when drawing multiple layers to compose them uh using certaine image processing there are many uh ways
uh but they can become categorizing of a composite thing and for many other composite thing is about to begin into images and putting them together in such a way that they must be told basic so I am a destination of image which is what I owe their own so far in the source image which is what I'm drawing on top and there are with this mission it they can basically cookie-cutter their destination with the source which source of Pope I can but put to their the source on top of this nation but only when the destination is only whether this nation so transparent and so on so you can realize that you can use this as a generic masking tool between 2 layers and you
can design 1 of the layers to be a in mask so in this case I'm taking usually just about top states example I'm buffering of and actually drawing the borders we have very thick line and then not using that as a mask to generate a ceiling inside the polygon uh in effect like having the the line it looks like a borderline but it's only the only inside the body so this is an example of 1 or 2 possible example masking
color-blending blending studies about taking the original call of the 2 images and applying certain rules to mix them together normally we just stick that the source image on top of the distinction or if we have a sparsity we average the colors uh in some way well uh with the current lending you can control how the combination happens and 1 common way to make so this is the initial model with that of vector map is to use the multiply it gets a much better output effect down and now that the normal of translucency control final topic is an ordering just over we
added the ability to control it this at all that which is very important for road networks and and such in which you have under passes over policies and then you have that a system and so on so you might might have 5 or 7 different is that levels of variably are intersecting each other we had having the option to control their how they did it dies how we sorted while a rating and then I think and
while the overall effect is like this this is a really be easy their place in Germany with the highways and railways and so the radius r below the highway some of the example that I read some of the values of all of all that I used so that are like 13 different of levels in this in this map and if you don't have a that control you don't get the true picture of what's going on because there are while because that that the lines are the in whatever that we get them from the database that we deserve electron can say In what's the correct order funding and so with this
thank you goes and questioned the and then I wanted to ask about the scales if we have some the tile sets over the fixed those levels and basically this minimax killed in the managers are Morris Morris fixed or what and you recommend as an instrument to define this values for use in its CSS so that's I there is well the problem is that styling and levels are controlled into completely different places this new levels are controlled when you define the sets in university in there it's not like those 11 1 4 1 and it's that has the same meaning as levels from level 1 is in great so I I I don't know about you but normally inducer would publish at least attribute set amount so that number just before and there were marketed and sold in there there's a little our sort well not exactly twice as much as there the other 1 like the skin denominator in as level 1 and uh will cater like of fulfill this can it was limits level 1 and level just before so they can be completely these aligned so I don't have a good day I had that answer I think anything new anything maybe with uh with of variables could defined says as the set of variables which reflect basically my in my resolutions and use of them than later on and define the visibility of parents maybe not so I'm thinking of extending the CSS is so that the support the some of the source or what was the other 1 last than uh syntax is updates and winning the final viable cities definitely on the plate is not only 1 catch all the work so far in CSS has been done in my spare time and uh for the foreseeable future I think I'm going to go back but fixed and you cervical is we accumulated a member of the conductor like this so thank you bottom you this source is there so everybody can improve this if they want and of course there's always the possibility of commercial support support it and like I could be doing during working hours on the Net last example of the easy or on
how does that affect the drawing speed when to do something that complicated high a it depends a lot on how many features you have so in just a we have a streaming arch architecture which means we never load of the full data needed to do something in member so if we have to respond to a lot the professor request that would require either not thinking of ice we actually read the features in batches of 1 thousand so that the memory footprint is really no in the uh of we do the same for rendering never loaded the food that said before and if we know the wise while rendering and then draw Draw way the Xs so for that are there there's a catch we allow cross layers of air and that might cause some issues as you as you may imagine with a single layer it's just a matter of sending out sort by a the problem that if you're using multiple feature types that you wrote casing even with a single that on the European being too old and let let em do OK using wind with a thick line and the line the simplest case I have to take the lowest isn't whereas a order and paint on the all the the client wants a richer than X is a door that I have to go back and think all that England and then start thinking the decline of the next to the and so on and so on so long story short we wanted to be performance but we cannot afford to be memory-bound so there is a hard limit of 1000 features if the features are less than 1 thousand to paint we the main memory sort them and scholar back and forth back and forth in memory that's very fast before they are more we start saving them all on this In the roll back and forth on on the on the file systems instead of this storage is re-optimized the it's hand-crafted code for writing and reading which is as fast as I could make it but of course it's going slow so if you practice and or their complicated that has more than 1 thousand years ago on the element in its you start paying a price how how how were highly depends on your hard drive speed like if it's a local stress it's probably going to be fine if you're going to the network you probably not so much exactly solve the problem of the was the worst in the the lines the thefts


  287 ms - page object


AV-Portal 3.19.2 (70adb5fbc8bbcafb435210ef7d62ffee973cf172)