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

Fix for loading interval of markerline style from SLD #61310

Conversation

MoritzMoreira
Copy link
Contributor

@MoritzMoreira MoritzMoreira commented Apr 2, 2025

Added second .firstChild() to get to the tag holding the actual gap value.

Graphic stroke node of .sld file of a marker line:

            <se:GraphicStroke>
               <se:Graphic>
                 <se:Mark>
                   <se:WellKnownName>circle</se:WellKnownName>
                   <se:Fill>
                     <se:SvgParameter name="fill">#54b04a</se:SvgParameter>
                   </se:Fill>
                   <se:Stroke>
                     <se:SvgParameter name="stroke">#3d8035</se:SvgParameter>
                     <se:SvgParameter name="stroke-width">1</se:SvgParameter>
                   </se:Stroke>
                 </se:Mark>
                 <se:Size>14</se:Size>
               </se:Graphic>
               **<se:Gap>
                 <ogc:Literal>36</ogc:Literal>
               </se:Gap>**
             </se:GraphicStroke>

In the test file, the interval value was in the tag, so the sld specification probably changed.

image

@github-actions github-actions bot added this to the 3.44.0 milestone Apr 2, 2025
@@ -11,7 +11,6 @@
<VendorOption name="placement">centralPoint</VendorOption>
Copy link
Contributor Author

@MoritzMoreira MoritzMoreira Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interval value will not actually be checked when loading this test file, because the SLD loading only allows one option at a time. I have made an issue for multiple placement options (#61246). I did not remove the vendor option here in case it is needed somewhere else.

@MoritzMoreira MoritzMoreira marked this pull request as ready for review April 2, 2025 09:17
@MoritzMoreira MoritzMoreira force-pushed the fix-load-style-sld-markerline-interval#24954 branch 4 times, most recently from f1554fc to 59f5688 Compare April 2, 2025 10:28
Copy link

github-actions bot commented Apr 2, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 64a5115)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 64a5115)

@MoritzMoreira MoritzMoreira marked this pull request as draft April 3, 2025 08:51
@MoritzMoreira MoritzMoreira changed the title Fix for loading markerline style from SLD with interval value Fix for loading interval of markerline style from SLD Apr 3, 2025
@MoritzMoreira MoritzMoreira force-pushed the fix-load-style-sld-markerline-interval#24954 branch from 72ad0b0 to 11d0353 Compare April 3, 2025 13:02
@MoritzMoreira MoritzMoreira marked this pull request as ready for review April 3, 2025 13:03
@signedav signedav closed this Apr 10, 2025
@signedav signedav reopened this Apr 10, 2025
Added second ".firstChild()" to get to the <Literal> tag holding the
actual gap value.
Fixes qgis#24954
@MoritzMoreira MoritzMoreira force-pushed the fix-load-style-sld-markerline-interval#24954 branch from 7c8f0a7 to 50c220b Compare April 10, 2025 10:38
@signedav signedav merged commit 34b4c2c into qgis:master Apr 11, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants