Re: [postgis-users] Tolerance/SnapTo in Postgis Topology for meter and degrees.

2019-06-11 Thread Paul Ramsey
Not ideal, a whole-of-Norway projection would have even more error minimization, but not a bad stopgap, certainly better than using UTM projections way outside their areas of validity. Check a few measurements, and do things like comparing an ST_Distance(A, B) with ST_Distance(A::geography,

Re: [postgis-users] Tolerance/SnapTo in Postgis Topology for meter and degrees.

2019-06-07 Thread Paul Ramsey
Surely there is an “all of Norway” planar projection you can use to handle the integrative whole-country work cases? Even if there isn’t, you can always invent one and add it to the spatial_ref_sys table. P > On Jun 7, 2019, at 3:02 AM, Lars Aksel Opsahl wrote: > > Hi > > We have one

Re: [postgis-users] PostGIS + pgdump

2019-05-17 Thread Paul Ramsey
t; > Send postgis-users mailing list submissions to > postgis-users@lists.osgeo.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.osgeo.org/mailman/listinfo/postgis-users > or, via email, send a message with subject or body 'help' to &g

Re: [postgis-users] PostGIS + pgdump

2019-05-16 Thread Paul Ramsey
You haven’t really provided any clues to your underlying problem. What platform you’re on, how your postgis is installed (packages? source?), what the errors you see actually ARE. We don’t publish broken software and then hide the top secret directions for correct use. So when you see things

Re: [postgis-users] diffrent execution plan on Postgres 9.5 and Postgres 11 for ST_union and performance problem Postgres 11

2019-04-11 Thread Paul Ramsey
something like select encode(st_asbinary(st_collect(geom)), 'hex') from mytable where id < 1 just a nice hex-encoded wkb p On Thu, Apr 11, 2019 at 12:11 PM Martin Davis wrote: > > Yes, that's exactly the test needed. So it looks like ST_Union(agg) on the > 11 instance is much slower

Re: [postgis-users] pg_dump on upgraded server

2019-04-03 Thread Paul Ramsey
Well, this speaks to not having micro version numbers in the extension versioning, for sure. Also, potentially for having a global source version, an idea that we’d have to add to the PgSQL extension system, so a script like postgis—ANY—2.3.sql could take a best-effort run at upgrading any

Re: [postgis-users] pg_dump on upgraded server

2019-04-03 Thread Paul Ramsey
wrote: >> done already, but it complains that the versions don't match >> thanks >> >> On 03/04/19 18:10, Paul Ramsey wrote: >>> Put a symlink to the postgis-2.3.so file, named as postgis-2.1.so >>> >>> P >>> >>>> On Apr

Re: [postgis-users] pg_dump on upgraded server

2019-04-03 Thread Paul Ramsey
Put a symlink to the postgis-2.3.so file, named as postgis-2.1.so P > On Apr 3, 2019, at 9:08 AM, Paolo Cavallini wrote: > > Hi all, > I'm on a difficult situation: a debian sever with a pg9.4/pgis2.1 db has > been upgraded to stretch, therefore to pg9.6/pgis2.3. Now pg_dump will > complain of

Re: [postgis-users] PostGIS 2.0 Shapefile and DBF Loader

2019-03-22 Thread Paul Ramsey
I wonder if we could do some thing native in pgadmin4 with shapely > On Mar 22, 2019, at 11:15 AM, Carson Gray wrote: > > I am very new to this and need to upload shapefiles to pgAdmin 4 and my > instructions say to use the Shapefile Loader. > >> On Fri, Mar 22, 2019 at 2:12 PM Regina Obe

Re: [postgis-users] postgis.jar for 2.4

2019-02-01 Thread Paul Ramsey
Well, the java work is all contained here https://github.com/postgis/postgis-java Nothing has changed structurally between 2.3 and 2.4 so I see no reason why the 2.3 jar couldn’t be used just fine w/ 2.4 or 2.5 P > On Feb 1, 2019, at 8:54 AM, Ailleen Pace wrote: > > Hi all, > > Where can I

Re: [postgis-users] Request for ideas to enhance the geometry viewer - GSoC

2019-01-29 Thread Paul Ramsey
Yeah, every time I’ve thought about renderer-in-the-db I’ve come back to this. There’s nothing especially privileged about the db that makes a lot of sense for bringing rendering in-process. And boy it’s a rat hole… once you go down, you’re never coming back out. P > On Jan 29, 2019, at 5:36

Re: [postgis-users] Postgis upgrade with Postgresql 9.6 to 11 upgrade

2019-01-25 Thread Paul Ramsey
Just run SELECT postgis_full_version() You should see the right version and libraries referenced. P > On Jan 25, 2019, at 8:46 AM, Bo Guo wrote: > > OK. Is there a way to validate the success of a Postgis upgrade? > > On 1/25/19 9:33 AM, Paul Ramsey wrote: >>

Re: [postgis-users] Postgis upgrade with Postgresql 9.6 to 11 upgrade

2019-01-25 Thread Paul Ramsey
You have two options, or maybe less, depending on where you get your PostgreSQL and PostGIS from. If you get them from some packager or other you might not have the freedom to mix-and-match versions. OPTION: Simple And Lots of Steps - Install Pg11 and PostGIS 2.4.4 for Pg11. - Run your PgSQL

Re: [postgis-users] Geography/geometry

2019-01-21 Thread Paul Ramsey
Just ’select geom’ will return the extended hexwkb (which we should have JTS support as a matter of convenience). If you need pure standard hex wkb, then select encode(st_asbinary(geom), ‘hex’) will do that P > On Jan 21, 2019, at 2:39 PM, Martin Davis wrote: > > Not much help, I'm afraid.

Re: [postgis-users] Geography/geometry

2019-01-21 Thread Paul Ramsey
from county; P > > Is there anything I can do with ogr2ogr when loading to help? > > Simon > > On Tue, 22 Jan 2019 08:34:02 +1100, Paul Ramsey > wrote: > >> +proj=gnom +lat_0=53.35 +lon_0=-6.26 +x_0=0 +y_0=0 +ellps=WGS84 +units

Re: [postgis-users] Geography/geometry

2019-01-21 Thread Paul Ramsey
> On Jan 21, 2019, at 1:28 PM, Simon Greener wrote: > > I can't find a suitable gnomic srid for PostGIS. > You’re going to want one centred on Ireland, not the pole, and I think maybe it’s wanting a geodetic basis, try this: +proj=gnom +lat_0=53.35 +lon_0=-6.26 +x_0=0 +y_0=0 +ellps=WGS84

Re: [postgis-users] Geography/geometry

2019-01-21 Thread Paul Ramsey
is/postgis/pull/191 > <https://github.com/postgis/postgis/pull/191> > > On Tue, Jan 22, 2019 at 12:13 AM Paul Ramsey <mailto:pram...@cleverelephant.ca>> wrote: > > > > On Jan 21, 2019, at 1:00 PM, Simon Greener > <mailto:si...@spatialdbadvisor.com

Re: [postgis-users] Geography/geometry

2019-01-21 Thread Paul Ramsey
> On Jan 21, 2019, at 1:00 PM, Simon Greener wrote: > > When a geography is casted to geometry for use in the aggregate form of > ST_Union (or other commands such as ST_Within) is the processing done > assuming the data is projected even when geodetic? All processing of geometry make

Re: [postgis-users] Multicurve

2019-01-11 Thread Paul Ramsey
Where are these “shapefiles with curves” you are seeing? the original spec did not include them… any documentation you can point to? https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf P. > On Jan 11, 2019, at 4:13 PM,

Re: [postgis-users] very strange bug generating incorrect ST_Distance calculations

2019-01-10 Thread Paul Ramsey
You’ve found a bug, it’s in PostGIS (geodetic code is in postgis native), and the extra detail that you can get it to manifest with MULTIPOLYGON but the same rings in POLYGON don’t manifest is an excellent extra detail to help in fixing it. > On Jan 10, 2019, at 8:06 AM, David M. Kaplan

Re: [postgis-users] very strange bug generating incorrect ST_Distance calculations

2019-01-10 Thread Paul Ramsey
Comparing the results of _ST_DistanceTree and _ST_DistanceUnCached is a good way to tease out whether there are differences between the implementations without having to fight the caching machinery along the way. P. On Thu, Jan 10, 2019 at 7:00 AM Raúl Marín Rodríguez wrote: > > Hi, > > In my

Re: [postgis-users] Compiling Postgis from source - gdal error

2018-12-11 Thread Paul Ramsey
Reading through the configure routine, I see nothing that should be causing those tests to fail now if they worked in the past... they are the same code as in 2.5.0 On Tue, Dec 11, 2018 at 12:32 PM Bruce Rindahl wrote: > Response from 'which gdal-config' > > pi@pi3ch:~/postgis-2.5.0 $ which

Re: [postgis-users] Compiling Postgis from source - gdal error

2018-12-11 Thread Paul Ramsey
Well, first “is it plugged in” question… before running ./configure if you run “which gdal-config” what do you see? P > On Dec 10, 2018, at 8:57 PM, Bruce Rindahl wrote: > > I have successfully compiled 2.5.0 from source with pg11.0, geos 2.3.2. The > ./configure message is: > checking for

Re: [postgis-users] Improvement suggestion

2018-12-05 Thread Paul Ramsey
Forgot to include my reference [1] https://commitfest.postgresql.org/21/1868/ On Wed, Dec 5, 2018 at 11:19 AM Paul Ramsey wrote: > > > On Tue, Dec 4, 2018 at 2:27 AM Darafei "Komяpa" Praliaskouski < > m...@komzpa.net> wrote: > >> If you are managing

Re: [postgis-users] Improvement suggestion

2018-12-05 Thread Paul Ramsey
On Tue, Dec 4, 2018 at 2:27 AM Darafei "Komяpa" Praliaskouski wrote: > If you are managing large geometries, splitting them off into "geometry > table" with non-uniquie ID and subdivided parts sometimes helps. > You want to build a tree on top of your geometry internals to make it all > fast,

Re: [postgis-users] Improvement suggestion

2018-12-02 Thread Paul Ramsey
Try the solution outlined here: https://gis.stackexchange.com/questions/31310/acquiring-arcgis-like-speed-in-postgis On Sun, Dec 2, 2018 at 10:44 AM Paul van der Linden < paul.doskabou...@gmail.com> wrote: > As I am working with large polygons, I'm always struggling with > performance, and

[postgis-users] GEOS 3.7.1

2018-11-29 Thread Paul Ramsey
The GEOS development team is happy to release GEOS 3.7.1. Source code can be downloaded from: https://download.osgeo.org/geos/geos-3.7.1.tar.bz2 Changes in 3.7.1 2018-11-29 - Bug fixes / improvements - Fix crash in GEOSCoordSeq_isCCW with empty coordseq (#927, Sergey Fedoseev) - Fix

Re: [postgis-users] raster2pgsql binary in apt distros

2018-11-15 Thread Paul Ramsey
> > Something to think about for our 3.0 release. > Might need to be ticketed and assigned to packagers? It's not a big ask, but it's easy to forget if they just copy'n'ship the old specs. P > > > > > -Original Message- > > From: postgis-users

Re: [postgis-users] On UpdateGeometrySRID() performance

2018-11-01 Thread Paul Ramsey
Also, if you created an index during your import process, that'll also make your update slower. I usually skip bulk updates in favour of writing a fresh table with the stuff I want.. CREATE TABLE mynewtable AS SELECT ST_SetSRID(geom, 4326) AS geom, ... FROM myoldtable That generally writes as

[postgis-users] 2.4.5 Released

2018-09-12 Thread Paul Ramsey
Santilli) - #4071, ST_ClusterKMeans crash on NULL/EMPTY fixed (Darafei Praliaskouski) - #4079, ensure St_AsMVTGeom outputs CW oriented polygons (Paul Ramsey) - #4070, use standard interruption error code on GEOS interruptions (Paul Ramsey) - #3980, delay freeing input until processing

