Re: [postgis-users] ST_Union on empty polygon loses SRID

2021-11-29 Thread Jonathan Schultz
I would first check how many clusters you have and versions with below command: pg_lsclusters Ver Cluster Port Status OwnerData directory Log file 12 main5432 online postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log No problems there. Chec

Re: [postgis-users] ST_Union on empty polygon loses SRID

2021-11-28 Thread Jonathan Schultz
; GDAL="GDAL 3.2.2, released 2021/03/05" LIBXML="2.9.12" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY RASTER │ └─┘ (1 row) Time: 47,743 ms 10:17:43[gis] > select ST_SRID(

Re: [postgis-users] ST_Union on empty polygon loses SRID

2021-11-27 Thread Jonathan Schultz
Thanks for the quick response! => select postgis_full_version(); postgis_full_version ---

[postgis-users] ST_Union on empty polygon loses SRID

2021-11-26 Thread Jonathan Schultz
Hello, I have found with a query that makes a union of geometries which includes an empty polygon produces a result without an SRID. For a trivial example: > => select ST_SRID(ST_Union(ST_GeomFromText('POLYGON EMPTY', 4283))); > st_srid - >0 This seems like a bug to me but m

Re: [postgis-users] pgsql2shp can't handle WITH

2021-11-06 Thread Jonathan Schultz
> $ pgsql2shp ... "WITH foo AS (SELECT 2) SELECT 1" > Table WITH foo AS (SELECT 2) SELECT 1 does not exist I found a work-around: $ pgsql2shp ... "SELECT * FROM (WITH foo AS (SELECT 2) SELECT 1) bar" Initializing... Done (postgis major version: 3). Output shape: Null Shape Dumping: X [1 ro

[postgis-users] pgsql2shp can't handle WITH

2021-11-06 Thread Jonathan Schultz
Hello, While attempting to use pgsql2shp with some queries I found that it seems to struggle with WITH clauses. For a trivial example: > $ pgsql2shp ... "WITH foo AS (SELECT 2) SELECT 1" > Table WITH foo AS (SELECT 2) SELECT 1 does not exist whereas psql handles the same query as expected: >

Re: [postgis-users] st_union produces different result from st_memunion

2020-07-07 Thread Jonathan Schultz
Martin On Tue, Jul 7, 2020 at 8:10 PM Jonathan Schultz mailto:jonat...@schultz.la>> wrote: Thank you for the prompt feedback. As you suggested I tried using ST_SnapToGrid and that worked very well even with a very fine grid - st_snaptogrid(geometry,0.0001). However when it

Re: [postgis-users] st_union produces different result from st_memunion

2020-07-07 Thread Jonathan Schultz
e for more detail).  I've confirmed that OverlayNG can handle the linework in the sample data.  If you are able to file a PostGIS issue for this that will help us track the problem. On Mon, Jul 6, 2020 at 8:47 PM Jonathan Schultz mailto:jonat...@schultz.la>> wrote:

[postgis-users] st_union produces different result from st_memunion

2020-07-06 Thread Jonathan Schultz
Following my earlier question https://lists.osgeo.org/pipermail/postgis-users/2020-June/044253.html that didn't get any responses, I have isolated my problem down to a minimal case consisting of six LineStrings, where st_union produces an obviously incorrect result while st_memunion produces a

[postgis-users] Looking for help figuring out overlays

2020-06-12 Thread Jonathan Schultz
Hello, I think I've reached the limit of my PostGIS skills so hoping someone can help me solve a problem. What I'm trying to do is create overlays from a collection of overlapping polygons as described here: http://blog.cleverelephant.ca/2019/07/postgis-overlays.html The data I am working fr