Mapserver Project Status Report
Total Page:16
File Type:pdf, Size:1020Kb
MapServer Project Status Report Daniel Morissette, Mapgears Thomas Bonfort, Terriscope and the whole MapServer Team FOSS4G 2013, Nottingham, UK MapServer Project Status • 6.2 & 6.4 Feature highlights • 7.0 plans • Project updates & news • Q & A 2012-13 Releases • November 2012: MapServer Suite 12.11 – MapServer 6.2.0 – MapCache 1.0.0 – TinyOWS 1.1.0 • April 2013: – MapServer 6.2.1 • September 2013: – MapServer 6.4.0 – MapCache 1.2.0 6.2 Rendering Highlights • SVG Symbols • Multiple Fonts for International Text • Layer Masking • Complex Symbols/Labels • Offset Labels • Vector Fields SVG Symbols • Existing symbology limited for some use cases • Scalable, multiple colors SYMBOL STYLE NAME "svgsymbol" SYMBOL "svgsymbol" TYPE SVG SIZE 10 IMAGE "/path/to/symbol.svg" ANGLE 45 END END Mask Layers • Clip rendered data across given features layer name "countries” status off class expression (“[FIPS]” = “EZ”) style color 0 0 0 Precise symbol placement • Default is to center symbol on feature point • Typically useful for arrow type symbols • SYMBOL – ANCHORPOINT x y • STYLE – POLAROFFSET [distance] [bearing] Complex symbols Label Leader Offsetting LAYER CLASS LEADER MAXDISTANCE 100 GRIDSTEP 10 STYLE COLOR 0 0 0 WIDTH 1 #PATTERN 2 2 END END END LABEL … END END END Vector Fields 6.4 Release Highlights September 17, 2013 • Vector Contour Generation • Layer GEOMTRANSFORM / Line Smoothing • OGC Service access control by IP address • List Expressions • Content Dependent GetLegendGraphics • ScaleToken • TILEINDEX with mixed SRS • Migration from autotools to cmake • LibRSVG for SVG symbol support Contour Generation • On-the-fly contour generation from a DEM LAYER NAME "my_contour_layer" TYPE LINE STATUS DEFAULT CONNECTIONTYPE CONTOUR DATA /mnt/data/raster/grib/dem.grib PROCESSING "BANDS=1" PROCESSING "CONTOUR_ITEM=elevation" PROCESSING "CONTOUR_INTERVAL=10" CLASS STYLE WIDTH 2 COLOR 255 0 0 END END Line Smoothing LAYER GEOMTRANSFORM (smoothsia([shape], [smoothing_size], [smoothing_iteration], [preprocessing])) ... END Layer GEOMTRANSFORM • buffer([shape],dist) • simplify([shape],tolerance) • simplifypt([shape],tolerance) • generalize([shape],tolerance) • smoothsia([shape], smoothing_size, smoothing_iteration, preprocessing) List Expressions LAYER ... CLASSITEM "type" CLASS EXPRESSION {primary,secondary,tertiary} ... END END Replaces: # regex EXPRESSION /primary|secondary|tertiary/ # complex parser expression (IN operator) EXPRESSION ("[type]" IN "primary,secondary,tertiary") Content Dependent GetLegendGraphics • Legend contains only classes with features present in the map • Triggered by presence of vendor-specific BBOX, SRS, WIDTH, HEIGHT in GetLegendGraphics call http://server/wms?SERVICE=WMS&VERSION=1.1.0 &REQUEST=GetLegendGraphic&LAYER=layer1&FORMAT=image/png &SRS=EPSG:3978&WIDTH=560&HEIGHT=350 &BBOX=2258982,-70747,2615354,495480 ScaleToken • %variable% run-time substitutions based on map scale in DATA related statement • Reduces need for scale-dependent layers LAYER SCALETOKEN NAME "%table%" #data comes from specific table VALUES DATA "the_geom from %table%" "0" "roads" "1000" "roads_gen_1" #data from specific shapefile "10000" "roads_gen_0" DATA "/path/to/%table%.shp" END ... END END SVG Symbols: libRSVG • Current SVG symbol support via libsvg-cairo – libsvg + libsvg-cairo have limited featureset and are no longer supported • Addition of LibRSVG as an alternative – More complete support – Actively supported – GPL license (could be an issue for binary-only distributions) – Large number of dependencies (well supported by Linux distros) Migration to cmake • Replaces autoconf and Windows Makefiles • Unified/Multiplatform build management $ mkdir build $ cd build $ cmake .. -DWITH_PHP=1 -DWITH_PYTHON=1 ## fix dependency issues $ make 7.0 Plans • GSoC: UTFGrid Support • GSoC: ScribeUI Mapfile Editor • Complex Text Layout • Layer-level ENCODING • Complex Symbology / JavaScript plugins • Filter Translation Support • GD Removal GSoC: UTFGrid Source: http://www.mapbox.com/developers/utfgrid/ GSoC: ScribeUI Mapfile Editor Complex Text Layout "[al-arabiyyah, "the Arabic [language العربية The word in Arabic, in stages of rendering. Unprocessed characters With bi-directional processing With glyph shaping rendering letters according to context Source: http://en.wikipedia.org/wiki/Complex_text_layout Complex Text Layout • Refactored the text rendering pipeline • Uses Harfbuzz for context dependent glyph shaping • Benefits to all aspect of label placement – Centering multi-line labels – More precise letter spacing and label placement Layer Level Encoding • All attribute values converted to UTF8 internally • Solves problem with support of data sources in multiple encodings in a single mapfile • All output generated by MapServer in UTF8 Complex Symbology Source: Thales Canada Inc / DLCSPM - LCSS / BattleView Source: MIL-STD-2525C STYLEITEM JavaScript • Uses Chrome's V8 JavaScript engine • Style features programatically rather than through class expressions • JavaScript function called for each shape • Receives shape.attributes as input • Returns (2 options): – string with single STYLE definition – string with CLASS and STYLE definitions STYLEITEM JavaScript LAYER ... STYLEITEM "javascript://myscript.js" CLASS // Empty class required END END //Make symbol size 14 or 7 var size = shape.attributes.NAME.length > 10 ? 14:7; var style = "STYLE SIZE " + size; style += " SYMBOL 'circle'"; style += " COLOR 255 0 0 END"; //Return style to MapServer style; Rendering Plugins • JavaScript plugin • Receives shape and layer definition as input • Processes geometry • Returns – SVG representation? – modified geometry? Filter Translation Support • Support translating FILTER expressions (e.g. string, regex, logical, list) to a format native to the underlying driver (PostGIS, Oracle, OGR, etc.) • Easier for users • Significant performance boost for WFS and base MapServer queries (e.g. mode=nquery) • Simplified code-base, especially for WFS House Cleaning • GD Removal • Annotation layer removal • Bitmap font removal (TINY, SMALL, ...) • Fallback in place in all cases Project Updates and News OGC Compliance Certification • WCS 2.0: Thanks to Stephan Meissl, MapServer 6.4 and 6.2.2 (branch-6-2) will be listed as WCS 2.0 reference implementation • WMS 1.3: Thanks to Arnulf Christl for running and submitting tests results to OGC (pending paperwork) MapServer PSC • 14 voting PSC members • 2011: – Olivier Courtin and Michael Smith joined PSC • 2013: – Frank Warmerdam retired from PSC – Stephan Meissl joined PSC MapServer PSC • Steve Lime (chair) • Jeff McKenna • Daniel Morissette • Umberto Nicoletti • Yewondwossen • Tamas Szekeres Assefa • Thomas Bonfort • Howard Butler • Olivier Courtin • Steve Woodbridge • Mike Smith • Perry Nacionales • Stephan Meissl • Tom Kralidis Code Sprints • Boston, March 2013 – ~10 MapServer contributors – (Also GDAL/PDAL, PostGIS, GeoMOOSE) • Vienna – March 24 to 28, 2014 • Philadelphia 2015 Boston 2013 How to Contribute? • Users: – Beta and release candidate testing – Bug reports on Github, including test cases – Documentation (wiki, Github pull requests) – Answers on the mapserver-users list and IRC • Developers: – Bug fixes/patches – New features – Binary builds Questions / Discussion .