GeoServer CSS: Mapping in Style FOSS4G 2010 Barcelona, Spain.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Advertisements

Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
It’s All About Style The Basics of Style Sheets Presented by Barry Diehl.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
4.01 Cascading Style Sheets
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
Cascading style sheets (CSS)
Styles with Cascading Style Sheets (CSS) Web Design – Section 4-1 Part or all of this lesson was adapted from the University of Washington’s “Web Design.
INTERNAL CSS Casey Ames Different types of CSS There are three different types of CSS: ◦ External CSS ◦ Internal CSS ◦ Inline CSS In this presentation.
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
The Internet and the World Wide Web. The Internet A Network is a collection of computers and devices that are connected together. The Internet is a worldwide.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Development of Dynamic SLD and Understanding WCS Using Geo-server Supervisor Prof N.L Sarda Dept. of Computer Science & Engg. IIT-Bombay Bharti M.Tech.
Introduction to Cascading Style-sheets (CSS) Basharat Mahm ood, Department of Computer Science, CIIT,Islamabad, Pakistan 1.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
Mike Pumphrey, OpenGeo 8 September, 2010 Styler: Graphical SLD (at last!)
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
Mapping in GeoServer with SLD and CSS
INTRODUCTION TO CSS. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features of CSS Features of CSS  Creating Style Sheet Creating Style Sheet.
MapWindow 6.0: An Extensible Architecture for Cartographic Symbology 12/6/ of 34 Ted Dunsford FOSS4G Conference October, 2009.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
Introduction to CSS. What is CSS? CSS ("Cascading Style Sheets") determines how the elements in our XHTML documents are displayed and formatted. By using.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Visualizing geographical data made extremely easy by SLD Editor!
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Kyle Zimmermann.  What are CSS?  History  The Box Model  CSS Styles  Rules and Selectors  Cascade & Specificity  Inheritance  Video  Demo.
IN THE DOCUMENT OBJECT MODEL, EACH LINE OF HTML IS AN ELEMENT (AN OBJECT), ABLE TO HAVE ATTRIBUTES, PROPERTIES AND VALUES. CSS TELLS THE BROWSER HOW TO.
CGI – GeoSciML Testbed 3 Status for BRGM Jean-Jacques Serrano.
- WE’LL LOOK AT THE POSITION PROPERTY AND HOW CSS RESOLVES CONFLICTS BETWEEN STYLING INSTRUCTIONS The position property; CSS specificity hierarchy.
Uploading Data Matthew Hanson  GeoNode made up of several components  Web Framework – Django  OGC Server – GeoServer  Database – PostGIS.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Internet & World Wide Web How to Program, 5/e 1. 2.
The Basics of Style Sheets Presented by Barry Diehl
Working with Cascading Style Sheets
Cascading Style Sheets (CSS)
4.01 Cascading Style Sheets
Web Development & Design Foundations with HTML5 8th Edition
Introduction to CSS.
Cascading Style Sheets
Styles with Cascading Style Sheets (CSS)
Web Based Spatial Decision Support System for Western Ghats
Styles with Cascading Style Sheets (CSS)
Web Development & Design Foundations with HTML5
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Introducing OpenEdX Hosam Shahin CS 6604 – Online Education Systems
>> Dynamic CSS Selectors
Cascading Style Sheets (Introduction)
Cascading Style Sheets (Introduction)
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets™ (CSS)
Training & Development
Tutorial 3 Working with Cascading Style Sheets
Introduction to CSS.
4.01 Cascading Style Sheets
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

GeoServer CSS: Mapping in Style FOSS4G 2010 Barcelona, Spain

David Winslow Developer, OpenGeo Technical Lead, GeoNode Contributor to GeoServer User of GeoExt, OpenLayers, GeoNetwork, PostGIS,... dwins on github, freenode, etc. Hi Everybody!

Overview SLD is for robots CSS is for people Use CSS!

