$30 off During Our Annual Pro Sale. View Details »

Styling Natural Earth with GeoServer CSS

Styling Natural Earth with GeoServer CSS

Natural Earth is a public domain map dataset available at 1:10m, 1:50m, and 1:110 million scales. Featuring tightly integrated vector and raster data, with Natural Earth one can build a variety of visually pleasing, well-crafted maps with cartography or GIS software.

GeoServer GeoCSS is a CSS inspired language allowing you to build maps without consuming fingertips in the process, while providing all the same abilities as SLD.

In this presentation we’ll show how we have built a world political map and a world geographic map based on Natural Earth, using CSS, and shared the results on GitHub. We’ll share with you how simple, compact styles can be used to prepare a multiscale map, including: * Leveraging CSS cascading. * Building styles that respond to scales in ways that go beyond simple scale dependencies. * Various types of labeling tricks (conflict resolution and label priority, controlling label density, label placement, typography, labels in various scripts, label shields and more). * Quickly controlling colors with LessCSS inspired functions. * Building symbology using GeoServer large set of well known marks.

Join this presentation for a relaxing introduction to simple and informative maps.

Simone Giannecchini
PRO

August 29, 2022
Tweet

More Decks by Simone Giannecchini

Other Decks in Technology

Transcript

  1. Andrea Aime GeoSolutions Styling Natural Earth with GeoServer CSS

  2. GeoSolutions Enterprise Support Services Deployment Subscription Professional Training Customized Solutions

    GeoNode • Offices in Italy & US, Global Clients/Team • 40+ collaborators, 30+ Engineers • Our products • Our Offer
  3. Affiliations We strongly support Open Source, it Is in our

    core We actively participate in OGC working groups and get funded to advance new open standards We support standards critical to GEOINT
  4. Intro: Natural Earth and GeoCSS

  5. Natural Earth • Natural Earth is a public domain map

    dataset available at 1:10m, 1:50m, and 1:110 million scales. • Featuring tightly integrated vector and raster data
  6. GeoServer CSS (GeoCSS) • CSS inspired language for map styling

    • Compact, powerful, human readable, human writable * { stroke: blue; fill: #7EB5D3; label: [name]; label-anchor: 0.5 0.5; font-fill: black; font-family: "Arial"; font-size: 14; halo-radius: 2; halo-color: #7EB5D3; halo-opacity:0.8; }
  7. The challenge • Wanted to have a significant, yet not

    too complicated, base map, in CSS, for our training package • What about osm-styles? • Nice, but too complicated!
  8. The political map

  9. Political map of the world

  10. Political map of the world

  11. Political map of the world

  12. Political map of the world

  13. The layer group

  14. One sample style: countries /* @title Countries */ [@sd >

    20M][@sd < 70M] { stroke: darken(darkgray, 5%); stroke-width: 0.1; /* https://colorbrewer2.org/#type=qualitative&scheme=Pastel1&n=7 */ fill: [Recode(MAPCOLOR7, 1, '#fbb4ae', 2, lighten('#b3cde3', '5%'), 3, '#ccebc5', 4, lighten('#decbe4', '5%'), 5, '#fed9a6', 6, '#ffffcc', 7, '#e5d8bd')]; label: [NAME]; label-anchor: 0.5 0.5; font-family: 'Noto Sans'; font-size: 14; font-fill: lighten(black, 20%); halo-color: white; halo-radius: 1; halo-opacity: 70%; label-priority: [POP_EST]; label-auto-wrap: 100; label-max-displacement: 50; }
  15. How about a physical map?

  16. Physical map of the world

  17. Physical map of the world

  18. Ok, how can I get it?

  19. But on GitHub, of course! • GeoSolution’s Natural Earth styles

    repository • https://github.com/geosolutions-it/ne-styles • The physical map is in a branch right now: • https://github.com/geosolutions-it/ne-styles/tree /physical
  20. That’s all folks! Questions? andrea.aime@geosolutionsgroup.com info@geosolutionsgroup.com