[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] PostgreSQL 13, PostGIS 3.1 import - could not form projection
From: "karsten" <karsten () terragis ! net>
Date: 2021-10-20 3:04:55
Message-ID: 290DCCC072284CA683F205856D56830C () terragispc
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Thanks so much for the hints.
It turns out that the trouble must likely stem from incompatible versions
from the <http://postgresql.org/> postgresql.org and the ubuntugis unstable
repos.
I was on IRC today and got sorted it out using hints from Regina O. I ended
up removing the postgres repro, re-installing using postgres 12 (from
'universe', and postgis 3, restored db from dump and thus got all working
now.
However, of course this is now not postgres 13 now but a take away message
is that it might end up in trouble when using the two repos and end up with
'mixed' installs, likely due to the bigger changes with proj in the newer
versions ...
Maybe I should just always use only Docker containers for such things to
avoid such trouble ...
Cheers
Karsten
_____
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf
Of Richard Greenwood
Sent: Tuesday, October 19, 2021 19:51
To: PostGIS Users Discussion
Subject: Re: [postgis-users] PostgreSQL 13, PostGIS 3.1 import - could not
form projection
On Tue, Oct 19, 2021 at 1:34 PM karsten <karsten@terragis.net> wrote:
Is anyone out there that happens to know
how can I make PostgreSQL use the new proj lib version I have installed?
I imagine that you would need to build postgis from source to get it to use
the newer proj version (and install the corresponding libproj-dev,
libgeos-dev, etc.). But before you go to that trouble you should explore
other options. Why not just comment out the offending line and put the index
in later? I did a quick test creating a table with
geometry(MultiPolygon,2263) and then
CREATE INDEX test_geohash ON test USING btree
(st_geohash(st_transform(wkb_geometry, 4326)));
and go no errors. I'm on Ubuntu 20.02, postgres 13, postgis 3.1 installed
from the postgresql.org repo (not the native Ubuntu repo).
Try firing up a clean AWS instance and starting clean. I can't imagine that
you really need proj > 6.
Rich
-----Original Message-----
From: karsten [mailto:karsten@terragis.net]
Sent: Friday, October 15, 2021 12:03
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] PostgreSQL 13, PostGIS 3.1 import - could not
form projection
I installed proj-bin v 7.2.1-1 that was available from the apt packages but
in postgres (also after) restart of the db it still list PROJ="6.3.1" being
used.
How can I make postgresql use the new proj ?
-----Original Message-----
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf
Of karsten
Sent: Friday, October 15, 2021 11:47
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] PostgreSQL 13, PostGIS 3.1 import - could not
form projection
Yes will try to get this to work and report back here.
The stack exchange issue mentioned that it worked with an older gdal version
so will try with both different proj and gdal combinations
Karsten
-----Original Message-----
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf
Of Paul Ramsey
Sent: Friday, October 15, 2021 11:36
To: PostGIS Users Discussion
Subject: Re: [postgis-users] PostgreSQL 13, PostGIS 3.1 import - could not
form projection
There's something very particular about your environment and I don't know
what it is. Try upgrading your proj version, and jimmying with other version
combinations. There's nothing special about the SRID numbers, they work fine
for me locally. I can't invest the time in setting up a mirror system that
matches yours. If there's something specific about proj 6.3.1 maybe? (both
you and the stack exchange issue)
P
> On Oct 15, 2021, at 11:11 AM, karsten <karsten@terragis.net> wrote:
>
> Hi All,
>
> on new server with Ubuntu 20.04 , PostgreSQL 13, PostGIS 3.1 I am
> trying to import a plain sql dump . This mostly worked but when the
> script is executing the creation of a geohash (involving a
> transformation from srid 2263 to geographic 4326) like this
>
> CREATE INDEX parcels_geohash ON parcels USING btree
> (st_geohash(st_transform(geom, 4326)));
>
> I am getting this error:
> could not form projection (PJ) from 'srid=2263' to 'srid=4326'
>
> How can I fix this ?
>
> Here are more details about the environment:
> postgres: PostgreSQL 13.4 (Ubuntu 13.4-4.pgdg20.04+1) on
> x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04)
> 9.3.0, 64-bit
> postgis_version: 3.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
> postgis_proj_version: 6.3.1
>
> Cheers
> Karsten
>
> Karsten Vennemann
> www.terragis.net
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
--
Richard W. Greenwood
www.greenwoodmap.com
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.10570.1001"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=125285702-20102021><FONT color=#000080
size=2 face=Arial>Thanks so much for the hints.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=125285702-20102021><FONT color=#000080
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=125285702-20102021><FONT color=#000080
size=2 face=Arial>It turns out that the trouble must likely stem from
incompatible versions from the </FONT><A href="http://postgresql.org/"><FONT
color=#000080 size=2 face=Arial>postgresql.org</FONT></A><FONT color=#000080
size=2 face=Arial> and the ubuntugis unstable repos. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=125285702-20102021><FONT color=#000080
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=125285702-20102021><FONT color=#000080
size=2 face=Arial>I was on IRC today and got sorted it out using hints from
Regina O. I ended up removing the postgres repro,
re-installing using postgres 12 (from 'universe', and postgis 3, restored
db from dump and thus got all working now. <BR>However, of course this is now
not postgres 13 now but a take away message is that it might end up in trouble
when using the two repos and end up with 'mixed' installs,
</FONT></SPAN><SPAN class=125285702-20102021><FONT color=#000080 size=2
face=Arial>likely due to the bigger changes with proj in the newer versions
...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#000080><SPAN
class=125285702-20102021></SPAN><SPAN
class=125285702-20102021></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#000080><SPAN
class=125285702-20102021>Maybe I should just always use only Docker
containers for such things to avoid such trouble
...</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><FONT color=#000080><SPAN
class=125285702-20102021></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=125285702-20102021><FONT color=#000080
size=2 face=Arial>Cheers</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=125285702-20102021><FONT color=#000080
size=2 face=Arial>Karsten </FONT></SPAN></DIV><BR>
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> postgis-users
[mailto:postgis-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Richard
Greenwood<BR><B>Sent:</B> Tuesday, October 19, 2021 19:51<BR><B>To:</B> PostGIS
Users Discussion<BR><B>Subject:</B> Re: [postgis-users] PostgreSQL 13, PostGIS
3.1 import - could not form projection<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>
<DIV dir=ltr>
<DIV>
<DIV>On Tue, Oct 19, 2021 at 1:34 PM karsten <<A
href="mailto:karsten@terragis.net">karsten@terragis.net</A>>
wrote:<BR></DIV></DIV></DIV>
<DIV class=gmail_quote>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px \
0px 0.8ex">Is anyone out there that happens to know <BR>how can I make PostgreSQL \
use the new proj lib version I have installed?<BR></BLOCKQUOTE>
<DIV><BR></DIV>
<DIV>I imagine that you would need to build postgis from source to get it to use
the newer proj version (and install the corresponding libproj-dev, libgeos-dev,
etc.). But before you go to that trouble you should explore other options.
Why not just comment out the offending line and put the index in later? I did a
quick test creating a table with geometry(MultiPolygon,2263) and then
<DIV> CREATE INDEX test_geohash ON test USING btree
(st_geohash(st_transform(wkb_geometry, 4326)));</DIV>
<DIV>and go no errors. I'm on Ubuntu 20.02, postgres 13, postgis 3.1 installed
from the <A href="http://postgresql.org">postgresql.org</A> repo (not the native
Ubuntu repo).</DIV>
<DIV><FONT color=#000080 size=2 face=Arial></FONT><BR></DIV>
<DIV>Try firing up a clean AWS instance and starting clean. I can't imagine that
you really need proj > 6.</DIV></DIV>
<DIV><BR></DIV>
<DIV>Rich</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV> </DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0px 0px \
0px 0.8ex">-----Original Message-----<BR>From: karsten [mailto:<A \
href="mailto:karsten@terragis.net" target=_blank>karsten@terragis.net</A>] \
<BR>Sent: Friday, October 15, 2021 12:03<BR>To: 'PostGIS Users \
Discussion'<BR>Subject: RE: [postgis-users] PostgreSQL 13, PostGIS 3.1 import - \
could not<BR>form projection<BR><BR>I installed proj-bin v 7.2.1-1 that was \
available from the apt packages but<BR>in postgres (also after) restart of the db \
it still list PROJ="6.3.1" being<BR>used. <BR><BR>How can I make postgresql use the \
new proj ?<BR><BR><BR>-----Original Message-----<BR>From: postgis-users [mailto:<A
href="mailto:postgis-users-bounces@lists.osgeo.org"
target=_blank>postgis-users-bounces@lists.osgeo.org</A>] On Behalf<BR>Of
karsten<BR>Sent: Friday, October 15, 2021 11:47<BR>To: 'PostGIS Users
Discussion'<BR>Subject: Re: [postgis-users] PostgreSQL 13, PostGIS 3.1 import
- could not<BR>form projection<BR><BR>Yes will try to get this to work and
report back here. <BR><BR>The stack exchange issue mentioned that it worked
with an older gdal version<BR><BR>so will try with both different proj and
gdal combinations<BR><BR>Karsten<BR><BR>-----Original Message-----<BR>From:
postgis-users [mailto:<A href="mailto:postgis-users-bounces@lists.osgeo.org"
target=_blank>postgis-users-bounces@lists.osgeo.org</A>] On Behalf<BR>Of Paul
Ramsey<BR>Sent: Friday, October 15, 2021 11:36<BR>To: PostGIS Users
Discussion<BR>Subject: Re: [postgis-users] PostgreSQL 13, PostGIS 3.1 import -
could not<BR>form projection<BR><BR>There's something very particular about
your environment and I don't know<BR>what it is. Try upgrading your proj
version, and jimmying with other version<BR>combinations. There's nothing
special about the SRID numbers, they work fine<BR>for me locally. I can't
invest the time in setting up a mirror system that<BR>matches yours. If
there's something specific about proj 6.3.1 maybe? (both<BR>you and the stack
exchange issue)<BR><BR>P<BR><BR>> On Oct 15, 2021, at 11:11 AM, karsten
<<A href="mailto:karsten@terragis.net"
target=_blank>karsten@terragis.net</A>> wrote:<BR>> <BR>> Hi
All,<BR>> <BR>> on new server with Ubuntu 20.04 , PostgreSQL 13,
PostGIS 3.1 I am <BR>> trying to import a plain sql dump . This mostly
worked but when the <BR>> script is executing the creation of a geohash
(involving a <BR>> transformation from srid 2263 to geographic 4326) like
this<BR>> <BR>> CREATE INDEX parcels_geohash ON parcels USING
btree <BR>> (st_geohash(st_transform(geom, 4326)));<BR>> <BR>>
I am getting this error: <BR>> could not form projection (PJ) from
'srid=2263' to 'srid=4326'<BR>> <BR>> How can I fix this ?<BR>>
<BR>> Here are more details about the environment: <BR>> postgres:
PostgreSQL 13.4 (Ubuntu 13.4-4.pgdg20.04+1) on <BR>> x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) <BR>> 9.3.0, 64-bit<BR>>
postgis_version: 3.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1<BR>>
postgis_proj_version: 6.3.1<BR>> <BR>> Cheers<BR>>
Karsten<BR>> <BR>> Karsten Vennemann<BR>> <A
href="http://www.terragis.net" rel=noreferrer
target=_blank>www.terragis.net</A><BR>> <BR>>
_______________________________________________<BR>> postgis-users mailing
list<BR>> <A href="mailto:postgis-users@lists.osgeo.org"
target=_blank>postgis-users@lists.osgeo.org</A><BR>> <A
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel=noreferrer
target=_blank>https://lists.osgeo.org/mailman/listinfo/postgis-users</A><BR><BR>_______________________________________________<BR>postgis-users \
mailing list<BR><A href="mailto:postgis-users@lists.osgeo.org"
target=_blank>postgis-users@lists.osgeo.org</A><BR><A
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel=noreferrer
target=_blank>https://lists.osgeo.org/mailman/listinfo/postgis-users</A><BR><BR><BR>_______________________________________________<BR>postgis-users \
mailing list<BR><A href="mailto:postgis-users@lists.osgeo.org"
target=_blank>postgis-users@lists.osgeo.org</A><BR><A
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel=noreferrer
target=_blank>https://lists.osgeo.org/mailman/listinfo/postgis-users</A><BR><BR><BR>_______________________________________________<BR>postgis-users \
mailing list<BR><A href="mailto:postgis-users@lists.osgeo.org"
target=_blank>postgis-users@lists.osgeo.org</A><BR><A
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel=noreferrer
target=_blank>https://lists.osgeo.org/mailman/listinfo/postgis-users</A><BR></BLOCKQUOTE></DIV><BR \
clear=all>
<DIV><BR></DIV>-- <BR>
<DIV class=gmail_signature dir=ltr>
<DIV dir=ltr>Richard W. Greenwood<BR><A href="http://www.greenwoodmap.com"
target=_blank>www.greenwoodmap.com</A></DIV></DIV></DIV></BODY></HTML>
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic