Re: [QGIS-Developer] createAlgorithmDialog in Processing script (within plugin)

2022-08-11 Thread Germán Carrillo via QGIS-Developer
Hi Matteo,

If you want and if you have the time, we could have a look at this issue at
the QGIS Contributors Meeting in Firenze :)

Regards!

Germán


El lun, 1 ago 2022 a las 17:07, matteo () escribió:

> Hi German,
>
> yes in your way it is working. But what if you try not with the
> algorithm/model id, but with an instance of the algorithm?
>
> In the docs I read "Either an instance of an algorithm, or an
> algorithm's ID", therefore I'm trying to set up an instance of my
> algorithm and then passing it to the method
>
> Cheers and thanks
>
> Matteo
>
> On 8/1/22 16:17, Germán Carrillo wrote:
> > Hi Matteo,
> >
> > I've been successfully using /execAlgorithmDialog()/ instead [0]:
> >
> > /processing.execAlgorithmDialog("my_provider:my_algorithm", params)/
> >
> > where, /params/ is a dict with the pre-filled values you have. You can
> > see an example at [1].
> >
> > Regards,
> >
> > Germán
> > ---
> > [0]
> >
> https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185
> <
> https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185
> >
> > [1]
> >
> https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140
> <
> https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140
> >
> >
> >
> > El lun, 1 ago 2022 a las 15:23, matteo via QGIS-Developer
> > ( > >) escribió:
> >
> > Hi all,
> >
> > I've a set of custom processing scripts within a plugin (that is both
> > "normal" and processing provider plugin).
> >
> > I'm trying to executing the dialog of these algorithm from one of the
> > main plugin file. I found the processing.createAlgorithmDialog [0],
> but
> > it is constantly crashing when I'm passing the instance of the
> > algorithm:
> >
> > my_alg = MyCustomAlg()
> > my_dialog = my_alg.createAlgorithmDialog(custom_dict)
> >
> > ## crash here
> >
> > Thinking it was a problem of the threads I also tried to overwrite
> the
> > `flag` method in the algorithm by setting also
> > QgsProcessingAlgorithm.FlagNoThreading but with the same results.
> >
> > I know I can run the processing algorithm with processing.run()
> but
> > I need to open the dialog pre-filled with custom parameters and to
> get
> > also some other outputs besides the standard ones (like the
> > QgsFeatureSink path)
> >
> > Thanks for any suggestion
> >
> > Cheers
> >
> > Matteo
> >
> >
> > [0]
> >
> https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155
> <
> https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155
> >
> >
> > ___
> > QGIS-Developer mailing list
> > QGIS-Developer@lists.osgeo.org  QGIS-Developer@lists.osgeo.org>
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > 
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> > 
> >
> >
> >
> > --
> > ---
> > |\__
> > (:>__)(
> > |/
> > Soluciones Geoinformáticas Libres
> > http://geotux.tuxfamily.org/ 
> > https://twitter.com/GeoTux2 
> >
> > 
>


-- 
---
   |\__
(:>__)(
   |/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
https://twitter.com/GeoTux2 


___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] GeomFromText cuts decimal values

2022-08-11 Thread Andrea Giudiceandrea via QGIS-Developer
*Prof. Dr. Jörg Höttges*hoettges at fh-aachen.de 


/Thu Aug 11 03:24:32 PDT 2022/

     SELECT aswkt(GEOMFROMTEXT('POINT(340178.042761887 
5659302.0567476)',25832)) as geom

i get

     geom
     POINT(340178 5659302)


Hi,
I've just tried using QGIS 3.22.9 and QGIS 3.26.1 on Windows 10 and 
Ubuntu 22.04 (Italian) with "Italian Italy (it_IT)" locale (a locale for 
which the comma is the decimal separator): the statement


SELECT aswkt(GEOMFROMTEXT('POINT(340178.042761887 
5659302.0567476)',25832)) as geom


outputs

geom
POINT(340178.042761887 5659302.0567476)

while the statement

SELECT aswkt(GEOMFROMTEXT('POINT(340178,042761887 
5659302,0567476)',25832)) as geom


outputs

geom
NULL


Best regards.

Andrea Giudiceandrea___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] GeomFromText cuts decimal values, it works, thanks!

2022-08-11 Thread Prof . Dr . Jörg Höttges via QGIS-Developer

Hi,

many thanks, it works. Until today I could always rely on the fact that the decimal point worked in programming 
languages and databases. So I didn't expect that...


By the way: In SpatialiteGUI everthing worked fine...

Best wishes

Jörg


Am 11.08.2022 um 14:08 schrieb Werner Macho:

Hi!
Back on my computer I just tried your exact first example on a fresh created gpkg layer in the database window in QGIS 
3.26.1 on a german Version of Windows 10:

SELECT aswkt(GEOMFROMTEXT('POINT(340178.042761887 5659302.0567476)',25832)) as 
geom
and the result is:
geom
POINT(340178.042761887 5659302.0567476)

Which version of QGIS on what OS you are on?
Maybe you set some language settings in the OS (or even maybe in QGIS itself?)

regards
Werner

On Thu, Aug 11, 2022 at 1:31 PM FH Aachen  wrote:

Hi Werner,

yes, i did... But it didn't work. Especially not for line objects or 
polygons: GeomFromText('LineString(35.123
560, 350020.456 560)'), because the comma ist used to seperate the 
coordinate value pairs.

Regards
Jörg

11.08.2022 12:46:07 Werner Macho via QGIS-Developer 
:

> Hi,
> Have you tried to substitute point with comma?
> Worth a try.
>
> Regards werner
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



smime.p7s
Description: S/MIME Cryptographic Signature
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] GeomFromText cuts decimal values

2022-08-11 Thread Werner Macho via QGIS-Developer
Hi,
Have you tried to substitute point with comma?
Worth a try.

Regards werner
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] GeomFromText cuts decimal values

2022-08-11 Thread Prof . Dr . Jörg Höttges via QGIS-Developer

Hi list,

in the database window of QGIS 3.24.3 I tried to create geometries via 
GEOMFROMTEXT, but with

   SELECT aswkt(GEOMFROMTEXT('POINT(340178.042761887 5659302.0567476)',25832)) 
as geom

i get

   geom
   POINT(340178 5659302)

where the decimal part has been lost. Have i done something wrong?

Kind regards,

Jörg Höttges



smime.p7s
Description: S/MIME Cryptographic Signature
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] OSGEO4W nightlies broken?