Styling Basics What? How?

Styled Layer Descriptors: XML – General Purpose

Styled Layer Descriptors: XML - Validating

Styled Layer Descriptors: XML – Hierarchies

Styled Layer Descriptor: Feature Set Styling attributes Type constraints Layer ordering Inlined data?

Styled Layer Descriptor: Painter's Model Render each rule entirely Last rule wins

Road with Outline Rule: features like X LineSymbolizer Stroke – red, thick LineSymbolizer Stroke – yellow, thin

Styled Layer Descriptor – Painter's Model

FeatureTypeStyle Rule: features like X LineSymbolizer Stroke – red, thick FeatureTypeStyle Rule: features like X LineSymbolizer Stroke – yellow, thin

Styled Layer Descriptor – Painter's Model

Cascading Style Sheets: Specialized syntax Filter/Property pairs No boilerplate * { stroke: black; }

Cascading Style Sheets: Feature Set

Cascading Style Sheets: Cascading Model Combine properties Most specific rule wins

Cascading Style Sheets: Existing user base Every web developer Cascadenik, Cartagen, Halcyon...

Recap SLD XML Part of WMS Painter's Model Resolves Rules OGC Services CSS Custom-tailored Styling only Cascading inheritance Resolves properties In wide, general use

How do you use it? Translator reuse existing infrastructure avoid deploying experimental software in production easier comparison of functionality

Documentation

Example: Styling Roads

Vary color with type Vary stroke-width with scale

SLD

CSS

CSS <> SLD: Filters [att='value'] featuretype #id Unified all constraints

CSS <> SLD: Repeated rendering * { stroke: red, yellow; stroke-width: 20px, 8px; z-index: 0, 10; }

CSS <> SLD: Repeated rendering * { stroke: red, yellow; stroke-width: 20px, 8px; z-index: 0, 10; }

CSS <> SLD: Styled marks

[type='hospital'] { mark: symbol(circle), symbol(cross); }

CSS <> SLD: Styled marks [type='hospital'] {... } [type='hospital'] :mark { fill: white; stroke: red; }

CSS <> SLD: Styled marks [type='hospital'] {... } [type='hospital'] :mark {... } [type='hospital'] :nth-mark(2) { fill: red; }

CSS <> SLD: Styled marks [type='hospital'] { mark: symbol(circle), symbol(cross); mark-size: 16px, 10px; } [type='hospital'] :mark {... } [type='hospital'] :nth-mark(2){... }

Potential Directions SLD ➙ CSS CSS + WMS CSS-aware editor Standardized Map CSS Raster styling

SLD ➙ CSS Translator Naive (wrong) version would be easy Important details – Combine rules from stacked FeatureTypeStyles – “factor out” commonalities – Title/Abstract metadata

@import(base.css) Share common definitions between multiple styles Not possible in SLD; relies on per- property rule combination to be useful

CSS + WMS Integrate CSS into WMS the way SLD is now in SLD? GetMap&css_body=... “refine” named styles from server

CSS-aware editor Syntax highlighting “palettes” – Fonts – Colors – Marks – Properties

Standardized Map CSS Existing tools – Mapnik – Cartagen – OSM (Halcyon) Each has different dialect with different model Sharing would be cool

Raster Styling Only “gap” left Not sure what it will look like yet

The Backend First “serious” project in Scala Zero “adapter” code Functional features – data transforms Parsing library

Scala Scala is to Java as CSS is to SLD “Just another library” at runtime Highly reduced boilerplate during development

Scala in GeoServer Just add water scala-library.jar Loaded like any other extension

Scala Collections val nums = List.make(1, 10) val (odds, evens) = nums.partition(_ % 2 != 0) val pairs = for (i <- nums; j <- nums) yield (i, j)

Parsing in Scala private val literal = percentage | measure | number | string | color

CSS <> SLD: Painter's Model to Cascading Exhaustive search Filter analysis (for speed)

Questions?