Your message dated Tue, 29 Mar 2022 17:05:11 +0200
with message-id <[email protected]>
and subject line Re: Bug#1008612: libspatialite7: erroneous geometry conversion 
using ST_Transform
has caused the Debian Bug report #1008612,
regarding libspatialite7: erroneous geometry conversion using ST_Transform
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1008612: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008612
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libspatialite7
Version: 5.0.1-2

Hello,

I have discovered a bug in libspatialite7’s ST_Transform() function where 
transforms from WGS84 geographic coordinates (EPSG:4326) to NAD83 UTM 10N 
(26910) returns the result for WGS84 UTM 10N (32610).  This appears to only be 
occurring on Debian 11 (and perhaps other versions, as well as Ubuntu 20.04, 
and perhaps other versions). The behavior on macOS and Alpine Linux appears to 
be correct. Here are the steps to reproduce:

# DB Setup

CREATE TABLE IF NOT EXISTS test(id INTEGER PRIMARY KEY);
SELECT AddGeometryColumn ('test', 'point', 4326, 'POINT', 'XY', 1);

INSERT INTO test (point) VALUES (GeomFromText('POINT(-122.338928 47.629273)', 
4326));
INSERT INTO test (point) VALUES (GeomFromText('POINT(-122.338923 47.62927)', 
4326));
INSERT INTO test (point) VALUES (GeomFromText('POINT(-122.33895 47.629253)', 
4326));
INSERT INTO test (point) VALUES (GeomFromText('POINT(-122.392051 47.62888)', 
4326));
INSERT INTO test (point) VALUES (GeomFromText('POINT(-122.392038 47.62888)', 
4326));


# Results from Debian 11 (ARM64 and x86_64) and Ubuntu 22.04 (ARM64):

spatialite> SELECT AsText(point), AsText(ST_Transform(point, 26910)) FROM test;
POINT(-122.338928 47.629273)|POINT(549665.036792 5275308.276363)
POINT(-122.338923 47.62927)|POINT(549665.415273 5275307.94615)
POINT(-122.33895 47.629253)|POINT(549663.402919 5275306.039517)
POINT(-122.392051 47.62888)|POINT(545674.35684 5275231.954471)
POINT(-122.392038 47.62888)|POINT(545675.333511 5275231.962125)

spatialite> SELECT AsText(point), AsText(ST_Transform(point, 32610)) FROM test;
POINT(-122.338928 47.629273)|POINT(549665.158878 5275308.476981)
POINT(-122.338923 47.62927)|POINT(549665.53736 5275308.14677)
POINT(-122.33895 47.629253)|POINT(549663.525012 5275306.240133)
POINT(-122.392051 47.62888)|POINT(545674.479273 5275232.145082)
POINT(-122.392038 47.62888)|POINT(545675.455944 5275232.152738)
spatialite> 


# Results from macOS 12 (Homebrew or MacPorts; ARM64 and x86_64):

spatialite> SELECT AsText(point), AsText(ST_Transform(point, 26910)) FROM test;
AsText(point)                 AsText(ST_Transform(point, 26910))
----------------------------  ----------------------------------
POINT(-122.338928 47.629273)  POINT(549665.158879 5275308.47686)
POINT(-122.338923 47.62927)   POINT(549665.537361 5275308.146648)
POINT(-122.33895 47.629253)   POINT(549663.525012 5275306.240011)
POINT(-122.392051 47.62888)   POINT(545674.479273 5275232.14496)
POINT(-122.392038 47.62888)   POINT(545675.455944 5275232.152617)

spatialite> SELECT AsText(point), AsText(ST_Transform(point, 32610)) FROM test;
AsText(point)                 AsText(ST_Transform(point, 32610)) 
----------------------------  -----------------------------------
POINT(-122.338928 47.629273)  POINT(549665.158878 5275308.476981)
POINT(-122.338923 47.62927)   POINT(549665.53736 5275308.14677)  
POINT(-122.33895 47.629253)   POINT(549663.525012 5275306.240133)
POINT(-122.392051 47.62888)   POINT(545674.479273 5275232.145082)
POINT(-122.392038 47.62888)   POINT(545675.455944 5275232.152738)
spatialite>


