Skip to content

Mapnik v3.1.0 extend#164

Open
dch0ph wants to merge 6 commits intomapnik:mapnik-v3.1.0from
dch0ph:mapnik-v3.1.0-extend
Open

Mapnik v3.1.0 extend#164
dch0ph wants to merge 6 commits intomapnik:mapnik-v3.1.0from
dch0ph:mapnik-v3.1.0-extend

Conversation

@dch0ph
Copy link
Contributor

@dch0ph dch0ph commented Jan 29, 2026

A draft attempt to document PR #3512.

Queries:

  • expressions: true needs checking. I didn't know how to determine from the code whether expressions would be supported. Noted below that all simple key/values expected to support expressions.
  • From what I could tell, the extend key is parsed in parse_symbolizer_base, which is used by multiple symbolizers rather than just Line. Is this correct? But presumably it only makes sense to document extend for the line symbolizer?

I would like to have a way to double-check that a given property is present in 3.1.0. I would have expected "extend" to be found when using strings libmapnik.so.3.1.0, but it drew a blank. I tried scripts/validate_mapnik_instance.py, but I don't think this will work unless the python bindings match 3.1.0 (which they didn't seem to).

I do think it would be helpful to retrospectively create an approximate entry in the mapnik CHANGELOG.md to separate out then changes up to 3.1. It looks like everything after 3.0.20 has been lumped under the 4.0.0 entry?

@dch0ph
Copy link
Contributor Author

dch0ph commented Feb 9, 2026

@artemp It would useful to get some feedback on the queries above (particularly the query about expressions). I've marked the PR as "draft" while this is unresolved otherwise the added documentation risks being incorrect.

@artemp
Copy link
Member

artemp commented Feb 9, 2026

@dch0ph - apologies for taking long to reply. I'll reply properly first thing tomorrow, thanks for your effort!

@artemp artemp self-assigned this Feb 10, 2026
@artemp artemp self-requested a review February 10, 2026 11:16
@artemp artemp marked this pull request as ready for review February 10, 2026 11:16
@artemp
Copy link
Member

artemp commented Feb 10, 2026

@dch0ph - Just looking at extend symbolizer property - it was introduced in mapnik/mapnik@6e489a9 (post https://github.com/mapnik/mapnik/tree/v3.1.0)

Implementation in https://github.com/mapnik/mapnik/blob/master/include/mapnik/extend_converter.hpp suggests it can be applied to any geometry not just a line.

@talaj - are you around? could you verify the above statement ^ Also, cool FSM 👍

@artemp
Copy link
Member

artemp commented Feb 10, 2026

expressions: true needs checking. I didn't know how to determine from the code whether expressions would be supported.

As far as I can see all Symbolizer properties which are key/value type can be expressions in >= v3.1.0.
https://github.com/mapnik/mapnik/blob/8b70a205c8f751bd880d890148f17bc1cdab8075/include/mapnik/symbolizer_base.hpp#L84-L98

TextSymbolizer is somewhat different. It has inner <Layout>, <Format> elements and it is difficult to follow implementation (https://github.com/mapnik/mapnik/blob/v3.1.0/src/text/text_properties.cpp)

Here's some pointers
https://github.com/mapnik/mapnik/blob/8b70a205c8f751bd880d890148f17bc1cdab8075/src/text/text_properties.cpp#L197-L213

https://github.com/mapnik/mapnik/blob/8b70a205c8f751bd880d890148f17bc1cdab8075/src/text/text_properties.cpp#L260-L274

Looks like most if not all can be expressions also..
Agree we need a reliable way to verify all this .. need to think about it.. 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this shouldn't be in v3.1.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like this shouldn't be in v3.1.0

That would be consistent with not finding extend in my 3.1 library.

This would make this wiki page incorrect. So we could do with either a wiki page or a separate issue for 3.1 -> 4.x changes and move extend there.

Copy link
Member

Choose a reason for hiding this comment

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

It looks like the whole section https://github.com/mapnik/mapnik/wiki/API-changes-between-v3.0-and-v3.1#added
is wrong and shouldn't be in v3.1.0.

Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants