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