MapServer - Make beautiful maps
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 351 | |
Author | ||
License | CC Attribution 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/69094 (DOI) | |
Publisher | ||
Release Date | ||
Language | ||
Production Year | 2022 |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
| |
Keywords |
FOSS4G Firenze 2022150 / 351
1
7
13
22
25
31
33
36
39
41
43
44
46
52
53
55
58
59
60
76
80
93
98
104
108
127
128
133
135
141
142
143
150
151
168
173
176
178
190
196
200
201
202
204
211
219
225
226
236
242
251
258
263
270
284
285
292
00:00
Server (computing)Configuration spaceTexture mapping
00:26
Open setInformationSystem identificationAcoustic shadowObject (grammar)Element (mathematics)Point (geometry)PolygonGrass (card game)Digital signalService (economics)Digital filterSpring (hydrology)Sound effectString (computer science)Compilation albumMotion blurIntegerData typeSocial classNormal (geometry)VolumenvisualisierungComa BerenicesSound effectSymbol tableMultiplication signAcoustic shadowVector spaceHill differential equationDigitizingServer (computing)Network topologyCodeIntegrated development environmentGrass (card game)MappingOperator (mathematics)Filter <Stochastik>Compilation albumWriting1 (number)Image processingPoint (geometry)PolygonObject (grammar)Projective planeElectronic mailing listDifferent (Kate Ryan album)Regular graph2 (number)Line (geometry)Musical ensembleScaling (geometry)Texture mappingTranslation (relic)Medical imagingInstance (computer science)Set (mathematics)SoftwareArchaeological field surveyComputer animationXML
07:36
Digital filterInformationOpen setSystem identificationCache (computing)Acoustic shadowData typePoint (geometry)Social classComa BerenicesCompilation albumVector spaceSymbol tableGrass (card game)PolygonClique-widthSingle sign-onComputer fontRevision controlInterior (topology)Shape (magazine)DiagramVoronoi diagramPolygonBlock (periodic table)Shape (magazine)Line (geometry)Grass (card game)LoginSymbol tablePattern languageOffice suiteInstance (computer science)AlgorithmWebsiteBitAcoustic shadowGraph coloringSet (mathematics)Parameter (computer programming)Filter <Stochastik>Cache (computing)Sound effectCuboidNetwork topologyTransformation (genetics)Branch (computer science)Software testingTask (computing)ForestOnline helpElectronic mailing listException handlingVector spaceComputer fontMultiplication signGeometryOperator (mathematics)HexagonAnalytic continuationComputer animationXML
14:46
AngleSoftware testingOpen setInformationSystem identificationParameter (computer programming)PreprocessorInterior (topology)Function (mathematics)Set (mathematics)Local GroupSocial classRootMappingLine (geometry)Symbol tableCollisionData typePoint (geometry)Square numberPosition operatorLine (geometry)Hardy spaceFigurate numberGroup actionMultiplication signSet (mathematics)KlassengruppeRootPersonal area networkHoaxDistanceSquare numberElectronic mailing listDifferent (Kate Ryan album)Symbol tablePopulation densityOperator (mathematics)CircleConfiguration spaceTexture mapping1 (number)CuboidGraph coloringParameter (computer programming)Latent heatSound effectShape (magazine)Process (computing)CollisionComputer fileDefault (computer science)PreprocessorPolygonObject (grammar)Musical ensembleCache (computing)Functional (mathematics)Complex (psychology)Server (computing)Reverse engineeringComputer animation
21:56
System identificationComputer animation
Transcript: English(auto-generated)
00:00
Thank you, Mike. Well, I love Mac server, and I will try and show you some tips and tricks for that. This is actually what my Mac server configurations produced for the last five or six years. And now we'll see what can I
00:22
do to raise the visual appearance. So I will talk about labels, label placement, shadows, shadows on objects, and some other small tips and tricks.
00:43
So who am I? Well, I'm a regular Mac server user. Well, a little more. I'm a land surveyor from the beginning, and I have a PhD in photography. And I was a grass user in the late 80s and beginning of 90s.
01:02
I even wrote some code to grass in the old days, but I don't write code anymore. So I started to use Mac server first time in 2001, I think. And then I started to use it more professionally in 2012. I'm a senior technical fellow at Saab.
01:25
And I've been doing some major projects with Mac server. For instance, the SmacM, it's the digital charts, C-shirts. I don't know. Has any one of you used them?
01:43
They're all on GitHub, so to do S52 styling on S57 data. But my main goal is I love doing beautiful maps with WMS. So the tools I will talk about today
02:01
is layer composition pipeline. I will talk about a new feature that's called centerline in geotransform. I will talk about very small tip about transparency in text shadows. And I will finally talk a little about named styles.
02:21
I think that's a concept that there are some questions about it sometimes, and it's hard to understand. So I will talk about it. Well, first of all, I will start to talk about chainable compositioning filters. It was introduced already in 7.2 in Mac server.
02:46
But unfortunately, how many of you have used that in the room? Not so many. And it could be that it was not properly documented. So I made an effort together with Jeff McKenna this winter,
03:05
and we documented it in a better way. And I made some examples that you can run in a sentence environment. So the primary purpose of these filters is to create soft shadows or blurring effects,
03:26
although it could be other things as well. For instance, in the old days when you see all these tutorials with hill shading, usually they brought it outside these things in Photoshop
03:42
or ImageMatic, and then brought it back in again. Now you can do those blending effects directly in Mac server instead. So that's another usage. But I will talk about, so there's two things here. There's the comp filter. That's the actual operators you're doing.
04:03
It could be blurring, translating, grayscale, blackening, and whiten. And there is the operator, composition operator. As you see, there is a very long list of things, how you combine things.
04:22
For you that are no ImageMatic, for instance, the image processing software, a lot of these are good examples. And there is a very good explanation, I think, on Wikipedia for how these operators are working.
04:46
So let's just do a first example here. We have a polygon, a simple lake polygon. So we could do a comp filter, whitening, blur, soft light,
05:05
and then put opacity to 50%. And you see here, you have a slight shadow inside the lake now. So that's one thing. And then, of course, depending on the composition operator,
05:26
you could get different effects on that. And you can tweak it with the transparency, how much of the effect you would like to see. Another thing here is just want to put a shadow on a house.
05:45
I could then, if I do grayscape, translate, blur, and opacity, as you see, on the house.
06:01
You can do shadows on lines. So you have to translate and blur. And so you get a second. You see it from the back, that there is a shadow there.
06:20
It's just slight, but that's the beauty of it also. It should not be so dominant, I think, to produce these nice cartographic effects. It should be just barely visible, I think. And finally, you can do it on point objects as well.
06:40
So here I have a tree. That's a vector symbol. Native maps are a vector symbol. You can do it on other. So I did a black and translate and blur. And then I have this nice shadow on the tree.
07:00
And I feel sorry that this has been around for such a long time and people haven't started using it. Because this really, really make maps stand out. But there is, I don't know. Do we have some Swiss people here?
07:20
Yeah. There is this site, Uportal.sitan. Okay, okay. So actually, I believe they have been using it. They were the ones sponsoring this functionality, or that agency.
07:41
And Thomas Bonfort, who implemented it, worked together with this office. So whenever I want to have some inspiration, I go to this site to see all this nice blurring. You have composition with the trees and shadows on the houses and so on.
08:03
So this is where I go for inspiration, to look at this fantastic. Because, well, Swiss cartography, in my mind, is one of the best in the world, really. So, but let's continue.
08:23
There is more. I continue the experiments. Well, it says in the documentation that you can't do this on text. I'm this. What? Anyone else?
08:42
Well, there is this thing with the label cache. It's not working on the label cache. It could possibly be implemented in the future, but the label cache, if you turn that off, and you could do that for certain layers, if you knew that you had forest names, for instance.
09:04
So if you turn it off, then you can do these operators and get the shadows there, or other things. So you could operate on text as well, with that exception that you have to turn the label cache off.
09:21
You could do nice things with a borderline. I just stack five composite blocks there, on top of each other, and then you get this shadow behind the border.
09:41
So that's another way to do more composite blocks. You could stack any amount of composite blocks, really. You could even do it on vector symbols that are patterns. So here is an example that I have a vector symbol for grass,
10:03
and I did shadows on the vector pattern within the polygon. Actually, there's another piece here that I have a layer that draws the yellow color, of course, but that's just the detail.
10:23
So what I want to say here is that chainable composition filters, there's endless possibilities, as I see it, and I think we, as a community, should help each other to explore. Because you saw all these compacts,
10:42
like 30 of them, and how you combine all this. This is a major task just to explore all the possibilities. Well, I've shown you eight or 10 examples here today that I made up myself, but with the help of everyone, I think we could come up with a large gallery
11:02
of the effects we could do with these composition and filters. So there's room for everyone to help out here. So next thing is just a small trick.
11:23
I think I answered this on a user's list sometime. If you want to have transparent shadows on text or outlines, you can specify that color with hex instead of RGB. Just a small trick.
11:44
I do it, too. So for instance, in this one, here I don't use it. Here I use it, but not there. So then you get a little bit of the background into the outline.
12:01
Now we come to something new in 8.0. It's implemented by Steve Lime. It's the geo-transformed center line. It's that you grab polygons and you process a center line that you can use for labeling.
12:24
So this has always been my dream to be able to put labels inside polygons that line up nicely with the shape of them. So I was very enthusiastic and helped Steve to do a lot of testing.
12:42
Jeff McKenna and I was testing all the winter long here. So we were bringing in the main branch into Docker container and then test it, test it. Next release that Steve made, we brought in the new and tested and tested. Finally, after three months,
13:00
it worked the way both Steve and Jeff and I wanted it to work, so. And my contribution here was that I brought in some Swedish data sets that were a little more complicated. For instance, this lake is kind of complicated with this large island in the middle.
13:22
So I tested it with Swedish one to one million data, Swedish one to 250K data, and I made one more test. So what you do here is that you do geo-transform and you have the center line or shape.
13:40
That's the geometry. And you can, then I could either, I could do some pre-processing. That's done outside here. So you could do the smooth filter or you could use simplify or you could do simplify TT.
14:01
That either you add lines to a polygon or you remove and then it behaves better, the algorithm. So this worked with one to one million. It worked very good on my four of my five days,
14:23
not that one. I knew, I know now what was wrong with that, so I will explain that in a little bit. So here are working good examples that I did simplify center line, smoothie up, smoothie up.
14:42
You could set the parameters differently on the smooth and simplified operators. I had also example with Norwegian text boxes and that worked perfectly because in the Norwegian dataset they had polygons
15:03
where to place the text. So it was just perfect for that. So the ones missing here is, I think it's too close to the edge, so. Then I ran it just last week.
15:23
This is actually run with a release candidate too, I think it was. No, the beta two I ran it with last week. I wanted to run it on reverse really. And then I found out that I had to set the parameters
15:42
a little differently. So I found out that you can also have, you could do the smooth and simplified operator inside the center line, so then that would be a pre-processing step instead of a post-processing step.
16:05
So you could have this inside, so this center line smooth the shape, so I'm actually smoothing the polygon first. And then I'm doing the center line. This red line is just to show what the center line has,
16:23
it should not be shown of course in the end when you do your final step. Compared to these ones where I did the smooth or simplified before, so that's a post-processing step that I'm applying to the red line.
16:45
And so I got it to work quite well. This is with a pan European EGM data set. Of course then you can have repeat distance, you have several ones.
17:03
Or you can change the repeat distance to lower. Lower value and have more labels. It's depending on what you're really doing your WMS configuration for.
17:20
Is it a small device or a larger device? That's how I find out if I want to have more densely, dense labels on such objects. It's like doing labels on roads really, road names. So my findings here,
17:45
I think here is the same thing that we have to find good parameters, tuning for different data sets. Figure out when pre-processing is needed. That's the thing inside the center line. And find out when we need post-processing.
18:04
That's processing the red line that you're gonna do the labeling on. So one thing that I forgot to mention, as a side effect of this, there's two new functions also in geotransform that's called inner and outer that Steve created.
18:23
And I think the inner function could be useful for filtering complex layers like this to remove. Now it removes all. But if I think we had inner with the size argument, I think that would be,
18:40
so that's on my wish list for Steve to do, to re-enhance really. Here's a quick example with text and symbol collision. Actually I Googled my name on the map server user list.
19:04
This was an answer I had done five years ago that I didn't remember. But I thought it was a kind of neat trick. So here we see we have a collision between a symbol and text along a line. So here is the symbol, and it's the line.
19:28
And finally it's the, yeah, it's the line. What you could do is, when you draw the square, you could do fake label, and then you could,
19:47
you could avoid the collision. So you could draw a fake label that takes care of that in the label cache, and the fake label is transparent.
20:01
So that's one of those neat little tricks. Finally, name styles. This took a long, long time for me to figure out. I don't have a full example, but I have one on GitHub, a guest that shows this. And you use layer class groups and class groups
20:24
for the style to create that. And I made a style that's called color, and one that's called green, and one that's called gray. And then you use the layer group for the layer specification.
20:43
And layers can also be used as root layers. So I pass this exercise for yourself to try this out really, because it's hard to grasp unless you have an example. So I created this example, well, some years ago.
21:04
So I could do layers, square, circle. Here I specified two layers, green and gray. I specified the root layer, that's the map file name. And I say it's color, so color means blue and red.
21:21
I can do root layer and style spray. And I can add even more examples here with different variants, and you can access. So the class group is the default here.
21:40
So then I get color here. So there is a full example here about that, that you can study yourself. So I gave that as a home exercise for you. So some of the examples are available on GitHub.