Re: [postgis-users] no non-null/empty features, unable to compute statistics when running ANALYSE

2018-08-01 Thread Paul Ramsey
Well, first thing just bump up to your relevant latest patch release (2.3.7) and see if that makes things better. It might. Second of all, confirm that the error message is in fact wrong: do those tables causing the message in fact have some non-null/non-empty features? Third of all, attach gdb to

Re: [postgis-users] [postgis-devel] Oddity in _ST_Expand(geography) ?

2018-07-03 Thread Paul Ramsey
That's the stupidest idea I ever heard. /JK Actually it's just a misunderstanding. We can't return the three-space box, we have to return a lon/lat shape that, when plotted on the surface of the earth, has the expected 3-space bounding box. So, it could get tricky. P. On Tue, Jul 3, 2018 at

Re: [postgis-users] Oddity in _ST_Expand(geography) ?

2018-07-03 Thread Paul Ramsey
Ug. So the issue with XL is an interesting side-effect of the way expand is implemented in geography... The first part to understand is that the bounding box of a geography is expressed in 3-space. So imagine the world, it's a big sphere. Now, imagine a line on that world. In 3-space, it's a

Re: [postgis-users] overlaps and intersections strange behavior

2018-05-28 Thread Paul Ramsey
Also knowing that the end points of a line string are considered the boundary of the linestring, not the interior... On Mon, May 28, 2018 at 12:21 PM, Paul Ramsey wrote: > Does knowing that an overlaps test is only true if the interiors of > both objects interact, but there is n