2022-08-11 Thread Jürgen E . Fischer via QGIS-Developer
Hi Nyall,

On Thu, 11. Aug 2022 at 14:51:16 +1000, Nyall Dawson via QGIS-Developer wrote:
> It looks like the osgeo4w qgis dev releases are stuck with an ~10 day
> old build right now. Is this a known issue? Or something broken on the
> osgeo4w infrastructure?

Another unique_ptr template issue:

C:/PROGRA~2/MICROS~3/2019/COMMUN~1/VC/Tools/MSVC/1429~1.300/bin/Hostx64/x64/cl.exe
  /nologo /TP -DNOMINMAX -DQT_CONCURRENT_LIB -DQT_CORE_LIB 
-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050800 -DQT_GUI_LIB 
-DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH 
-DQT_POSITIONING_LIB -DQT_PRINTSUPPORT_LIB -DQT_SERIALPORT_LIB -DQT_SQL_LIB 
-DQT_SVG_LIB -DQT_USE_QSTRINGBUILDER -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB 
-DQT_WIDGETS_LIB -DQT_XML_LIB -DSIP_VERSION=0x060101 
-DTEST_DATA_DIR=/"C:/src/OSGeo4W/src/qgis-dev/qgis/tests/testdata/" -DWITH_COPC 
-DWITH_EPT -DWITH_QTWEBKIT -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS 
-D_HAS_AUTO_PTR_ETC=1 -D_HAVE_WINDOWS_H_ -D_USE_MATH_DEFINES 
-Dqgis_core_EXPORTS 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/build/src/core/qgis_core_autogen/include 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/build 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/external/poly2tri 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers/ept 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers/copc 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/build/src/core 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/3d 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/annotations 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/auth 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/browser 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/callouts 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/classification 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/diagram 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/dxf 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/editform 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/effects 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/elevation 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/expression 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/externalstorage 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/fieldformatter 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/geometry 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/geocms 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/geocms/geonode 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/geocoding 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/gps 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/labeling 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/layertree 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/layout 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/locator 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/maprenderer 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/mesh 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/metadata 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/network 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/numericformats 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/pal 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/plot 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/pointcloud 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/pointcloud/expression 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/processing 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/processing/models 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/proj 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/project 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers/arcgis 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers/memory 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers/gdal 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers/ogr 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/providers/meshmemory 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/raster 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/renderer 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/scalebar 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/settings 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/symbology 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/textrenderer 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/validity 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/vector 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/src/core/vectortile 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/external 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/external/nlohmann 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/external/kdbush/include 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/external/nmea 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/external/rtree/include 
-IC:/src/OSGeo4W/src/qgis-dev/qgis/external/meshOptimizer 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/osgeo4w/include 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/osgeo4w/apps/Qt5/include 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/osgeo4w/apps/Qt5/include/QtCore 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/osgeo4w/apps/Qt5/./mkspecs/win32-msvc 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/osgeo4w/apps/Qt5/include/QtGui 
-IC:/src/OSGeo4W/src/qgis-dev/osgeo4w/osgeo4w/apps/Qt5/include/QtANGLE