Advanced Cartographic Map Rendering In GeoServer

3,395 views

Published on

Various software can style maps and generate a proper SLD document for OGC-compliant WMS. However the styling allowed by the graphical tools is often limited and not adequate for good cartographic output. This presentation will provide hints, examples and enough information to master SLD in order to create beautiful maps with GeoServer.

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,395
On SlideShare
0
From Embeds
0
Number of Embeds
1,053
Actions
Shares
0
Downloads
57
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Advanced Cartographic Map Rendering In GeoServer

  1. 1. Advanced cartographic map rendering in GeoServer Ing. Andrea Aime, GeoSolutions Ing. Alessio Fabiani, GeoSolutions FOSS4G 2013, Nottingham 17th-22th September 2013
  2. 2. Overview  Who we are  Example map  Raster styling  Scale dependent rules  Hatches, patterns and dashes  Point Symbology  Labeling  Transformations  Cross layer filtering FOSS4G 2013, Nottingham 17th-22th September 2013
  3. 3. GeoSolutions  Founded in Italy in late 2006  Expertise • • Java, Java Enterprise, C++, Python •  Image Processing, GeoSpatial Data Fusion JPEG2000, JPIP, Advanced 2D visualization Supporting/Developing FOSS4G projects    GeoTools, GeoServer GeoBatch, GeoNetwork Clients    Public Agencies Private Companies http://www.geo-solutions.it FOSS4G 2013, Nottingham 17th-22th September 2013
  4. 4. Introduction FOSS4G 2013, Nottingham 17th-22th September 2013
  5. 5. SLD vs CSS  Styled Layer Descriptor   XML based, verbose, hard to hand edit   OGC standard Only showing relevant bits of the SLD Cascading Style Sheets  CSS with extensions for map rendering  Simple, Compact, designed for human beings   Not a standard (several incompatible variants for mapping) Showing the full style, it’s that short FOSS4G 2013, Nottingham 17th-22th September 2013
  6. 6. Example map FOSS4G 2013, Nottingham 17th-22th September 2013
  7. 7. Example map FOSS4G 2013, Nottingham 17th-22th September 2013
  8. 8. Example map FOSS4G 2013, Nottingham 17th-22th September 2013
  9. 9. Example map FOSS4G 2013, Nottingham 17th-22th September 2013
  10. 10. Example map FOSS4G 2013, Nottingham 17th-22th September 2013
  11. 11. Raster styling FOSS4G 2013, Nottingham 17th-22th September 2013
  12. 12. A DEM and a color map  SRTM from USGS  Standard color map  Just avoid the nodata values with opacity=0 FOSS4G 2013, Nottingham 17th-22th September 2013
  13. 13. A DEM and a color map  Same as before, in CSS  Solid intervals FOSS4G 2013, Nottingham 17th-22th September 2013
  14. 14. Scale dependent rules FOSS4G 2013, Nottingham 17th-22th September 2013
  15. 15. Scale dependent rules  Too often forgotten or little used, yet very important:     Hide layers when too zoomed in (raster/vector example) Progressively show details Add more expensive rendering when there are less features Key to any high performance / good looking map FOSS4G 2013, Nottingham 17th-22th September 2013
  16. 16. Example FOSS4G 2013, Nottingham 17th-22th September 2013
  17. 17. Hide as you zoom in   Add a MinScaleDenominator to the rule This will make the layer disappear at 1:75000 (towards 1:1) FOSS4G 2013, Nottingham 17th-22th September 2013
  18. 18. Alternative rendering   Simple rendering at low scale (up to 1:2000) More complex rendering when zoomed in (1:1999 and above) FOSS4G 2013, Nottingham 17th-22th September 2013
  19. 19. Alternative rendering FOSS4G 2013, Nottingham 17th-22th September 2013
  20. 20. Alternative rendering, CSS way FOSS4G 2013, Nottingham 17th-22th September 2013
  21. 21. Hatches, patterns, dashes and plates FOSS4G 2013, Nottingham 17th-22th September 2013
  22. 22. Filling with patterns FOSS4G 2013, Nottingham 17th-22th September 2013
  23. 23. Filling with TTF fonts FOSS4G 2013, Nottingham 17th-22th September 2013
  24. 24. Hatches FOSS4G 2013, Nottingham 17th-22th September 2013
  25. 25. Hatches vertiline horline slash backslash plus times FOSS4G 2013, Nottingham 17th-22th September 2013
  26. 26. Dashes FOSS4G 2013, Nottingham 17th-22th September 2013
  27. 27. Dashes FOSS4G 2013, Nottingham 17th-22th September 2013
  28. 28. Plates FOSS4G 2013, Nottingham 17th-22th September 2013
  29. 29. Plates CSS way FOSS4G 2013, Nottingham 17th-22th September 2013
  30. 30. Point Symbology FOSS4G 2013, Nottingham 17th-22th September 2013
  31. 31. Point symbols • 600 loc for 6 different points types • Painful… FOSS4G 2013, Nottingham 17th-22th September 2013
  32. 32. Point symbols … • 70 lines total • Power of cascading FOSS4G 2013, Nottingham 17th-22th September 2013
  33. 33. Prepare data     alter table pointlm add column image varchar; update pointlm set image = 'shop_supermarket.p.16.png' where MTFCC = 'C3081' and (FULLNAME like '%Shopping%' or FULLNAME like '%Mall%'); update pointlm set image = 'peak.png' where MTFCC = 'C3022' update pointlm set image = 'amenity_prison.p.20.png' where MTFCC = 'K1236';  update pointlm set image = 'museum.p.16.png' where MTFCC = 'K2165';  update pointlm set image = 'airport.p.16.png' where MTFCC = 'K2451';  update pointlm set image = 'school.png' where MTFCC = 'K2543';   update pointlm set image = 'christian3.p.14.png' where MTFCC = 'K2582'; update pointlm set image = 'gate2.png' where MTFCC = 'K3066'; FOSS4G 2013, Nottingham 17th-22th September 2013
  34. 34. Dynamic symbolizers FOSS4G 2013, Nottingham 17th-22th September 2013
  35. 35. Dynamic symbolizers CSS way • Down to 15 lines FOSS4G 2013, Nottingham 17th-22th September 2013
  36. 36. Labeling FOSS4G 2013, Nottingham 17th-22th September 2013
  37. 37. Line labels FOSS4G 2013, Nottingham 17th-22th September 2013
  38. 38. Line labels (and more) CSS way FOSS4G 2013, Nottingham 17th-22th September 2013
  39. 39. Point labels FOSS4G 2013, Nottingham 17th-22th September 2013
  40. 40. Polygon labels FOSS4G 2013, Nottingham 17th-22th September 2013
  41. 41. Label Obstacles FOSS4G 2013, Nottingham 17th-22th September 2013
  42. 42. Transformations FOSS4G 2013, Nottingham 17th-22th September 2013
  43. 43. Geometry transformations FOSS4G 2013, Nottingham 17th-22th September 2013
  44. 44. Geometry transformations CSS way FOSS4G 2013, Nottingham 17th-22th September 2013
  45. 45. Geometry transformations FOSS4G 2013, Nottingham 17th-22th September 2013
  46. 46. Rendering transformations • No CSS support yet FOSS4G 2013, Nottingham 17th-22th September 2013
  47. 47. Rendering transformations FOSS4G 2013, Nottingham 17th-22th September 2013
  48. 48. Get it all  In a few days you will be able to find:    Full data, styles and configuration, ready to use Get the slides Be on the lookout:  http://geo-solutions.blogspot.com/ FOSS4G 2013, Nottingham 17th-22th September 2013
  49. 49. The End Questions? andrea.aime@geo-solutions.it simone.giannecchini@geo-solutions.it FOSS4G 2013, Nottingham 17th-22th September 2013

×