Re: [postgis-users] overlaps and intersections strange behavior

2018-05-28 Thread Paul Ramsey
Does knowing that an overlaps test is only true if the interiors of both objects interact, but there is no full containment relationship help you understand a little? On Mon, May 28, 2018 at 8:03 AM, franco base wrote: > Hi all, > > > question 1) > why ST_Overlaps doesn't work with geometry a

Re: [postgis-users] [postgis-devel] EOL page

2018-03-27 Thread Paul Ramsey
Some more visibility around initial release dates for various versions would help improve communications around EOL. I can kind of do the math and say that it's probably 3-4 years old, but it would be nice to have than solid in the matrix, that the 2.2.0 release was on date X. P. On Tue, Mar 27,

Re: [postgis-users] recommended Postgres version using PostGIS 2.2

2018-03-23 Thread Paul Ramsey
The PostGIS version matrix is here https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS You'll want to use the latest version you can, consistent with the third party software you're using. In my experience, unfortunately, the Esri softwares tend to be the rate limiting step. P. On Fri,

Re: [postgis-users] Status and plans regarding circular arcs support?

2018-03-13 Thread Paul Ramsey
Hi Andrea, In terms of "native" support for arcs, I believe the answer is "area, length, distance, indexes and supportive output formats", full stop. Everything else that accepts them does linearization. In terms of future improvements, I know of no ongoing work, particularly in the realm of

Re: [postgis-users] WORKAROUND: Restore of PostgreSQL/PostGIS Database fails with functional Index on ST_Transform

