Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset Y for Textsymbolizer needs to be negated #566

Open
KaiVolland opened this issue Apr 21, 2022 · 3 comments
Open

Offset Y for Textsymbolizer needs to be negated #566

KaiVolland opened this issue Apr 21, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@KaiVolland
Copy link
Contributor

KaiVolland commented Apr 21, 2022

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 geostyler/geostyler-openlayers-parser#432

@KaiVolland KaiVolland added the bug Something isn't working label Apr 21, 2022
@KaiVolland KaiVolland changed the title Offset Y for Textsymbolizer needs to be inverted Offset Y for Textsymbolizer needs to be negated Apr 21, 2022
@jansule
Copy link
Contributor

jansule commented Apr 21, 2022

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

pprev94 added a commit that referenced this issue Jun 20, 2024
jansule pushed a commit that referenced this issue Jun 21, 2024
* fix: offset y for textsymbolizer #566

* fix: few tests changed
jansule pushed a commit that referenced this issue Jun 21, 2024
* fix: offset y for textsymbolizer #566

* fix: few tests changed
github-actions bot pushed a commit that referenced this issue Jun 21, 2024
## [5.4.0](v5.3.1...v5.4.0) (2024-06-21)

### Features

* Extract SLD version from SLD ([#926](#926)) ([56f231b](56f231b))
* implement i18n for error messages [#923](#923) [#924](#924) ([#928](#928)) ([e01c8c8](e01c8c8))

### Bug Fixes

* offset Y for Textsymbolizer ([#932](#932)) ([398ce0c](398ce0c)), closes [#566](#566)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants