Hi Bas, I apologize that I mis-stated my original description of the bug. It is not that the results for 26910 transforms are the same as for 32610 transforms, but that transforms to 26910 are simply incorrect for Debian/Ubuntu.
As this is only happening on Debian/Ubuntu, it is not clear to me that bringing this upstream will result in resolution. Are there any other option to addressing this? I am happy to help with testing/debugging if that helps. Thanks, Brian > On Mar 29, 2022, at 11:18 AM, Debian Bug Tracking System > <ow...@bugs.debian.org> wrote: > > This is an automatic notification regarding your Bug report > which was filed against the libspatialite7 package: > > #1008612: libspatialite7: erroneous geometry conversion using ST_Transform > > It has been closed by Sebastiaan Couwenberg <sebas...@xs4all.nl>. > > Their explanation is attached below along with your original report. > If this explanation is unsatisfactory and you have not received a > better one in a separate message then please contact Sebastiaan Couwenberg > <sebas...@xs4all.nl> by > replying to this email. > > > -- > 1008612: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008612 > Debian Bug Tracking System > Contact ow...@bugs.debian.org with problems > > From: Sebastiaan Couwenberg <sebas...@xs4all.nl> > Subject: Re: Bug#1008612: libspatialite7: erroneous geometry conversion using > ST_Transform > Date: March 29, 2022 at 11:05:11 AM EDT > To: Brian Miles <selimna...@gmail.com>, 1008612-d...@bugs.debian.org > > > 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 > > > From: Brian Miles <selimna...@gmail.com> > Subject: libspatialite7: erroneous geometry conversion using ST_Transform > Date: March 29, 2022 at 10:47:18 AM EDT > To: sub...@bugs.debian.org > > > 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 > >