2018-01-17 Thread Paul Ramsey
Remember to ALTER FUNCTION ST_Transform(geometry, INTEGER) RESET search_path; when you are done your restore, or all your calls to ST_Transform() will have a 4x performance penalty. P On Wed, Jan 17, 2018 at 8:56 AM, schild wrote: > Hi all, > > > Migration of a

Re: [postgis-users] Bad plan without && operator

2017-12-07 Thread Paul Ramsey
I don't think so, the comment says 1*ndims is the max number of cells, and the code underneath does seem to enforce that, so max cells would be 20,000 for a 2d index. P On Thu, Dec 7, 2017 at 8:02 AM, Sandro Santilli <s...@kbt.io> wrote: > On Thu, Dec 07, 2017 at 06:48:05AM -0

Re: [postgis-users] Bad plan without && operator

2017-12-07 Thread Paul Ramsey
gt;> >> It seems the && condition have to be duplicated for the right plan to be >> chosen: >> >> EXPLAIN SELECT p.id, b.id >> FROM tmp.tp1 p join ref.batiment b >> on b.geom && p.geom and p.geom && b.geom and _st_intersec

Re: [postgis-users] Bad plan without && operator

2017-12-06 Thread Paul Ramsey
ws=45794904 > width=193) > -> Index Scan using tp1_geom_gist on tp1 p (cost=0.15..0.42 rows=1 > width=276) > Index Cond: (geom && b.geom) > Filter: _st_intersects(geom, b.geom) > > Nico > > On 6 December 2017 at 19:14, Paul Ramsey <pram...@clevereleph

Re: [postgis-users] Bad plan without && operator

2017-12-06 Thread Paul Ramsey
Just invert the arguments in your call to ST_Intersects(). I don't think we have any way to tell the planner anything about which side of the condition should drive the nested loop join. And yet it seems to get the "right" one most of the time. I assume you've already run 'ANALYZE' and the stats

Re: [postgis-users] How can I update proj4 without recompile

2017-11-28 Thread Paul Ramsey
Hi Guido, Knowing your use case ("wanting to avoid bad area calculations in geodetics"), I can say definitively that you're out of luck. Just replacing the library file won't do the trick, as the code in PostGIS that uses the new proj geodetic area calculations won't be activated with anything

[postgis-users] PostGIS 2.3.5 & 2.4.2 Released

2017-11-15 Thread Paul Ramsey
In order to correct a gap in the upgrade path (primarily) and add a few more bug fixes into public release, patch releases for 2.3.5 and 2.4.2 have been made available. https://svn.osgeo.org/postgis/tags/2.3.5/NEWS https://svn.osgeo.org/postgis/tags/2.4.2/NEWS Thanks! The PostGIS Global

Re: [postgis-users] [XX000] ERROR: AddToPROJ4SRSCache: could not parse proj4 string

2017-11-09 Thread Paul Ramsey
I think "unknown elliptical parameter name" is the giveaway. I'm guessing you haven't installed the NAD grids in your new install, so it's unable to dereference "NAD83" into something it can use. P On Thu, Nov 9, 2017 at 1:44 PM, Andrew Joseph wrote: > I receive the

Re: [postgis-users] Handling N-d arrays in PostGIS

2017-10-30 Thread Paul Ramsey
As others have noted, a POINTM or MULTIPOINTM will serve to store your data just fine, but what you plan to *do* with that data after will determine whether a relational database is really the correct tool for you. ATB, P On Mon, Oct 30, 2017 at 4:56 AM, Antonio Rodriges

[postgis-users] PostGIS 2.2.6, 2.3.4, and 2.4.1

2017-10-18 Thread Paul Ramsey
Hey PostGIS users and developers, There are new patch releases for the supported stable branches available. Please avail yourself of them, for the latest in fixes and tweaks. For some insight into the particular changes, check out the respective NEW files:

Re: [postgis-users] TR: strange behavior of ST_Area(geography)

2017-10-16 Thread Paul Ramsey
Werks fer me also: st_equals | eq_area | geog1 | geog2 | geog3 | geom ---+-+---+---+---+-- t | t | t | t | t | t On Sun, Oct 15, 2017 at 6:07 AM, IIDA Tetsushi wrote: > thank you, Olivier. > > sorry, i forgot to

Re: [postgis-users] ST_Area(geog): ptarray_area_spheroid: cannot handle ptarray that crosses equator

2017-08-25 Thread Paul Ramsey
I think at proj 4.9 we flip over to using the geodetic functions in proj, which are more robust and have fewer failure modes. P On Mon, Aug 21, 2017 at 2:33 PM, Peter Schmitt wrote: > Thanks Regina! Yes, it must be something with the version of GEOS, PROJ > or GDAL. The

Re: [postgis-users] Difficulty for finding Intersection using postGIS

2017-03-30 Thread Paul Ramsey
You're running an unconstrained join, so if sets a and b are of non-trivial size, it's never going to finish because you'll have billions of results to test. You are also making promiscuous and unnecessary use of CTEs ("WITH" clause). Where you can avoid CTEs, avoid CTEs. SELECT CASE WHEN

