Nouveautés de Mapserver 6.2

625 views
540 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
625
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Nouveautés de Mapserver 6.2

  1. 1. Advanced Cartography with MapServer 6.217 / 10 / 2012 Thomas Bonfort (Terriscope)Rencontres OSGEO
  2. 2. 6.2 Rendering Highlights•  SVG Symbols•  Vector Fields•  Complex Symbols•  Offset Labels•  Layer Masking•  Multiple Fonts for International Text
  3. 3. 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
  4. 4. MultiLanguage Font Support•  LABEL->FONT now takes comma separated list of fonts to try•  Each font will be tried in turn if glyph not found
  5. 5. Mask Layers •  Clip rendered data across given featureslayer status on name ”naturalearth” mask “countries” type rasterlayer name "countries” status off class expression (“[FIPS]” = “EZ”) style color 0 0 0
  6. 6. 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]
  7. 7. Complex symbols
  8. 8. Complex symbols•  Collision avoidance: implemented along with the labelcache.•  “All or nothing” approach: in case of collision, whole symbol is discarded.•  Each sub-symbol is positioned relatively to the anchor point, and defined as a LABEL block.•  Collision detection between sub-symbols is optional.•  Addresses meteo symbol generation, other use cases in future versions
  9. 9. Complex symbolsLAYER CLASS LABEL OFFSET -15 -10 FORCE GROUP TEXT “[temp]” END LABEL EXPRESSION ([wind_speed]<=5) STYLE GEOMTRANSFORM “labelpnt” SYMBOL “v5” SIZE 30 ANGLE [wind_angle] FORCE GROUP END END LABEL EXPRESSION ([wind_speed]<=10) STYLE SYMBOL “v10” … END END ….
  10. 10. Vector Fields
  11. 11. Vector Fields•  u,v components stored in raster bands•  Mapped to vector points in resulting map•  Additional bindings used for styling: –  [uv_angle] –  [uv_length]•  Decoupling size of arrow body and head
  12. 12. Vector FieldsSYMBOL LAYER NAME "arrowbody" TYPE POINT TYPE VECTOR CONNECTIONTYPE uvraster POINTS DATA “wind.tif” 00 CLASS 10 STYLE END # points SYMBOL "arrowbody" END ANGLE [uv_angle] SIZE [uv_length]SYMBOL COLOR 0 127 20 NAME "arrowhead" END TYPE vector FILLED true STYLE ANCHORPOINT 1 0.5 SYMBOL "arrowhead" POINTS ANGLE [uv_angle] 02 SIZE 10 41 COLOR 255 0 0 00 POLAROFFSET [uv_length_2] [uv_angle] END ENDEND END END
  13. 13. Label Leader Offsetting•  Displace label if collision occurs on initial position•  NP-hard problem! –  Test offsetted positions on a regular grid –  O(nlabels * image_size)•  Leader line can be styled•  Offsets whole label group, future work on offsetting each sub-label
  14. 14. Label Leader OffsettingLAYER CLASS LEADER MAXDISTANCE 100 GRIDSTEP 10 STYLE COLOR 0 0 0 WIDTH 1 #PATTERN 2 2 END END END LABEL … END ENDEND
  15. 15. Putting it all together
  16. 16. 6.2 Other Notable Highlights•  First release with tinyOWS and Mapcache•  INSPIRE view services•  WMS DIM_* dimensions•  Source code repository migration•  GD library now optional•  Speedups and Memory usage reduction•  Build changed: libtool + shared library
  17. 17. Future•  Text placement: –  Alignment –  Spacing –  Line following•  Further work on multiple and/or offsetted labels•  Carto/css?•  Mod_mapserver
  18. 18. Want More?•  Docs: http://www.mapserver.org/index.html•  Code: https://github.com/mapserver/mapserver•  Release date: soon !

×