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

Unknown COMPOP "SOFT-LIGHT" and error with several lines with COMPFILTER with validate #150

Closed
LarsSchy opened this issue Apr 3, 2022 · 7 comments

Comments

@LarsSchy
Copy link

LarsSchy commented Apr 3, 2022

I found some errors in the handling of COMPOP and COMPFILTER.
The example I shared a couple of weeks ago with a working example with the composition pipeline: https://gist.github.com/LarsSchy/4aa75fd2a6bc7eb01a7cff9beb64b59a

I pasted this example into: https://mappyfile.geographika.net/#

Firstly I get an error when I push draw buttom:
loadLayerCompositer(): Expression parser error. Unknown COMPOP "SOFT-LIGHT"

The error goes away if I remove the COMPOP line.

However if I run the command line mappyfile validate on the same file it is ok.
I am running mappyfile --version --> 0.9.6

Secondly I also found out if I run mappyfile format it strips away all COMPFILTER rows except for the last one, if I have several COMPFILTERs stacked, that I would say is the normal case for creating a shadow with translate and blur combined.

@LarsSchy LarsSchy changed the title Unknown COMPOP "SOFT-LIGHT" and error COMPFILTER with validate Unknown COMPOP "SOFT-LIGHT" and error with several lines with COMPFILTER with validate Apr 3, 2022
@geographika
Copy link
Owner

Thanks for the report @LarsSchy - I wasn't aware multiple COMPFILTERs were allowed. I've pushed an update that hopefully fixes this and the the COMPOP issue, and I can now parse and generate your Mapfile at https://gist.githubusercontent.com/LarsSchy/4aa75fd2a6bc7eb01a7cff9beb64b59a/raw/a463a1b5e87e66bbbd1e14716138795484d3c649/layer_comp.map

Could I add this as one of the example maps at https://mappyfile.geographika.net/# ? I'd leave it as-is, with attribution in place.

image

@LarsSchy
Copy link
Author

LarsSchy commented Apr 3, 2022

Wow that was fast @geographika. Yes it ok to use my example at https://mappyfile.geographika.net/#. I would be honored if You did.

@LarsSchy
Copy link
Author

LarsSchy commented Apr 3, 2022

I know that You showed me in the past that I could update mappyfile to master with:
pip install git+git://github.com/geographika/mappyfile@master -U
I seems like that that github is not allowing that nowadays. What is the procedure now?

@geographika
Copy link
Owner

I think the https protocol should be used now, try the following to install from master:

pip install git+https://github.com/geographika/mappyfile.git -U

Great - thanks for letting me use the example, it will appear with the updated mappyfile in the next couple of weeks.

@LarsSchy
Copy link
Author

LarsSchy commented Apr 3, 2022

Thanks, that works! and mappyfile format now works as expected.

@geographika
Copy link
Owner

@LarsSchy - the fix is contained in the new 0.9.7 release, and I added the composite example to https://mappyfile.geographika.net/#

image

Then press "Draw":

image

@LarsSchy
Copy link
Author

LarsSchy commented Jul 5, 2022

I guess this issue is solved now with: #151

@LarsSchy LarsSchy closed this as completed Jul 5, 2022
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

No branches or pull requests

2 participants