Re: [postgis-users] Geography point to polygon st_distance for a polygon crossing the equator

2017-02-21 Thread Paul Ramsey
That's right, we don't have a way to differentiate between great-circle edges and loxodromes on geography (or vice versa in geometry). ​You can approximate a "square" by densifying your east-west lines in the places you want vertices to go, but the inter-vertex edges will still be great circles.

Re: [postgis-users] Geography point to polygon st_distance for a polygon crossing the equator

2017-02-19 Thread Paul Ramsey
I don't the polygon you've draw means what you think it does. POLYGON((-90 -80, 90 -80, 90 10, -90 10, -90 -80)) For example, you probably figure the first segment, -90 -80, 90 -80 runs east-west between two points close to the south pole. In fact, it runs directly over the south pole, so

Re: [postgis-users] Understanding 3d bbox filtering support

2017-01-19 Thread Paul Ramsey
No, just construct a 3D geometry as your query filter, not a 3d box. select count(*) from "3dfloor" where geom &&& ST_Makeline(ST_MakePoint(0,0,0), ST_MakePoint(100,100,1)); I would imagine that should work fine and dodge this little nastiness. P On Thu, Jan 19, 2017 at 5:14 AM, Andrea

Re: [postgis-users] Is PostGIS effectively LGPL?

2016-12-21 Thread Paul Ramsey
On Wed, Dec 21, 2016 at 11:46 AM, Bruce Momjian <br...@momjian.us> wrote: > On Wed, Dec 21, 2016 at 11:31:56AM -0800, Paul Ramsey wrote: > > Imagine PgSQL was GPL. Would most users of PgSQL have any concerns about > that? > > Yes, they would it would affect closed-source

Re: [postgis-users] Is PostGIS effectively LGPL?

2016-12-21 Thread Paul Ramsey
Imagine PgSQL was GPL. Would most users of PgSQL have any concerns about that? Probably not, right, because they are just using the unmodified database, all their proprietary IP would be on the other side of the client/server boundary. That's 99.9% of the questions about PostGIS licensing, right

Re: [postgis-users] Query choces on searching too small area

2016-12-16 Thread Paul Ramsey
Two things: (a) I'm curious what happens when you unroll all those embedded subqueries and let the planner try to do what it does best, something like this: SELECT DISTINCT ON (photo.id) photo.id, photo.filename, ST_AsText(photo.geometry) AS geometry, ST_AsText(photo.center) AS center,

Re: [postgis-users] ST_Intersects behaviour with 3D Polygon and Linestring

2016-12-12 Thread Paul Ramsey
ST_Relate ignores all the Z coordinates. So if you want to see what the reasoning is, just strip them away. Results for invalid inputs are not guaranteed to have any meaning. P. On Mon, Dec 12, 2016 at 6:33 AM, Felix Kunde wrote: > Hi everybody, > > I have a general

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Paul Ramsey
What does _postgis_stats( 'ruian.kraje', 'geom') do? On Mon, Nov 21, 2016 at 6:49 AM, Martin Landa <landa.mar...@gmail.com> wrote: > Hi, > > 2016-11-21 15:41 GMT+01:00 Paul Ramsey <pram...@cleverelephant.ca>: > > Estimated extent works by looking at the table sta

Re: [postgis-users] estimated extent and EPSG:5514

2016-11-21 Thread Paul Ramsey
Estimated extent works by looking at the table stats. If you had some extra data and then delete it, the stats might still reflect the original extent of the full table. Re-running ANALYZE might refresh them. On Mon, Nov 21, 2016 at 5:07 AM, Martin Landa wrote: > Hi all,

[postgis-users] Deleted Shp/Dbf Records Feedback

2016-10-26 Thread Paul Ramsey
I'm about to fix this issue https://trac.osgeo.org/postgis/ticket/3645 but I'm unsure whether to fix it as a "bug", with patches back into stable releases (2.3, 2.2, etc) or just as a "feature" for upcoming releases. It'll change behaviour, in that by default files with virtually deleted records

Re: [postgis-users] OGC Simple Features Acces 1.21

2016-09-15 Thread Paul Ramsey
An inconsistency in an OGC specification!?!?!? Could be. Fact remains, they do provide examples of mixed dimensional inputs to the predicates, and they are the most confusing examples imaginable, since what does it mean for polygons (or points) to "cross"? Or for points to "overlap" vs

Re: [postgis-users] Borked PostGIS 2.2 Upgrade

2016-08-11 Thread Paul Ramsey
f you have a compatible linux machine lying around: copy the whole postgresql data directory over and start it up over there. Requires identical architecture (32/64) and pgsql/postgis versions. ATB, P On Thu, Aug 11, 2016 at 7:42 AM, Paul Ramsey <pram...@cleverelephant.ca> wrote: > Your SE q

Re: [postgis-users] Borked PostGIS 2.2 Upgrade

