Re: [postgis-users] PostGIS Geography and Rhumb Lines

2012-11-28 Thread Paul Ramsey
ST_Segmentize in geography will just segmentize along the great circle. You'll have to choose whether you want your model in geometry or geography. If geometry, then you can use Mercator as your projection (rhumb lines are then straight line) and use ST_Segmentize(geography) to convert your great

Re: [postgis-users] Why PostGIS ST_Intersection much slower than ArcGIS Intersect ?

2012-11-29 Thread Paul Ramsey
It's normal, assuming that some of your geometries are quite large. If someone wants to fund a prepared intersection development task I'm sure we could make it 10x-40x faster. P. On Thu, Nov 29, 2012 at 10:04 AM, Étienne Desgagné etienne.desga...@roche.ca wrote: It take millisecond to me to

Re: [postgis-users] Why PostGIS ST_Intersection much slower than ArcGIS Intersect ?

2012-11-29 Thread Paul Ramsey
For information: ST_Intersects used to be slow, and the caching system and prepared intersects development made it 10-20x faster. A similar approach to intersection would yield similar results. On Thu, Nov 29, 2012 at 10:36 AM, Paul Ramsey pram...@opengeo.org wrote: It's normal, assuming

[postgis-users] PostGIS 2.0.2

2012-12-03 Thread Paul Ramsey
The PostGIS development team is happy to release the second patch version of PostGIS 2, the 2.0.2 release. As befits a patch release, the focus is on bugs and breakages, and there are a large number of obscure things that are now better in this release.

Re: [postgis-users] errors while using st_dwithin

2012-12-06 Thread Paul Ramsey
at 11:13 PM, Paul Ramsey pram...@opengeo.org wrote: Ah. Geography is version 1.5+ You can put st_distance_spheroid in place of st_distance for a metric answer. p On Thu, Dec 6, 2012 at 9:40 AM, tasneem dewaswala tasneem.eur...@gmail.com wrote: Thank you for the suggestion i tried

Re: [postgis-users] Fedora 18: PostGIS/Postgresql interoperability

2013-02-20 Thread Paul Ramsey
Rather than using the postgresql packages included in the distro, go to the postgresl yum repo. That always has much fresher versions, of both pgsql and postgis. http://yum.postgresql.org P -- Paul Ramsey http://cleverelephant.ca/ http://postgis.net/ On Monday, 4 February, 2013 at 3:44

Re: [postgis-users] liblwgeom and LGPL?

2013-03-29 Thread Paul Ramsey
the framework spelled out by GPL V2. Go for it! Is there someone (Paul Ramsey? PostGIS foundation?) who can make this unequivocal? If you don't change the library you are free to use it in your own program without that program becoming GPL. When I use open source code in a library and I make

Re: [postgis-users] How/where does postgis hook a callback to free cached geos structures?

2013-04-22 Thread Paul Ramsey
The caching strategy used by proj and geos creates objects in memory that live for the span of the STATEMENT, not the backend. So I wouldn't worry too much about that. On the other hand, if you have a lot of individual geocode requests coming in it could get expensive as each one has to set up a

Re: [postgis-users] [postgis-devel] Vote: Feature Freeze 2.1

2013-05-06 Thread Paul Ramsey
I can live w/ it. +1 On Sat, May 4, 2013 at 3:49 PM, Sandro Santilli s...@keybit.net wrote: +1 for feature freeze of 2.1.0 --strk; On Fri, May 03, 2013 at 08:52:35PM -0400, Paragon Corporation wrote: I want to officially vote for feature freeze for 2.1. And I'm asking both PostGIS devs and

Re: [postgis-users] point_ops with GiST PostGIS Spatial Index

2013-06-07 Thread Paul Ramsey
point_ops has nothing at all to do with PostGIS, it's an opclass for the internal 'point' type of PostgreSQL (let confusion reign). You may find that you get better PostGIS plans with 2.1 when it comes out, as the selectivity calculation logic has been refined a bit further. I strongly doubt

Re: [postgis-users] Tricks to find polygon/line intersection faster

2013-07-05 Thread Paul Ramsey
Without seeing your data it's quite hard to say. Many large things vs many large things yields a problem where indexes and so on don't have a lot of leverage on the problem. On Tue, Jul 2, 2013 at 6:39 AM, Evan Martin postgre...@realityexists.net wrote: Hi, I have tables of ~25,000 polygons

