[postgis-users] Different hex POINT representation but the same coordinates?
Darafei "Komяpa" Praliaskouski
me at komzpa.net
Mon Oct 5 08:27:18 PDT 2020
It's easy to see the difference if you ask for more precision:
18:26:40 [gis] > SELECT
ST_AsText(ST_GeomFromWKB('\x01010000000ad7a3f0735727c13d0ad7a3ae0c30c1'),150);
┌───────────────────────────────────────────────────────────────────────────────────────────┐
│ st_astext
│
├───────────────────────────────────────────────────────────────────────────────────────────┤
│ POINT(-764857.96999999997206032276153564453125
-1051822.63999999989755451679229736328125) │
└───────────────────────────────────────────────────────────────────────────────────────────┘
(1 row)
Time: 24,109 ms
18:26:41 [gis] > SELECT
ST_AsText(ST_GeomFromWKB('\x01010000000ad7a3f0735727c13e0ad7a3ae0c30c1'),150);
┌──────────────────────────────────────────────────────────────────────────────────────────┐
│ st_astext
│
├──────────────────────────────────────────────────────────────────────────────────────────┤
│ POINT(-764857.96999999997206032276153564453125
-1051822.6400000001303851604461669921875) │
└──────────────────────────────────────────────────────────────────────────────────────────┘
(1 row)
Time: 0,519 ms
On Mon, Oct 5, 2020 at 6:21 PM Michal Seidl <michal.seidl at gmail.com> wrote:
> Hello I have two points with different HEX representation but the same
> WKT representation? I do not know the binary representation in detail.
>
> The difference in HEX is somewhere in th middle "d" versus "e" value
>
> SELECT
> ST_AsEWKT(ST_GeomFromWKB('\x01010000000ad7a3f0735727c13e0ad7a3ae0c30c1'));
>
> SELECT
> ST_AsEWKT(ST_GeomFromWKB('\x01010000000ad7a3f0735727c13d0ad7a3ae0c30c1'));
>
> SELECT ST_GeomFromWKB('\x01010000000ad7a3f0735727c13e0ad7a3ae0c30c1') =
> ST_GeomFromWKB('\x01010000000ad7a3f0735727c13d0ad7a3ae0c30c1');
>
> So what is different?
>
> Michal
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201005/4194dc6b/attachment.html>
More information about the postgis-users
mailing list