geostyler / geostyler-sld-parser

GeoStyler-Style-Parser implementation for SLD
BSD 2-Clause "Simplified" License
48 stars 29 forks source link

Offset Y for Textsymbolizer needs to be negated #566

Open KaiVolland opened 2 years ago

KaiVolland commented 2 years ago

Bug

The geostyler-style and SLD handle the Y value of the offset/displacement contrary.

SLD: A value of 20 in SLD means 20 pixel above the acutal position geostyler-style: A value of 20 means 20 pixel below the actual position

Expected behavior

The visual output should be more or less the same.

To fix

The Y values of the offset/displacement have to be negated when parsing.

Additional context

Bug found by @yang6626 here https://github.com/geostyler/geostyler-openlayers-parser/pull/432

jansule commented 2 years ago

I'm not sure this should be seen as bug.

According to their specifications:

If we keep following the pattern of leaving interpretation of styling to the respective rendering engines, everything works as expected right now.

KaiVolland commented 2 years ago

We actually do want to have the appearance to be mostly the same don't we? The geostyler-style documentation is also clear about how the value is interpreted. So why not negate the value when reading and writing the value?

KaiVolland commented 1 month ago

@jansule we might want to have a look at this again. Maybe with the geostyler converter demo?