Re: [postgis-users] PostGIS 2.1.0 released

2013-08-27 Thread Paul Ramsey
function - much faster (Nathan Wagner) #739, UpdateRasterSRID() #945, improved join selectivity, N-D selectivity calculations, user accessible selectivity and stats reader functions for testing (Paul Ramsey / OpenGeo) toTopoGeom with TopoGeometry sink (Sandro Santilli

[postgis-users] PostGIS 2.0.4 Released

2013-09-06 Thread Paul Ramsey
of curves on ST_CurveToLine * Enhancements * - #2269, Avoid uselessly de-toasting full geometries on ANALYZE * Known Issues * - #2111, Raster bands can only reference the first 256 bands of out-db rasters -- Paul Ramsey http://opengeo.org http://postgis.net

Re: [postgis-users] Definition of St_Distance in case of 2 non point geometries

2013-10-18 Thread Paul Ramsey
Except when one or more of the geometries includes circular arcs (v 2.1+) P On Fri, Oct 18, 2013 at 6:39 AM, Nicklas Avén nicklas.a...@jordogskog.no wrote: If I understand you right your assumption is true. What makes you wondering? In 2d you will always get the distance to a vertexpoint in

Re: [postgis-users] Question about SDE on top of Postgres . . .

2013-10-27 Thread Paul Ramsey
Wow, that page really goes out of its way to make sure you don't want to use PostGIS! All those notes and caveats in the PostGIS boxes! Beginning with ArcGIS 10.1, all databases used with ArcGIS must be 64-bit WHAT?!?!? Client apps, by and large, don't give a damn about what platform the database

Re: [postgis-users] Bad estimate from index on points

2013-11-03 Thread Paul Ramsey
Coming back to this a bit late (hah!) ... what PostGIS version is this on? P On Wed, Jun 12, 2013 at 1:23 AM, BladeOfLight16 bladeofligh...@gmail.com wrote: I have a table that contains many point rows. The points all fall within a polygon in another table. There are roughly 5 to 20 thousand

Re: [postgis-users] Bad estimate from index on points

2013-11-03 Thread Paul Ramsey
, 2013 at 10:12 PM, Paul Ramsey pram...@boundlessgeo.com wrote: Coming back to this a bit late (hah!) ... what PostGIS version is this on? 2.0.4. Haven't tested with 2.1 yet, but I think it persists. There's a nice script in my original report to test with if you have 2.1 installed. =) It needs

[postgis-users] PostGIS 2.1.1 Released

2013-11-08 Thread Paul Ramsey
to raster2pgsql to skip checking that band is NODATA -- Paul Ramsey | Boundless http://boundlessgeo.com/support/postgis 2508850632 | @pwramsey ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman

Re: [postgis-users] Readable reference for - the distance operators

2013-11-20 Thread Paul Ramsey
Hopefully I'm not too immodest in saying this http://workshops.boundlessgeo.com/postgis-intro/knn.html P On Wed, Nov 20, 2013 at 10:49 AM, Stephen Mather step...@smathermather.com wrote: Hi All, What's the best (normal) human readable reference for the PostGIS distance operators-- but deep

Re: [postgis-users] -

2013-12-03 Thread Paul Ramsey
Can't, it's not implemented against nd. P. On Tue, Dec 3, 2013 at 12:05 PM, Stephen Mather step...@smathermather.com wrote: If I create an nd aware index, say: CREATE INDEX lidar_the_geom_3dx ON lidar USING gist(the_geom gist_geometry_ops_nd); Can - and # be made to use that? If so, how?

Re: [postgis-users] Postgis 2.1.0 poor performance vs Postgis 2.0.3

2013-12-10 Thread Paul Ramsey
Might also be a nice thing for us to add to the end of the load process :/ On Tue, Dec 10, 2013 at 12:09 PM, Stephen Woodbridge wood...@swoodbridge.com wrote: Paul, Cool! And yes, anytime you load a database or table like from shp2pgsql you should analyze it to update the database statistics

Re: [postgis-users] Moving to AWS RDS PostgreSQL

2013-12-10 Thread Paul Ramsey
You might have to put the password into the environment to avoid the prompt screwing up the pipe... export PGPASSWORD=yourpassword (Im' assuming you've already tested psql connectivity and ensured you can in fact connect via psql) P. On Tue, Dec 10, 2013 at 12:05 PM, Paul Caroline Lewis