2016-08-11 Thread Paul Ramsey
/postgis-2.2": No such file > or directory > > I posted about this to GIS.SE > (http://gis.stackexchange.com/questions/206412/how-can-i-do- > a-soft-upgrade-from-postgis-2-1-4-to-2-2-2). > Paul Ramsey responded and helped me figure out that something went > wrong with u

Re: [postgis-users] segmentation fault in lwgeom_geos.c

2016-07-31 Thread Paul Ramsey
To debug, start cutting it down to size. First, it looks like you can probably reproduce it with just the sub-select 'foo'. So that's a smaller query that shows the issue. Probably from that query you can also drop the GROUP BY and get a crash, since the crash in the trace is happening in the

Re: [postgis-users] st_astext() created invalid

2016-07-21 Thread Paul Ramsey
You've got a visible example of why the canonical format of PostGIS is hexwbk, and not wkt, as it was in the 0.x versions. The human readable output is not quite exactly the same as the binary representation. Since your geometry is just a hair's breadth from being invalid, maybe you should just

Re: [postgis-users] Question about ST_Difference across two layers with many multipolygons

2016-07-20 Thread Paul Ramsey
This would be easier w/ pictures, but - for each island you want to - create the set of parks that are contained w/i that island and - remove that whole set of parks from the one island they refer to Because: ST_Difference() is a two parameter function: one parameter for the island, and one

Re: [postgis-users] Future of the 1.5x release branch?

2016-05-26 Thread Paul Ramsey
The very fact that it has so few pending fixes is proof that it has drifted out of maintenance over the last couple years. When checking crashers, I no longer go back beyond 2.0. It could be brought back up to speed by reviewing all the changes that have gone into 2.0 since the release of 2.1

Re: [postgis-users] POINT/MULTIPOINT EMPTY problem in dump

2016-05-22 Thread Paul Ramsey
Temporarily change column type of the table you're loading from Geometry(Point) to just plain Geometry, then you can load both types and then change the MULTIPOINT EMPTY to POINT EMPTY then change the type back to Geometry(Point) P On Sun, May 22, 2016 at 2:19 PM, Jan Michálek

Re: [postgis-users] Using SRID with meters, but still not getting UNITS in meters with ST_DWithin

2016-04-13 Thread Paul Ramsey
ken > into consideration but I understand that. > Thanks! > Mike > > On Tue, Apr 12, 2016 at 12:50 PM, Paul Ramsey <pram...@cleverelephant.ca> > wrote: >> >> This: >> >> "while lat-long SRIDs (like 4326) say the units are "meters&qu

Re: [postgis-users] attempt to redefine parameter "postgis.backend"

2016-04-13 Thread Paul Ramsey
quot;$libdir/postgis-2.1" > "$libdir/rtpostgis-2.2" > > Armand > > > > On 12/04/2016 17:50, Paul Ramsey wrote: >> >> What does this query return? >> >> select distinct probin from pg_proc where probin like '%postgis%'; >> >> On Tue

Re: [postgis-users] Using SRID with meters, but still not getting UNITS in meters with ST_DWithin

