Paul Ramsey [Wed, 28 May 2008 22:58:35 +0000 (22:58 +0000)]
Enhanced speed _ST_DWithin(g,g,d) that returns as soon as g and g are within d of each other, rather than using distance naively. Change ST_DWithin to use enhanced op. (Issue 20)
Paul Ramsey [Thu, 10 Apr 2008 14:44:26 +0000 (14:44 +0000)]
Reduce FTDate field size to 8 bytes from 10. Matches other calls in the file
now, no good explanation in code why it was 10 to start with.
http://postgis.refractions.net/pipermail/postgis-users/2008-April/019169.html
Mark Cave-Ayland [Thu, 10 Apr 2008 06:40:33 +0000 (06:40 +0000)]
Another round of PostgreSQL 8.3 fixes, this time related to arrays. Make sure that we use the supplied ArrayType pointer macros, instead of attempting to access to cast directly to ArrayType. This resolved GBT#13 where a "corrupted histogram" error is thrown when using using ST_EstimatedExtent() under 8.3.
Paul Ramsey [Mon, 7 Apr 2008 19:47:05 +0000 (19:47 +0000)]
Allow conditional regression tests based on GEOS_VERNUM and move the
cover/prepared tests into the appropriate buckets. Fix the AT_AsKML
regression tests.
Mark Cave-Ayland [Mon, 31 Mar 2008 11:16:54 +0000 (11:16 +0000)]
Remove the code that adds share/contrib/nad to the PROJ.4 search path for PostgreSQL < 8.0 since the mechanism for determining the path has changed from earlier versions, and this was mainly for Win32 users. Also rename nad/ directory to proj/ to keep it inline with an existing PROJ.4 installation.
Mark Cave-Ayland [Fri, 28 Mar 2008 18:55:17 +0000 (18:55 +0000)]
Fix crash caused by double-free in LWGEOM_same - we were accidentally freeing the 1st parameter twice instead of freeing the second parameter. Thanks to Cliff Wright for the bug report.
Mark Cave-Ayland [Thu, 27 Mar 2008 21:18:16 +0000 (21:18 +0000)]
Fix bug with |>> and <<| operators - the BOX2D overabove and overbelow functions were actually wrong, causing index scans to return the wrong results. Per bug report from Tomas Karlsson.
Mark Cave-Ayland [Fri, 21 Mar 2008 08:17:49 +0000 (08:17 +0000)]
Resolve GBT bugs #2,#3 and #9 related to crashes when calling aggregate functions under PostgreSQL 8.3 (all earlier versions would not see the error). This was due to missing more VARSIZE macros in the PostgreSQL 8.3 conversion. The complete list of affected functions under PostgreSQL 8.3 is: ST_force_2d(), ST_force_3dz(), ST_force_3dm(), ST_force_4d(), ST_Collect(), ST_MakeLine(), ST_Polygonize(), ST_Union()/ST_GeomUnion(), ST_MakePolygon()/ST_Polygon().
Ben Jubb [Tue, 29 Jan 2008 01:24:34 +0000 (01:24 +0000)]
Changed the interface for the GEOS prepared predicates.
ST_contains, ST_containsProperly, ST_covers, and ST_intersects are now overloaded.
The new arguments style is ( geometry, geometry, integer). The third argument is used to determine when the first argument changes. The assumption is that when the third argument changes, the first argument is assumed to have changed too. This side-steps the issue of determining when the identity of the first geometry changes.
Ben Jubb [Fri, 18 Jan 2008 00:59:13 +0000 (00:59 +0000)]
Tests for the prepared geometry predicates.
The tests were copied from regress_ogc, and modified.
Most of the tests use a pattern where the same function is invoked three times with the same argument.
This tests the prepared geometry caching mechanism.
This testfile haven't been added to regress/Makefile yet, as it fails for one case. This
probably due to a bug in GEOS.
Mark Cave-Ayland [Fri, 11 Jan 2008 15:04:05 +0000 (15:04 +0000)]
Rewrite the pgsql2shp connection string code so that it uses a connection string, rather than setting environment variables. MingW-compiled and MSVC-compiled apps seem to have great problems passing the variables to each other, causing regression to fail. With this fix (and a Makefile tweak), it is now possible to run a MingW-compiled PostGIS against an MSVC compiled PostgreSQL and pass all regression tests.
Commit updated versions of the ChangeLog and README.postgis (also change some references in README.postgis from "run as root" to "run as postgres", and correct the --with-pgsql and --with-geos documentation)
Mark Cave-Ayland [Fri, 30 Nov 2007 13:04:39 +0000 (13:04 +0000)]
Fix the (E)WKB parser so that it performs validation checks in the same way as the WKT parser, e.g. ensure POLYGON rings are closed, LINESTRINGs consist of at least 2 points and that curves have at least 3 points. As discovered when looking simplify() bug submitted by Ivan Mincik.
Mark Cave-Ayland [Tue, 27 Nov 2007 22:39:06 +0000 (22:39 +0000)]
Rename the existing get_int32() and get_uint32() functions to lw_get_int32() and lw_get_uint32() respectively in order to avoid a collision with functions of the same name in newer versions of OS X. This should resolve the problem with PostGIS crashing on some OS X installations. Many thanks to William Kyngesburye and others for resolving this issue.
Mark Cave-Ayland [Tue, 27 Nov 2007 22:19:30 +0000 (22:19 +0000)]
Extend the PROJ.4 search path to include $sharedir/contrib/postgis/nad when looking for grid files. This is mainly to allow Win32 builds to find grid files without having to use a PROJ.4 DLL compiled containing a fixed path.
Mark Cave-Ayland [Fri, 23 Nov 2007 10:42:09 +0000 (10:42 +0000)]
Apply Tom Glancy's patch to shp2pgsql which corrects an off-by-one error in the field_width calculation when determining which SQL numeric type is required depending upon the length of the corresponding shapefile field. This should eliminate various out of range error messages that may have appeared when attempting to load a converted shapefile into PostgreSQL.
Mark Cave-Ayland [Fri, 23 Nov 2007 10:24:00 +0000 (10:24 +0000)]
Commit a first attempt at an Ant build.xml file for the PostGIS JDBC driver so finally all the Java drivers build with Ant for consistency, plus we eliminate numerous cross platform problems. As it stands, the build.xml file supports only the standard JDBC driver - if you wish to use a JTS-enabled JDBC driver or run the online regression tests then you must still use the Makefile. Any help porting the remaining parts of the Makefile would be appreciated.
Mark Cave-Ayland [Mon, 29 Oct 2007 16:29:58 +0000 (16:29 +0000)]
Apply parts of Charlie Savage's MSVC patch - mainly tidying up variable allocations so they appear at the start of functions, but also making better use of the pj_get_errno_ref() which gets rid of the auto-import warnings on MingW.
Mark Cave-Ayland [Mon, 29 Oct 2007 14:22:26 +0000 (14:22 +0000)]
Remove version numbers from liblwgeom references in lwpostgis.sql as per http://postgis.refractions.net/pipermail/postgis-devel/2007-September/002764.html. This should help make upgrades a lot easier for people since it removes the need to change the SQL function definitions when upgrading version. Note that this is a quick and dirty fix as I didn't want to change Makefile.shlib too much - as soon as we remove support for PostgreSQL < 8.0, we can use PGXS instead and thus remove the redundant shared library code from PostGIS.
Mark Cave-Ayland [Mon, 29 Oct 2007 13:44:29 +0000 (13:44 +0000)]
Commit Charlie Savage's patches (with additional comments) to the bounding box/envelope functions to ensure that valid geometries are always returned; in more specific terms, if a bounding box is a point then a POINT is returned, and if a bounding box is 1-dimensional a LINESTRING is returned. Otherwise a POLYGON is returned as per the old behaviour. For details see the thread in the postgis-users archives Sept 2007 'How to get the centroid of an bounding box using st_extent'.
Mark Cave-Ayland [Mon, 29 Oct 2007 12:34:17 +0000 (12:34 +0000)]
Fix broken error message when attempting to deserialise a type other than a point; the message should now correctly show the name of the offending type. Patch supplied by Charlie Savage.
Mark Cave-Ayland [Fri, 28 Sep 2007 10:18:23 +0000 (10:18 +0000)]
Fix a mistake in my refactoring of the AsGML() patch for GML3 support - the detoasted geometry is now the second argument rather than the first. Per report from Olivier Courtin.
Mark Cave-Ayland [Tue, 21 Aug 2007 23:02:41 +0000 (23:02 +0000)]
Fix crash when calling ST_EndPoint caused by a double-free in LWGEOM_endpoint_linestring. This bug has been there for a while - thanks to Eric Francois for the bug report.
Mark Leslie [Thu, 2 Aug 2007 19:58:46 +0000 (19:58 +0000)]
Added PreparedGeometry and caching support to the intersects function in the jts connector. Created wrapper functions for the PreparedGeometry functionality.
Mark Cave-Ayland [Thu, 12 Jul 2007 20:33:23 +0000 (20:33 +0000)]
Add missing methods to the PROJ.4 cache memory context to prevent a backend crash caused by a NULL pointer dereference when PostgreSQL is trying to clean up memory contexts. Per report from Tom Lane.