Re: [postgis-users] invalid GML representation and st_geomfromgml

2013-12-10 Thread Paul Ramsey
srsDimension has inconsistent values, could that be it? (error message seems pretty small :) On Tue, Dec 10, 2013 at 12:36 PM, Dave Potts dave.po...@pinan.co.uk wrote: Hi List, I am trying to load some gml data, most of the time it works, but some of the records fail with constructs such as

Re: [postgis-users] postgis 2.0 and postgist 2.1 compatibility issues

2013-12-13 Thread Paul Ramsey
Yes, it sounds like a difference in the stats results, which ST_EstimatedExtent leans upon, and likely QGIS uses for quick extent determination. Checking the results of that function over the two versions will confirm/deny hypothesis. On Thu, Dec 12, 2013 at 6:26 PM, Paragon Corporation

Re: [postgis-users] GeometryCollection with GEOMETRYCOLLECTIONM, POINTM etc.. value in constructor.

2013-12-23 Thread Paul Ramsey
We need patches for Java issues as we have no active JDBC/Java maintainers ATM. P. On Sat, Dec 21, 2013 at 11:31 AM, Baris Ergun barisergu...@gmail.com wrote: I have tested the issue with latest snapshot 2.1.0SVN for jdbc driver. The GeometryCollection still cannot parse the String value

Re: [postgis-users] Topological editing with OpenLayers

2014-01-05 Thread Paul Ramsey
Maybe on OL3? http://vimeo.com/78298228 P On Fri, Jan 3, 2014 at 4:14 AM, Jan Hartmann j.l.h.hartm...@uva.nl wrote: Hi all, I have written a simple OpenLayers-application to edit a PostGIS polygon layer: read one polygon from the server as GeoJSON, adapt it interactively, and write it back

Re: [postgis-users] PostGIS and logging

2014-01-18 Thread Paul Ramsey
The PostGIS notices are being generated using PostgreSQL infrastructure (elog(NOTICE, message)) so I'm surprised they are behaving differently from any other generated notice... P. On Fri, Jan 17, 2014 at 1:15 PM, Shira Bezalel sh...@sfei.org wrote: Our Postgres log is set to send only WARNING

Re: [postgis-users] PostGIS 2.0.4 on MacOS X 10.7.5 Library Not Loaded: libintl.8.dylib