2016-04-12 Thread Paul Ramsey
metries. Considering >> that the data are for the US, it is quite possible that your data are in >> EPSG 4269 (lat-long North American Datum 1983, used for much US government >> data including by the Census Bureau), rather than being EPSG 4326 (World >> Geodetic System 1984,

Re: [postgis-users] attempt to redefine parameter "postgis.backend"

2016-04-12 Thread Paul Ramsey
What does this query return? select distinct probin from pg_proc where probin like '%postgis%'; On Tue, Apr 12, 2016 at 2:32 AM, Armand Turpel wrote: > Hi, > > I have a wired problem after upgrading from pg 9.1 postgis 1.5 to pg 9.3 > postgis 2.2.1 > > On some

Re: [postgis-users] Using SRID with meters, but still not getting UNITS in meters with ST_DWithin

2016-04-11 Thread Paul Ramsey
to the center of the earth, so they all have an x,y,z. It's not something you want to use. P On Mon, Apr 11, 2016 at 12:31 PM, Michael Moore <michaeljmo...@gmail.com> wrote: > > > On Mon, Apr 11, 2016 at 11:50 AM, Paul Ramsey <pram...@cleverelephant.ca> > wrote: >> >>

Re: [postgis-users] Using SRID with meters, but still not getting UNITS in meters with ST_DWithin

2016-04-11 Thread Paul Ramsey
Before I can even begin to address what's going on with the index/query side, I have to ask about the coordinate system: You are using a geocentric system for postal code points? https://epsg.io/4896 This seems very odd indeed. If you were flying a satellite or drilling a deep well, maybe you'd

[postgis-users] PostGIS 2.2.2 Released

2016-03-22 Thread Paul Ramsey
http://postgis.net/2016/03/22/postgis-2.2.2/ With some fixes for correctness in some features, a handful of crashing cases, and with some important updates for upgrade cases, from 2.1 and to 2.3, as well as for users with raster data restore issues (read the linked docs for more information on

Re: [postgis-users] Postgres as cache and renderer for vector tile server

2016-03-21 Thread Paul Ramsey
ISTM that map-specific tile caching solutions are mostly there to provide things that generic HTTP caching systems don't do, like metatiling, or guttering the map requests. If you don't need those features, I think a generic HTTP cache in front of your web service would be the most architecturally

Re: [postgis-users] Slow performance when selecting a geometry column

2016-03-19 Thread Paul Ramsey
up space) > would not affect the select time. Is PostGIS doing something with the > geometries as it is fetching them from the DB other than just returning > them? Thanks, David > > > > *From:* postgis-users [mailto:postgis-users-boun...@lists.osgeo.org > <postgis-users-boun..

Re: [postgis-users] Slow performance when selecting a geometry column

2016-03-19 Thread Paul Ramsey
SELECT Sum(ST_NPoints(geom)) FROM thetable; On Thu, Mar 17, 2016 at 5:57 PM, David Robison wrote: > I am having an issue with a postgis database with the time it takes to > query the geometry column. The query selects 8000 records. The time to > retrieve the records

Re: [postgis-users] postgis.backend and legacy functions

2016-02-26 Thread Paul Ramsey
You may have to sanitize your function signatures so they are all only pointing to a single postgis library. Because of the combination of extension/legacy you've got a mixed set, which is leading to pain. UPDATE pg_proc SET probin = '$libdir/postgis-2.2' WHERE probin = '$libdir/postgis-2.1';

Re: [postgis-users] Slow ST_InteriorRingN and ST_intersection (using ST_ DumpRings makes intersection 230 times faster)

2016-02-24 Thread Paul Ramsey
On Wed, Feb 24, 2016 at 9:00 AM, Lars Aksel Opsahl wrote: > Then I rewrote ST_intersection to use ST_DumpRings and added a test on them > and then it's more than 230 faster (from 933238.069 ms to 3912.089 ms) > > ... a SQL implementation that only tries to intersect rings

Re: [postgis-users] Slow ST_InteriorRingN and ST_intersection (using ST_ DumpRings makes intersection 230 times faster)

2016-02-24 Thread Paul Ramsey
Taking this a bit at a time. On Wed, Feb 24, 2016 at 9:00 AM, Lars Aksel Opsahl wrote: > So I wanted extract the interior rings and do some tests on them, so tried > the following command : > > create table sl_lop.test_a6 as > > SELECT ST_InteriorRingN(a.geo,

Re: [postgis-users] How to cast geometry to 'varbinary' in PostGIS / PostgreSQL

2016-01-20 Thread Paul Ramsey
Hi Matt, varbinary and bytes are the "same" insofar as they hold an array of bytes. there's no guarantee though, that geometry->varbinary in sqlserver going to produce the same thing as geometry->bytes in postgresql. As a for-example, the sqlserver varbinary example you show about doesn't start

Re: [postgis-users] CREATE EXTENSION postgis fails with "ERROR: could not load library "/usr/pgsql-9.5/lib/postgis-2.2.so": /usr/pgsql-9.5/lib/postgis-2.2.so: undefined symbol: GEOSClipByRect"

2016-01-15 Thread Paul Ramsey
; > > On Friday, January 15, 2016 at 9:20:33 AM UTC-5, Paul Edwards wrote: >> >> Was debugging the exact issue yesterday. Updating GEOS to 3.5 did the >> trick for me. This is the version of geos provided for in the pgdg95 repo. >> >> >> >> On Thurs

Re: [postgis-users] CREATE EXTENSION postgis fails with "ERROR: could not load library "/usr/pgsql-9.5/lib/postgis-2.2.so": /usr/pgsql-9.5/lib/postgis-2.2.so: undefined symbol: GEOSClipByRect"

2016-01-14 Thread Paul Ramsey
Check the versions of the GEOS rpm you have installed, and also check the "requires" declarations for the postgis rpm. Probably you'll find the GEOS rpm is version 3.4 and that the postgis rpm doesn't declare a dependency for geos 3.5. See if you can track down a GEOS 3.5 rpm. P On Thu, Jan 14,

Re: [postgis-users] Handling LINESTRINGM

2015-12-28 Thread Paul Ramsey
0dev-CAPI-1.9.0 r4129" PROJ="Rel. 4.9.1, 04 March 2015" LIBXML="2.9.2" LIBJSON="UNKNOWN" (1 row) OS difference (OSX 10.11), or fixed in 2.1 future versions? P On Mon, Dec 28, 2015 at 1:58 AM, Paolo Cavallini <cavall...@faunalia.it> wrote: > Il 24/12/

Re: [postgis-users] Handling LINESTRINGM

2015-12-24 Thread Paul Ramsey
That restored for me just fine (against svn trunk), though the geometry isn't linestringm, it's multilinestring (no m) MULTILINESTRING((11.0615907778276 43.9299550718293,11.0616854681637 43.926456266)) P. On Wed, Dec 23, 2015 at 10:29 PM, Paolo Cavallini wrote: > Il

Re: [postgis-users] (no subject)

2015-11-16 Thread Paul Ramsey
nfo); // as you already know, this is the > postgres macro which invokes functions as the ones defined inside postgis > > The debugger nicely stepped into postgis/geography_inout.c function: > geography_from_text but NOT gserialized_overlaps defined inside > postgis/gse

Re: [postgis-users] (no subject)

2015-11-15 Thread Paul Ramsey
In addition to building your postgis with debugging (as you have done) you need to build your postgresql with debugging on, because the ./postgis directory inherits its build configuration from the postgresql sources (thanks to pgxs, a mixed blessing). So go back and rebuild your postgresql too.

Re: [postgis-users] [postgis-devel] postgis extension sans raster (only for folks who can't compile with raster support) - PSC Vote and developer/packager comments please

2015-10-28 Thread Paul Ramsey
The main downside to this is 1) you have a postgresql postgis >> extension that may not have any raster functions and one that goes by >> same extension name postgis with raster support. Though I claim this >> is clear from the version number and description :) 2) It does mean

