Closed phil0906 closed 6 months ago
Hi Phil. Thanks for reporting this - it does not look good in 3.34.6! My Ubuntu hosted QGIS installation is at 3.36.2, so I'll check if it is still happening in that - if so then I may be able to debug. I hope to look at this in the next few days. I may need more information on your matplotlib version but will follow up here once I have looked at it.
Hi @phil0906. I have loaded into QGIS version 3.36.2 (on Ubuntu 22.04) and it is working correctly, so odd that it isn't working in 3.34.6. I'll look at setting up 3.34.6 for testing over the next few days.
Hi Chris I just tried it within a totally new QGIS project with version 3.34.6 (only one layer "HP3"). Same error happened.
I'm using Windows 11. So hopefully you can reproduce the bug within your environment.
Hi Chris I just tried it within a totally new QGIS project with version 3.34.6 (only one layer "HP3"). Same error happened. I'm using Windows 11. So hopefully you can reproduce the bug within your environment. Best regards Philipp
Am Mi., 8. Mai 2024 um 22:14 Uhr schrieb Chris Crook < @.***>:
Hi @phil0906 https://github.com/phil0906. I have loaded into QGIS version 3.36.2 (on Ubuntu 22.04) and it is working correctly, so odd that it isn't working in 3.34.6. I'll look at setting up 3.34.6 for testing over the next few days.
image.png (view on web) https://github.com/ccrook/QGIS-Contour-Plugin/assets/631058/fdcadf57-4649-4d09-a3b6-8f60ff4b385f
— Reply to this email directly, view it on GitHub https://github.com/ccrook/QGIS-Contour-Plugin/issues/52#issuecomment-2101349601, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIKSNPHFJ3DE2FJD347SOGDZBKBQTAVCNFSM6AAAAABHK46DSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRGM2DSNRQGE . You are receiving this because you were mentioned.Message ID: @.***>
Hi @phil0906. Sorry - I've been really slow on this. Just got QGIS 3.34.6 going on Ubuntu 23.10. The contouring works just fine, so still not able to replicate. The contouring plug in uses a python library, matplotlib, to calculate the contours, so that is one possible source of difference.
Please could you open the python console, then type in two commands:
import matplotlib
matplotlib.__version__
This should print the version of the library you have - I have 3.6.3.
Thanks.
Hi Chris I'm (resp. QGIS 3.34.6) using version '3.8.4' of matplotlib. QGIS version 3.28.11 (where everything worked fine) uses version 3.5.1
Thanks. I think this may be related to a matplotlib API change at 3.8.0:
ContourSet is now a single Collection Prior to this release, ContourSet (the object returned by contour) was a custom object holding multiple Collections (and not an Artist) -- one collection per level, each connected component of that level's contour being an entry in the corresponding collection.
ContourSet is now instead a plain Collection (and thus an Artist). The collection contains a single path per contour level; this path may be non-continuous in case there are multiple connected components.
I should be able to fix it from this information.
Hi Chris Is there any chance to get this fix within the next two weeks? This would be helpful for my current project. Many thanks in advance for your answer Philipp
Am So., 19. Mai 2024 um 21:03 Uhr schrieb Chris Crook < @.***>:
Thanks. I think this may be related to a matplotlib API change at 3.8.0 https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html :
ContourSet is now a single Collection Prior to this release, ContourSet https://matplotlib.org/stable/api/contour_api.html#matplotlib.contour.ContourSet (the object returned by contour https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.contour.html#matplotlib.axes.Axes.contour) was a custom object holding multiple Collection https://matplotlib.org/stable/api/collections_api.html#matplotlib.collections.Collections (and not an Artist https://matplotlib.org/stable/api/artist_api.html#matplotlib.artist.Artist) -- one collection per level, each connected component of that level's contour being an entry in the corresponding collection.
ContourSet https://matplotlib.org/stable/api/contour_api.html#matplotlib.contour.ContourSet is now instead a plain Collection https://matplotlib.org/stable/api/collections_api.html#matplotlib.collections.Collection (and thus an Artist https://matplotlib.org/stable/api/artist_api.html#matplotlib.artist.Artist). The collection contains a single path per contour level; this path may be non-continuous in case there are multiple connected components.
I should be able to fix it from this information.
— Reply to this email directly, view it on GitHub https://github.com/ccrook/QGIS-Contour-Plugin/issues/52#issuecomment-2119330649, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIKSNPASOAKW4ZQTQR5DKUTZDDZRJAVCNFSM6AAAAABHK46DSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGMZTANRUHE . You are receiving this because you were mentioned.Message ID: @.***>
Hi Phil. Yes ... I plan to get it done in the next few days (a convenient public holiday!). Sorry it has take so long. Just been a bit short of spare time till now.
Hi @phil0906. Finally I think this is fixed. Please let me know if it is still not working for you. Fix is applied in pull request #53 if you are curious about the details. I fixed another issue at the same time (when opening the contour dialog with a contour layer selected it could generate an error "AttributeError: 'NoneType' object has no attribute 'sourceCrs'".
Apologies again for the long delay in getting this fixed. Just bad timing :-(
Hi Chris It works fine :-). Thanks for the update.
Am Mo., 3. Juni 2024 um 12:05 Uhr schrieb Chris Crook < @.***>:
Hi @phil0906 https://github.com/phil0906. Finally I think this is fixed. Please let me know if it is still not working for you. Fix is applied in pull request #53 https://github.com/ccrook/QGIS-Contour-Plugin/pull/53 if you are curious about the details. I fixed another issue at the same time (when opening the contour dialog with a contour layer selected it could generate an error "AttributeError: 'NoneType' object has no attribute 'sourceCrs'".
Apologies again for the long delay in getting this fixed. Just bad timing :-(
— Reply to this email directly, view it on GitHub https://github.com/ccrook/QGIS-Contour-Plugin/issues/52#issuecomment-2144795582, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIKSNPAL6KDYM3C65EM46ZTZFQ5VHAVCNFSM6AAAAABHK46DSOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBUG44TKNJYGI . You are receiving this because you were mentioned.Message ID: @.***>
Great! There will be another update shortly based on my learnings from this (issue #54).
I'm using the contour plugin for many years always with the same parameters. Since QGIS 3.34.6 I got wrong contour lines.
Point-Dataset: HP3.gpkg, Field with Z-Value: "Höhe" HP3.zip
Result with QGIS 3.34.6: HP3_Contours_wrong.gpkg (file size exceeds upload-limit)
Result with QGIS 3.34.5 and earlier: HP3_Contours_ok.gpkg (file size exceeds upload-limit)
Parameters for contour line [calculation:]