2014-01-22 Thread Paul Ramsey
Yes, probably the installer is missing the file (go to the location of shp2pgsql and ls ../lib/ and see if libintl shows up there, probably it doesn't. So inform EDB that their packager is forgetting to include a file. They probably don't test the commandline components as much as the GUI ones.

Re: [postgis-users] Odd Behavior with ST_Intersects (PostGIS 2.1, Ubuntu 12.04)

2014-02-03 Thread Paul Ramsey
Pretty sure I have this one tracked, will update shortly. On Mon, Feb 3, 2014 at 12:55 PM, Jerry Sievert je...@legitimatesounding.com wrote: The workaround as provided exposes multiple other issues for us. I can try to isolate them, but essentially it causes random looking test failures in our

Re: [postgis-users] Odd Behavior with ST_Intersects (PostGIS 2.1, Ubuntu 12.04)

2014-02-03 Thread Paul Ramsey
Jerry, Pretty important to isolate them, as that function's at the bottom of the cached tree algorithm, so even if I fix the gap in the cache logic I think I have found, you'll still run into other issues later. _ST_DistanceUncached uses brute force (aka 2.0) methods, and should work without

Re: [postgis-users] Odd Behavior with ST_Intersects (PostGIS 2.1, Ubuntu 12.04)

2014-02-04 Thread Paul Ramsey
the 2.1 SVN branch, but will only be able to spend limited time with it. I will still try to isolate a test case if I can. On Mon, Feb 3, 2014 at 10:10 PM, Paul Ramsey pram...@cleverelephant.ca wrote: That's really quite disturbing, since it would seem to indicate that even the core algorithms

Re: [postgis-users] PostGIS ST_GeogFromGeoJSON()

2014-03-17 Thread Paul Ramsey
As long as the input GeoJSON is in lon/lat, there's no reason you can't just cast the geometry to geography. On Mon, Mar 17, 2014 at 9:12 AM, Gutfreund, Yechezkal ygutfre...@draper.com wrote: Yes, there is a ST_GeomFromGeoJSON() but what is the status of: ST_GeogFromGeoJSON()? Would it be

Re: [postgis-users] Urgent help needed, messed up my postgis 2.1 server by installing latest QGIS pacake

2014-03-18 Thread Paul Ramsey
Stephen's advice should work, and you shouldn't have lost any data. You probably broke the GDAL dependency PostGIS has, which would just mean every time you try to do a PostGIS function it won't work. so no data will go away, things just won't *work*. Follows Stephen's advice in making sure your

[postgis-users] PostGIS 2.1.2 and 2.0.5 released

2014-03-31 Thread Paul Ramsey
Hi all, Spring is here (in the northern hemisphere, mostly) and that means it’s time to release some fresh patch releases of PostGIS 2.1 and 2.0 branches!   http://download.osgeo.org/postgis/source/postgis-2.1.2.tar.gz   http://download.osgeo.org/postgis/source/postgis-2.0.5.tar.gz For detailed

Re: [postgis-users] PostGIS 2.1.2 and 2.0.5 released

2014-03-31 Thread Paul Ramsey
first line imply that temperatures have risen above the freezing level, for at least carbon dioxide, north of, say, Chicago? On Mon, Mar 31, 2014 at 8:40 AM, Paul Ramsey pram...@cleverelephant.ca wrote: Hi all, Spring is here (in the northern hemisphere, mostly) and that means it's time

Re: [postgis-users] looking for a public well known maven repository for postgis-jdbc 2.1 and later on versions

2014-04-03 Thread Paul Ramsey
Baris, we're just unwashed innocents abroad. I know maven exists and does something useful in principle, but getting things onto public repositories etc, is way above my paygrade. Please, do whatever the right thing is, in this situation. P. On Thu, Apr 3, 2014 at 11:40 AM, Baris Ergun

Re: [postgis-users] problems with 2.1.2 and new databases

2014-04-09 Thread Paul Ramsey
Well, you had me scared, but it's not an attribute of the 2.1.2 release, it's something specific about either windows or your installation in particular. After building and installing 2.1.2 on OSX, I can: foo=# create extension postgis version '2.1.2'; CREATE EXTENSION foo=# create table bar

Re: [postgis-users] st_linemerge not working with 4d coords

2014-05-10 Thread Paul Ramsey
LineMerge is implemented via the GEOS library which, unlike PostGIS, only understands 3 dimensions max. So the 4th is sacrificed in the process. There's no good / easy way to retain it. you could write a post-process routine that took every output vertex and compared it to the input geometry to

Re: [postgis-users] Indexes

2014-05-29 Thread Paul Ramsey
Running queries does not build up an index, you CREATE INDEX, and that's it, it's built. The time differences you are seeing are almost certainly the result of data being transferred up into the operating system's virtual file system (VFS) from the disk. Reading from disk is slow; reading from

Re: [postgis-users] PostGIS 2.1 Install fails

2014-06-16 Thread Paul Ramsey
The version of GEOS on your system is old, and lacks the GEOSDelaunayTriangulation, you'll have to upgrade it. Not sure why your PostGIS package didn't complain. One possibility (if it's an old system, and you've manually installed software in the past) is that you have two copies, and old one and

Re: [postgis-users] Antipodal issues in upgrade

2014-08-21 Thread Paul Ramsey
No, there's nothing in 1.5 to find anti-podal edges. I'm willing to guess though that yours involve pole-to-pole lines, so you could look for objects with an ymax-ymin of ~180. Alternately, is the hgc_bbox column real data, or is it derived from other data? (ie, there's real lines or polygons

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

2014-09-22 Thread Paul Ramsey
It means it sampled 3 rows and didn't find any geometries that were non-null or non-empty. I suppose it could mean a bug, though that code's been around for a while. select count(*) from yourtable where geom is null; select count(*) from yourtable where st_isempty(geom); select

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

2014-09-22 Thread Paul Ramsey
r12547 GEOS=3.4.2-CAPI-1.8.2 r3921 PROJ=Rel. 4.8.0, 6 March 2012 GDAL=GDAL 1.9.2, released 2012/10/08 LIBXML=2.7.6 LIBJSON=UNKNOWN RASTER' i even tried putting a bogus null row in there but I still got the message. thanks! On September 22, 2014 at 2:52:00 PM, Paul Ramsey (pram

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

2014-09-23 Thread Paul Ramsey
/longs and viola no “notice” message. Is it only an issue with three or four dimensional data? Thanks, jason On September 22, 2014 at 5:43:43 PM, Paul Ramsey (pram...@cleverelephant.ca) wrote: If you can share data, I'm happy to try and reproduce it here. P On Mon, Sep 22, 2014 at 2:01 PM

Re: [postgis-users] [postgis-devel] Sharding Rasters in Postgis

2014-09-24 Thread Paul Ramsey
location you’ll end up naturally with bottlenecks on hot nodes. (Like, you will tend to roll up on spatial areas, which means only the node that serves that area will end up hot during the query, and the rest of the nodes will be idle: the absolute worst utilization situation.) P --  Paul Ramsey

[postgis-users] Call for Interest: PostGIS day in DC

2014-09-30 Thread Paul Ramsey
Hey all, I'm thinking about organizing a PostGIS day (Nov 20) in Washington DC, and I'm looking for folks who would be willing to present about (a) their use of PostGIS or (b) the amazing insane magic they do with PostGIS. We'd host in the spacious Boundless office, likely, and probably do an

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

2014-10-01 Thread Paul Ramsey
)) * sin(2*pi()*u2), 50 * sqrt(-2 * ln(u1)) * sin(2*pi()*u2), 50 * sqrt(-2 * ln(u1)) * sin(2*pi()*u2)),4326)::Geometry(PointZM,4326) AS geom FROM rands; P On Tue, Sep 23, 2014 at 3:54 PM, Paul Ramsey pram...@cleverelephant.ca wrote: I guess in theory I could reproduce it with some random xyz

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

