[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qgis-developer
Subject:    Re: [QGIS-Developer] GeomFromText cuts decimal values
From:       Andrea Giudiceandrea via QGIS-Developer <qgis-developer () lists ! osgeo ! org>
Date:       2022-08-11 14:25:27
Message-ID: 76b63ba7-36dc-67d3-37f4-113645f100bb () libero ! it
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> *Prof. Dr. Jörg Höttges*hoettges at fh-aachen.de 
> <mailto:qgis-developer%40lists.osgeo.org?Subject=Re%3A%20%5BQGIS-Developer%5D%20Geom \
> FromText%20cuts%20decimal%20values&In-Reply-To=%3C432c9575-39fc-7963-6015-facdd2d3da11%40fh-aachen.de%3E>
>  /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


[Attachment #5 (text/html)]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <blockquote type="cite"><b style="color: rgb(0, 0, 0); font-family:
        &quot;Times New Roman&quot;; font-size: medium; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; letter-spacing: normal; orphans: 2; text-align: start;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial;">Prof. Dr. Jörg Höttges</b><span
        style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;"><span> </span></span><a
href="mailto:qgis-developer%40lists.osgeo.org?Subject=Re%3A%20%5BQGIS-Developer%5D%20G \
eomFromText%20cuts%20decimal%20values&amp;In-Reply-To=%3C432c9575-39fc-7963-6015-facdd2d3da11%40fh-aachen.de%3E"
  title="[QGIS-Developer] GeomFromText cuts decimal values"
        style="font-family: &quot;Times New Roman&quot;; font-size:
        medium; font-style: normal; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: start; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;">hoettges at
        fh-aachen.de</a><br style="color: rgb(0, 0, 0); font-family:
        &quot;Times New Roman&quot;; font-size: medium; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">
      <i style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-variant-ligatures: normal;
        font-variant-caps: normal; font-weight: 400; letter-spacing:
        normal; orphans: 2; text-align: start; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial;">Thu Aug 11 03:24:32
        PDT 2022</i><span style="color: rgb(0, 0, 0); font-family:
        &quot;Times New Roman&quot;; font-size: medium; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255); text-decoration-thickness: initial; text-decoration-style:
        initial; text-decoration-color: initial; display: inline
        !important; float: none;"></span>
      <hr style="color: rgb(0, 0, 0); font-family: &quot;Times New
        Roman&quot;; font-size: medium; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">
      <pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; \
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; \
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; \
text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration-thickness: initial; text-decoration-style: initial; \
text-decoration-color: initial;">    SELECT \
aswkt(GEOMFROMTEXT('POINT(340178.042761887 5659302.0567476)',25832)) as geom

i get

    geom
    POINT(340178 5659302)
</pre>
    </blockquote>
    <br>
    Hi,<br>
    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<br>
    <br>
    SELECT aswkt(GEOMFROMTEXT('POINT(340178.042761887
    5659302.0567476)',25832)) as geom<br>
    <br>
    outputs<br>
    <br>
    geom<br>
    POINT(340178.042761887 5659302.0567476)<br>
    <br>
    while the statement<br>
    <br>
    SELECT aswkt(GEOMFROMTEXT('POINT(340178,042761887
    5659302,0567476)',25832)) as geom<br>
    <br>
    outputs<br>
    <br>
    geom<br>
    NULL<br>
    <br>
    <br>
    Best regards.<br>
    <br>
    Andrea Giudiceandrea<br>
  </body>
</html>



_______________________________________________
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic