jonnyhuck / RFCL-PolygonDivider

QGIS Plugin for dividing polygons
GNU General Public License v3.0
39 stars 12 forks source link

Deprecation warning #24

Closed deskoop closed 3 months ago

deskoop commented 4 months ago

Hi, thanks for this great plugin!

I am trying to use it on QGIS version 3.34.3-Prizren

When the process starts, I get this in the Log panel:

2024-02-27T18:43:04     WARNING    warning:/home/user/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Submission/polygon_divider.py:521: DeprecationWarning: QgsVectorFileWriter constructor is deprecated
              writer = QgsVectorFileWriter(outFilePath, "CP1250", fieldList, QgsWkbTypes.Polygon, layer.crs(), "ESRI Shapefile")

             traceback: File "/home/user/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Submission/polygon_divider.py", line 521, in run
              writer = QgsVectorFileWriter(outFilePath, "CP1250", fieldList, QgsWkbTypes.Polygon, layer.crs(), "ESRI Shapefile")

Is this anything I should worry about?

Ss a side note, I notice that the division process is quite slow (although the area is rather large and the subdivisions are millions, so maybe it's just related to the computational power of my PC). Is there anything I can do to speed up? I do have a GPU (and it is correctly recognized when I activate OpenCL in Settings), but I guess the process uses mostly CPU and not GPU, is that correct?

Thanks again


QGIS version 3.34.3-Prizren QGIS code revision 47373234acd Qt version 5.15.3 Python version 3.10.12 GDAL/OGR version 3.4.1 PROJ version 8.2.1 EPSG Registry database version v10.076 (2022-08-31) Compiled against GEOS 3.10.2-CAPI-1.16.0 Running against GEOS 3.11.1-CAPI-1.17.1 SQLite version 3.37.2 PDAL version 2.3.0 PostgreSQL client version 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1) SpatiaLite version 5.0.1 QWT version 6.1.4 QScintilla2 version 2.11.6 OS version Ubuntu 22.04.4 LTS

Active Python plugins Submission 0.7 MetaSearch 0.3.6 processing 2.12.99 grassprovider 2.12.99 db_manager 0.1.20

jonnyhuck commented 4 months ago

Thanks for this - nothing to worry about (it is just a warning that one of the functions I used will be replaced in the future), I will push an update to resolve before it becomes an issue. Thanks for letting me know!

jonnyhuck commented 4 months ago

On the speed thing - it is doing a lot of work (lots of repeated optimisations), and so will take some time for a large dataset. At the moment is is entirely CPU, but there might be some scope to add some GPU functionality (I would have to look into it though - I'm not sure how easy this would be to implement off the top of my head!)

jonnyhuck commented 3 months ago

This has been fixed in the latest commit, new release should be available soon