2014-10-02 Thread Paul Ramsey
to fix your problem would be to just alter the type to a 2d point, and then the stats gathering system will work right. It's worth doing this, since as the NOTICE says, you aren't currently gathering any stats. P. On Wed, Oct 1, 2014 at 3:26 PM, Paul Ramsey pram...@cleverelephant.ca wrote: Well

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

2014-10-02 Thread Paul Ramsey
So, I have a “solution” but I’m not 100% happy with it. It’s attached to the ticket here, http://trac.osgeo.org/postgis/ticket/2953 P. --  Paul Ramsey http://cleverelephant.ca http://postgis.net On October 2, 2014 at 9:58:13 AM, Paul Ramsey (pram...@cleverelephant.ca) wrote: OK

Re: [postgis-users] pointcloud : change pcid ?

2014-10-30 Thread Paul Ramsey
Correct, I was thinking more PC_Transform(pcpatch, pcid), which would look for common dimension names and map between them by default, or could maybe accept a mapping (dim-dim) to control the conversion. But yes. Danger I suppose in downgrading data (pushing a 4 byte into 2 byte) but that could be

Re: [postgis-users] FileGDB curves

2014-11-12 Thread Paul Ramsey
Correct, the curves were likely ruined on the way through GDAL. In some ways, fortunate they ever got through at all. On Wed, Nov 12, 2014 at 7:48 AM, Bborie Park dustym...@gmail.com wrote: If I remember correctly, curve geometries are not currently supported in GDAL/OGR. There is a GDAL RFC

Re: [postgis-users] PostgreSQL 9.3.4/PostGIS 2.1.1 function

2014-12-04 Thread Paul Ramsey
I would think that scaling by 180/pi should do the trick in general? select st_astext(st_setsrid(st_scale('POINT(1 1)'::geometry,180.0/pi(),180.0/pi()),4326)); P On Thu, Dec 4, 2014 at 3:24 PM, Burgess, Freddie fburg...@radiantblue.com wrote: Given a polygon geometry with no SRID, the vertices

Re: [postgis-users] Spatial statistics on LineString Z

2015-01-27 Thread Paul Ramsey
Stick that puppy in a trac ticket, I'll have a look. On Mon, Jan 26, 2015 at 6:25 AM, cwright colin.wri...@thinkwhere.com wrote: Hi, I’ve loaded a shapefile containing height information into PostGIS using OGR2OGR. The shapefile has loaded OK and the geometry all seems to be fine in PostGIS,

[postgis-users] Fwd: Huge Multipolygon cannot be inserted to database