# Results from Alpine Linux 3.15 (ARM64 and x86_64):

sqlite> SELECT AsText(point), AsText(ST_Transform(point, 26910)) FROM test;
POINT(-122.338928 47.629273)|POINT(549665.158879 5275308.47686)
POINT(-122.338923 47.62927)|POINT(549665.537361 5275308.146648)
POINT(-122.33895 47.629253)|POINT(549663.525012 5275306.240011)
POINT(-122.392051 47.62888)|POINT(545674.479273 5275232.14496)
POINT(-122.392038 47.62888)|POINT(545675.455944 5275232.152617)

sqlite> SELECT AsText(point), AsText(ST_Transform(point, 32610)) FROM test;
POINT(-122.338928 47.629273)|POINT(549665.158878 5275308.476981)
POINT(-122.338923 47.62927)|POINT(549665.53736 5275308.14677)
POINT(-122.33895 47.629253)|POINT(549663.525012 5275306.240133)
POINT(-122.392051 47.62888)|POINT(545674.479273 5275232.145082)
POINT(-122.392038 47.62888)|POINT(545675.455944 5275232.152738)


To make sure this wasn’t PROJ that was broken, I did the following PROJ queries:

# Results from Debian 11 (ARM64 and x86_64) and Ubuntu 22.04 (ARM64):

echo -122.338928 47.629273 | cct -c1,2 -d6 -z0 -t0 +proj=utm +zone=10 
+ellps=GRS80 +datum=NAD83 +units=m +no_defs
549665.158878  5275308.476964      0.000057        0.0000

echo -122.338928 47.629273 | cct -c1,2 -d6 -z0 -t0 +proj=utm +zone=10 
+ellps=WGS84 +datum=WGS84 +units=m +no_defs
549665.158878  5275308.476981      0.000000        0.0000

# Results from macOS 12 (Homebrew or MacPorts; ARM64 and x86_64):

echo -122.338928 47.629273 | cct -c1,2 -d6 -z0 -t0 +proj=utm +zone=10 
+ellps=WGS84 +datum=WGS84 +units=m +no_defs
549665.158878  5275308.476981      0.000000        0.0000

echo -122.338928 47.629273 | cct -c1,2 -d6 -z0 -t0 +proj=utm +zone=10 
+ellps=GRS80 +datum=NAD83 +units=m +no_defs
549665.158878  5275308.476964      0.000057        0.0000

# Results from Alpine Linux 3.15 (ARM64 and x86_64):

echo -122.338928 47.629273 | cct -c1,2 -d6 -z0 -t0 +proj=utm +zone=10 
+ellps=GRS80 +datum=NAD83 +units=m +no_defs
549665.158878  5275308.476964      0.000057        0.0000

echo -122.338928 47.629273 | cct -c1,2 -d6 -z0 -t0 +proj=utm +zone=10 
+ellps=WGS84 +datum=WGS84 +units=m +no_defs
549665.158878  5275308.476964      0.000057        0.0000


So it seems that the PROJ output is the same for all three (or six if you 
include architecture), so the problem likely lies in libspatialite7 on 
Debian/Ubuntu.


Please let me know if you need more information.

Thanks,

Brian

--- End Message ---
--- Begin Message ---
Hi Brian,

I'm not in a position to address this issue, please take it upstream. Either the mailing list:

 https://groups.google.com/g/spatialite-users

Or the issue tracker:

 https://www.gaia-gis.it/fossil/libspatialite/index

Be aware that upstream development is very slow, don't get your hopes up for a quick fix.

Kind Regards,

Bas

--
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1

--- End Message ---

Reply via email to