Re: [postgis-users] PostgreSQL 9.5 beta/PostGIS 2.2.0 fails with OGR

2015-10-27 Thread Paul Ramsey
I'm unable to reproduce any of this, though admittedly I'm not on a 9.5 install, but on a "9.6" (aka git master) install. pramsey=# select '-1'::integer; int4 -- -1 (1 row) Crane:~/Sites/crackedtiles/pgsample pramsey(master)$ ogrinfo -q PG:"dbname=gis" 1: continent (Multi Polygon)

[postgis-users] PostGIS 2.2.0 Released

2015-10-08 Thread Paul Ramsey
http://postgis.net/2015/10/07/postgis-2.2.0 PostGIS 2.2.0 is released! Over the last two years a number of interesting new features have been added, such as: * True nearest-neighbor searching for all geometry and geography types * New volumetric geometry support, including ST_3DDifference,

[postgis-users] PostGIS 2.2.0 RC1

2015-09-24 Thread Paul Ramsey
Hey everyone, We are almost at a 2.2.0 release (yeah, it took a while) so before doing that we are cutting a release candidate for you to test out. Please do. It's here: http://download.osgeo.org/postgis/source/postgis-2.2.0rc1.tar.gz The release notes are here:

Re: [postgis-users] Loading a PostGIS dump

2015-08-26 Thread Paul Ramsey
The COPY command used to load tables is basically 100% silent, so it just might have been working away. A good thing to check is 'top' to see if the postgres process is busy using CPU. If so, it's hard at work on your process. If not, then perhaps something is awry. P On Wed, Aug 26, 2015 at

Re: [postgis-users] Which operators/functions work with circular arcs?

2015-08-22 Thread Paul Ramsey
I was about to point out how clever I was, to work this out and then forget I'd worked it out, but then I found this, double lwcurvepoly_area(const LWCURVEPOLY *curvepoly) { double area = 0.0; LWPOLY *poly; if( lwgeom_is_empty((LWGEOM*)curvepoly) ) return 0.0; poly = lwcurvepoly_stroke(curvepoly,

Re: [postgis-users] Which operators/functions work with circular arcs?

2015-08-20 Thread Paul Ramsey
They aren't marked, perhaps Regina could garden test them to find them... All the simple functions that take apart geometries, etc, work fine. The simple measurements (length/perimeter) work fine As of 2.2 all the GEOS-backed functions will work (by linearizing the arcs before sending them in) The

Re: [postgis-users] Endianness of geometry's binary canonical form

2015-07-15 Thread Paul Ramsey
No, it'll default to whatever the architecture of the server is for output, and it'll read either endian as an input. P. On Wed, Jul 15, 2015 at 1:36 PM, Tumasgiu Rossini rossin...@gmail.com wrote: Hi, I was wondering about this : Considering that : 1 - Canonical binary output of

[postgis-users] 2.1.8 Bug Fix Release

2015-07-07 Thread Paul Ramsey
Over the past three months, we have closed a number of important bugs that can potentially crash a back-end, so we are releasing 2.1.8 today. http://postgis.net/source/ If you're running a site that accepts GeoJSON you should upgrade.

Re: [postgis-users] postgis_restore.pl

2015-05-28 Thread Paul Ramsey
For 2.0-2.1 restore you should be able to use pg_restore directly on the dump file, no need to filter it through the postgis_restore.pl file... P On Thu, May 28, 2015 at 8:58 AM, Paul Caroline Lewis paulca...@hotmail.com wrote: Hi, I'm trying to restore after a Hard upgrade from Postgresql

Re: [postgis-users] Slow ST_Intersects and Materialized Views (EXPLAIN ANALYZE VERBOSE)

2015-05-28 Thread Paul Ramsey
CREATE INDEX parcels_gix ON gis.parcels USING GIST (geom_4326); ANALYZE; On Thu, May 28, 2015 at 10:58 AM, Alexander W. Rolek a.ro...@gmail.com wrote: Bborie Park - Here's the expanded query: EXPLAIN ANALYZE VERBOSE SELECT DISTINCT parcel.apn FROM gis.parcels as parcel, gis.layers as

<    1   2   3   4   >