2015-01-08 Thread Paul Ramsey
You have created an index on your geometry column using something like CREATE INDEX myindex ON mytable (geom); This has created a b-tree index, which is limited in the object size it can handle (and won't answer spatial questions efficiently in any event). Drop it, and replace with a GIST

Re: [postgis-users] ST_Boundary returns MULTIPOLYGON

2015-01-09 Thread Paul Ramsey
Yes, I could see that as a reasonable interpretation. Just another in the large collection of corner cases opened up by allowing typed empty (my fault). The code probably just tests for empty and reflects the input back in that case. P. On Fri, Jan 9, 2015 at 2:26 PM, BladeOfLight16

Re: [postgis-users] problems with _st_distance() function on queries returning more than one row

2015-01-08 Thread Paul Ramsey
Move up to the latest patch revision of postgis, the 2.1.0 release definitely had a few subtle issues with geography distance of the sort you are describing. P. On Thu, Jan 8, 2015 at 2:09 PM, Hartranft, Robert M. (GSFC-423.0)[RAYTHEON COMPANY] robert.m.hartra...@nasa.gov wrote: Hi All, I am

[postgis-users] Preserving Repeated Points

2015-03-16 Thread Paul Ramsey
Users, Per this ticket: http://trac.osgeo.org/postgis/ticket/3061 We currently strip out repeated points from GML, KML and GeoJSON inputs. We allow them on WKT and WKB input. This seems arbitrary (probably it is, just a random development choice at the time). Would anyone have a problem w/

[postgis-users] 2.1.6 Released

2015-03-20 Thread Paul Ramsey
width value #3031, Allow restore of Geometry(Point) tables dumped with empties in them View all closed tickets. --  Paul Ramsey http://cleverelephant.ca http://postgis.net___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org

Re: [postgis-users] Memory management in postgres (with liblwgeom functions in particular)

2015-03-30 Thread Paul Ramsey
Igor, Your supposition is is all correct (you might want to ask your questions on postgis-devel, where the developer density is higher). lwalloc by default is just a facade over malloc, for standalone use. But, when used in PostGIS, it it backed by palloc, which is in turn the memory manager

Re: [postgis-users] [GENERAL] Postgres not using GiST index in a lateral join

2015-03-04 Thread Paul Ramsey
Stop writing so many subqueries, think in joins; the poor planner! SELECT DISTINCT ON (a.id) a.id AS a_id, b.id AS b_id FROM a JOIN b ON ST_Contains(b.shape, a.shape) WHERE b.kind != 1 Also, the DISTINCT ON syntax (PgSQL custom) lets you winnow a result set down to just one of the inputs. P.

Re: [postgis-users] Finding Geometries that overlap with the given ones

2015-03-03 Thread Paul Ramsey
a feeling it will, since most likely the query planner will decide to process A row by row and find a suitable B each time. In this case, we need a GiST index on B, so that we could find the B that is contained in A right? Thanks again, Igor On Tue, Mar 3, 2015 at 5:47 PM Paul Ramsey pram

Re: [postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Paul Ramsey
ST_HasArc() should do what you want On Tue, May 5, 2015 at 1:52 AM, Andrea Aime andrea.a...@geo-solutions.it wrote: Hi, I have some generic build of code that are building queries to postgis includingthe st_simplify function, e.g: select st_simplify(geometry, tolerance) from mytable where

[postgis-users] 2.1.7 / 2.0.7 Bug Fix Release

2015-04-06 Thread Paul Ramsey
  Due to a critical bug in GeoJSON ingestion we have made an early release of versions 2.0.7 and 2.1.7. If you are running an earlier version on a public site and accepting incoming GeoJSON, we recommend you update as soon as possible.   http://postgis.net/source   The resolved issue would

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

Re: [postgis-users] coordinate order of geometry vs coordinate order of gml

2015-05-27 Thread Paul Ramsey
Since everything is wrong except for GML, which has to reverse things that are correct in order to do the right thing vis-a-vis GML, my guess is that the data were loaded in the wrong order to start with. That is, if you run ST_AsText() you'll find the coordinates in Lat-Lon order, when the

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] 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] 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

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)

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] (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] (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

[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] 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] 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

[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] 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] 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] 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] 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] 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
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] 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] 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] 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] 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] 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
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] 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] 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] 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] 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] 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

  1   2   3   4   >