GeoCat / bridge-style

Cartography library making style format conversions as easy as using Python.
MIT License
44 stars 13 forks source link

hatch in mapserver #31

Open pvgenuchten opened 4 years ago

pvgenuchten commented 4 years ago

a 45deg hatch currently gives this style

STYLE
      OPACITY 1.0
    END
    STYLE
      OPACITY 1.0
      OUTLINECOLOR "#000000"
      OUTLINEWIDTH 1.738582677186
    END

in stead mapserver has a special hatch symbol type

SYMBOL
  NAME 'hatch-test'
  TYPE HATCH
END
Layer definition:

LAYER
  ...
  CLASS
    ...
    STYLE
      SYMBOL 'hatch-test'
      COLOR 255 0 0
      ANGLE 45
      SIZE 10
      WIDTH 3
    END
  END
END
volaya commented 4 years ago

Mapserver export does not support symbol fills or marker lines at the moment. I still have to work on this...

volaya commented 4 years ago

Support for marker fills is already added, and a line fill with an angle of 45 degrees should be now correctly converted to mapserver.

However, there is no distinction for hatch symbols in geostyler (no equivalent to TYPE HATCH), so the conversion just generates a regular pattern fill with a rotated line symbol.

pvgenuchten commented 4 years ago

i guess we should extend geostyler to support hatch-type-symbology, qgis and mapserver have specific (line pattern fill) support, a hatch is quite different as how geoserver treats it as a patternfill with horline marker (only 45deg)