Commit graph

459 commits

Author SHA1 Message Date
Bborie Park 1fd8813cf3 Addition of ST_Union(raster) function and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10370 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-03 20:53:22 +00:00
Bborie Park 7c9cf073c8 Added regression test for rt_raster_clone() and added missing SRID copy.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10369 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-03 20:53:15 +00:00
Bborie Park 563fb8ac54 Added multi-band support for ST_Union. Ticket is #2021
git-svn-id: http://svn.osgeo.org/postgis/trunk@10360 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-02 21:45:41 +00:00
Bborie Park b88337d497 Addition of C-based ST_Union(raster) aggregate function (ticket #1364). Renamed low level function rt_raster_has_no_band() to raster_has_band(). Updated docs and NEWS for ST_Union.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10344 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-28 23:09:31 +00:00
Bborie Park 7a2facadff Additional regression tests for ST_Neighborhood and tweaked to support a
distance values of zero for one axis.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10333 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-26 15:56:17 +00:00
Bborie Park 75918f8da5 Added regression tests, bug fixes and code cleanup for
rt_raster_iterator().

git-svn-id: http://svn.osgeo.org/postgis/trunk@10331 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-25 22:22:33 +00:00
Bborie Park 7d78e9441f Added rt_raster_iterator(), which is feature complete. Now need to add
lots of regression tests before moving on to the PostgreSQL side to hook
into it.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10330 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-25 22:22:27 +00:00
Bborie Park 5cc2737a76 Changed behavior when there is no pixels in the neighborhood for
ST_Neighborhood.  It should still return an array as the pixel of
interest could have a value... just surrounded by NODATA.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10329 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-25 19:23:43 +00:00
Bborie Park 862339e5cd Added correct handling of rt_band's ownsdata flag indicating if the
memory used for the band's data (only for inline, not offline) is
managed internally.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10327 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-25 14:07:22 +00:00
Bborie Park 83f25d261e Changed output array of ST_Neighborhood to have dimensions of Y,X
instead of X,Y. This matches that found for GDAL blocks.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10323 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-24 15:07:58 +00:00
Bborie Park 9735b2f561 Additional tests for ST_Neighborhood()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10322 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-24 15:07:50 +00:00
Bborie Park 0a946a4627 Additional regression tests for rt_raster_get_nearest_pixel()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10306 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-19 18:48:37 +00:00
Bborie Park c800930a2b Tweaked ST_Neighborhood() to use two separate distance parameters for X
and Y axes.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10304 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-19 18:48:24 +00:00
Bborie Park ce7f81ffdc Added regression tests for ST_InvDistWeight4ma()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10302 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-19 18:48:08 +00:00
Bborie Park c1c79590fe Added new variant on existing ST_SetValues where instead of a noset 2D
array of booleans, the parameter nosetvalue can be used instead.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10260 b70326c6-7e19-0410-871a-916f4a2858ee
2012-09-08 01:21:21 +00:00
Bborie Park 9bb86a38b8 Tweaked tests to use new variants of ST_AddBand and ST_SetValues
git-svn-id: http://svn.osgeo.org/postgis/trunk@10154 b70326c6-7e19-0410-871a-916f4a2858ee
2012-08-02 19:27:55 +00:00
Bborie Park 2d9fbc9d1a Rewrote ST_AddBand(raster, ...) array version in C. Ticket is #1363
git-svn-id: http://svn.osgeo.org/postgis/trunk@10150 b70326c6-7e19-0410-871a-916f4a2858ee
2012-08-01 23:16:41 +00:00
Bborie Park 7eef12ba61 Added regression tests and docs for two of the ST_SetValues variants
git-svn-id: http://svn.osgeo.org/postgis/trunk@10148 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-31 23:44:16 +00:00
Bborie Park 3a94058312 Make PostgreSQL 8.4 happy with the rt_polygon regression test.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10143 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-30 22:40:40 +00:00
Bborie Park e33c9bac72 Refactored ST_AddBand to permit adding one or more new bands in one
call.  Ticket is #1938.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10130 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-27 19:46:03 +00:00
Bborie Park c5cd786a07 Removed garbage comments
git-svn-id: http://svn.osgeo.org/postgis/trunk@10118 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-25 03:36:30 +00:00
Bborie Park 433e5f0847 Consolidated create_* and drop_* scripts into respective regression
tests.  Should make things easier to build a valgrind test suite.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10117 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-25 03:36:24 +00:00
Bborie Park c175d60ef0 Added ST_DFullyWithin(raster, raster) and regression tests.
Ticket is #1920

git-svn-id: http://svn.osgeo.org/postgis/trunk@10115 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-25 03:36:05 +00:00
Bborie Park b0c173cbdb Added rt_raster_full_within_distance() and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10114 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-25 03:35:57 +00:00
Bborie Park f3875ab86a Added ST_DWithin(raster, raster) and regression tests. Ticket is #1922
git-svn-id: http://svn.osgeo.org/postgis/trunk@10112 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-25 03:35:45 +00:00
Bborie Park eb52042f58 Added rt_raster_within_distance() and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10111 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-25 03:35:36 +00:00
Bborie Park 6b50e23c33 Added ST_Disjoint(raster, raster), regression tests and docs. Ticket is
git-svn-id: http://svn.osgeo.org/postgis/trunk@10110 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-24 18:01:31 +00:00
Bborie Park 1d9b503ead Added ST_CoveredBy and regression tests. Ticket is #1917.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10108 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 22:57:17 +00:00
Bborie Park 990cfb1c9d Added rt_raster_covered_by() and related tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10106 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 22:57:05 +00:00
Bborie Park 3b3e96d27f Added ST_Covers() and regression tests. Ticket is #1916
git-svn-id: http://svn.osgeo.org/postgis/trunk@10104 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 22:56:53 +00:00
Bborie Park 607714c29a Added rt_raster_covers() and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10103 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 22:56:45 +00:00
Bborie Park 0a380a004a Added ST_ContainsProperly(raster, raster) and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10101 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 18:58:14 +00:00
Bborie Park 6bced093be Addition of rt_raster_contains_properly and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10100 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 18:58:05 +00:00
Bborie Park 2ed157c71e Added regression tests for ST_Within(raster, raster). Ticket is #1923.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10099 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 17:50:23 +00:00
Bborie Park 743417d895 Reintroduced ST_Intersects(geometry, raster) and ST_Intersects(raster,
geometry).  Added notes regarding the use of ST_Polygon when needing to
test the spatial relationship between a raster and a geometry.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10095 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 17:49:57 +00:00
Bborie Park 27d289efcc Updated regression tests to reflect the removal of various functions
git-svn-id: http://svn.osgeo.org/postgis/trunk@10093 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 17:49:46 +00:00
Bborie Park 38dd49660f Addition of ST_Contains and regression tests. Ticket is #1914
git-svn-id: http://svn.osgeo.org/postgis/trunk@10089 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 17:49:18 +00:00
Bborie Park b81c7f6edf Added rt_raster_contains() and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10088 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-23 17:49:11 +00:00
Bborie Park 2cc2b381cc Addition debug messages and disabled one regression test for ST_Touches
due to floating point issues.  Will need to see the WKB output.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10081 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-20 00:31:51 +00:00
Bborie Park 92f85585b1 Addition of ST_Touches() for rasters and related regression tests.
Ticket is #1921

git-svn-id: http://svn.osgeo.org/postgis/trunk@10078 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-19 20:10:13 +00:00
Bborie Park 42c9e61289 Remove rt_spatial_relationship regression tests as similar tests are
done in rt_intersects and rt_intersection

git-svn-id: http://svn.osgeo.org/postgis/trunk@10077 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-19 20:10:00 +00:00
Bborie Park 71c48ef768 Extracted most of code in rt_raster_overlaps to create generic GEOS
spatial relationship testing function
rt_raster_geos_spatial_relationship().  Refactored rt_raster_overlaps()
call rt_raster_geos_spatial_relationship().  Added rt_raster_touches()
and associated regression tests

git-svn-id: http://svn.osgeo.org/postgis/trunk@10076 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-19 20:09:53 +00:00
Bborie Park 6447ae42aa Added ST_Overlaps() and associated regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10074 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-19 18:18:24 +00:00
Bborie Park 30321fe5c5 Addition of rt_raster_overlaps and related regression tests. Fixed
memory leaks in rt_raster_surface.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10073 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-19 18:18:16 +00:00
Bborie Park 856ff19edb Fixed ST_Polygon regression tests to properly handle different GEOS
versions

git-svn-id: http://svn.osgeo.org/postgis/trunk@10069 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-17 22:38:03 +00:00
Bborie Park 196bd3768e Regression tests intended for ST_BandSurface are now for ST_Polygon
git-svn-id: http://svn.osgeo.org/postgis/trunk@10066 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-17 22:37:46 +00:00
Bborie Park 7748002edc Removed ST_BandSurface as ST_Polygon does the same thing, just in SQL.
Changed ST_Polygon to point use C function instead of sql.
Refactored rt_raster_surface to match performance of SQL-only
ST_Polygon.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10065 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-17 22:37:37 +00:00
Bborie Park 07164382cb Addition of ST_BandSurface and regressions tests. Ticket is #1911
git-svn-id: http://svn.osgeo.org/postgis/trunk@10058 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-13 23:28:57 +00:00
Bborie Park aed8878410 Additional tests for rt_raster_surface()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10057 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-13 23:28:50 +00:00
Bborie Park 9a11530a46 Addition of rt_raster_surface() function and related regression test.
Added regression test for rt_raster_pixel_as_polygon.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10055 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-13 23:28:39 +00:00
Bborie Park fb817af897 Initial commit of rt_raster_surface() with base regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10054 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-13 23:28:32 +00:00
Bborie Park c07caf55e6 Fixed how the minimum possible value of a pixel type was being
determined.  Added regression tests for band without NODATA.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10029 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-04 00:33:00 +00:00
Bborie Park 9ab911edbd Addition of regression tests for ST_PixelAsCentroids and
ST_PixelAsPoints

git-svn-id: http://svn.osgeo.org/postgis/trunk@10025 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-03 22:30:20 +00:00
Bborie Park d4f05e108b Addition of ST_PixelAsPoints and ST_PixelAsCentroids
git-svn-id: http://svn.osgeo.org/postgis/trunk@10024 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-03 22:30:13 +00:00
Bborie Park 09257da404 Change signature of ST_PixelAsPolygons() and added regression tests.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10022 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-03 22:30:00 +00:00
Bborie Park ce1cb8b46f Refactored ST_PixelAsPolygons to call a C function and have enhanced
capabilities.  Additional variants and regression tests are next.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10020 b70326c6-7e19-0410-871a-916f4a2858ee
2012-07-03 22:29:43 +00:00
Bborie Park 3908d60bc0 Addition of ST_PixelOfValue. Ticket is #1889.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9987 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-26 18:17:31 +00:00
Bborie Park 5f01476304 Changed the string "MISSING GDAL DATA" to "GDAL_DATA not found".
git-svn-id: http://svn.osgeo.org/postgis/trunk@9969 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-21 20:18:18 +00:00
Bborie Park d6a5e52c74 Added method that includes the string "MISSING GDAL DATA" in the output
of postgis_gdal_version() if GDAL is unable to access its data files

git-svn-id: http://svn.osgeo.org/postgis/trunk@9968 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-21 20:18:12 +00:00
Bborie Park ebbe8f5538 Refactored aggregate ST_SameAlignment to return NULL if one of the
rasters passed in is NULL.  Added regression tests for aggegrate
ST_SameAlignment.

git-svn-id: http://svn.osgeo.org/postgis/trunk@9957 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-19 22:09:46 +00:00
Bborie Park efde661e45 Added check before calling PG_FREE_IF_COPY() in RASTER_mapAlgebra2()
git-svn-id: http://svn.osgeo.org/postgis/trunk@9944 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-18 22:47:59 +00:00
Bborie Park 89870cc439 When no pixels are counted for summary stats, all other elements of
stats output should be NULL.  Ticket is #1875

git-svn-id: http://svn.osgeo.org/postgis/trunk@9943 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-18 22:47:52 +00:00
Bborie Park 09ff177184 Fix division by zero in ST_ApproxSummaryStats and the situation where
band is empty.  Added regression tests for both situations.
Ticket is #1872

git-svn-id: http://svn.osgeo.org/postgis/trunk@9940 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-18 22:47:34 +00:00
Bborie Park d73d0bcde6 Fixed expected output. Ticket is #1848
git-svn-id: http://svn.osgeo.org/postgis/trunk@9915 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-15 21:59:10 +00:00
Bborie Park 098e032ceb Additional sorting of rt_clip regression test. Ticket is #1848
git-svn-id: http://svn.osgeo.org/postgis/trunk@9913 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-15 15:30:03 +00:00
Bborie Park 2869413b01 Tweaked rt_clip queries to have the output ordered. Changed the round()
call to a ceil() call due to the question of rounding 27.5 (is it 28 or
27?).  Ticket is 1848.

git-svn-id: http://svn.osgeo.org/postgis/trunk@9858 b70326c6-7e19-0410-871a-916f4a2858ee
2012-06-07 15:56:11 +00:00
Paul Ramsey 6caa800404 Convert to using run_test.pl instead of run_test.sh
git-svn-id: http://svn.osgeo.org/postgis/trunk@9847 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-31 22:49:56 +00:00
Paul Ramsey f1324cbb7f Convert sed to perl
git-svn-id: http://svn.osgeo.org/postgis/trunk@9842 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-31 16:57:26 +00:00
Paul Ramsey 6db270b13b Perl-based pre/post hooks for the raster loader tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@9828 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-30 18:59:13 +00:00
Bborie Park 9c8def4b65 Code cleanup related to rt_band_load_offline_data()
git-svn-id: http://svn.osgeo.org/postgis/trunk@9819 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-24 23:13:25 +00:00
Bborie Park 2ea9d7d34f Expansion of regression tests and fix error messages
git-svn-id: http://svn.osgeo.org/postgis/trunk@9795 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-22 17:06:30 +00:00
Bborie Park 091246ef83 Added regression tests for ST_World2RasterCoord and
ST_Raster2WorldCoord.  Updated existing tests use the same functions

git-svn-id: http://svn.osgeo.org/postgis/trunk@9793 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-22 17:06:15 +00:00
Bborie Park f924f88a76 Modified ST_Neighborhood and underlying functions to return 2D double
precision array.  This allows the output to be readily passed onto the
ST_xxx4ma functions.

git-svn-id: http://svn.osgeo.org/postgis/trunk@9789 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-22 17:05:45 +00:00
Bborie Park bc14c40e50 addition of ST_NearestValue and ST_Neighborhood
git-svn-id: http://svn.osgeo.org/postgis/trunk@9786 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-22 17:05:14 +00:00
Bborie Park ba2f6b290f Added ST_Raster2WorldCoord and ST_World2RasterCoord functions to consume
RASTER_rasterToWorldCoord and RASTER_worldToRasterCoord functions.
Refactored existing ST_Raster2WorldCoord(X|Y) and
ST_World2RasterCoord(X|Y) functions to call new functions

git-svn-id: http://svn.osgeo.org/postgis/trunk@9738 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-16 18:47:46 +00:00
Bborie Park c5341810c7 Changed function parameter datatypes from uint16_t to int to better
handle out-of-range values

git-svn-id: http://svn.osgeo.org/postgis/trunk@9733 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-14 23:28:50 +00:00
Bborie Park 42a4a93d61 Additional fixups in rtpg_getSR() for better handling of spatial_ref_sys.
Also inclusion of several regression tests to stress rtpg_getSR().

git-svn-id: http://svn.osgeo.org/postgis/trunk@9709 b70326c6-7e19-0410-871a-916f4a2858ee
2012-05-04 02:54:14 +00:00
Paul Ramsey 29e2d6a299 Change @rm to rm for visibility
git-svn-id: http://svn.osgeo.org/postgis/trunk@9523 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-21 21:36:59 +00:00
Paul Ramsey cf8753bd36 Make distclean should remove all the Makefile's generated by ./configure
git-svn-id: http://svn.osgeo.org/postgis/trunk@9522 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-21 20:32:29 +00:00
Bborie Park 81b987dfb7 Updated to have C API tests use libtool
git-svn-id: http://svn.osgeo.org/postgis/trunk@9500 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-14 20:26:07 +00:00
Bborie Park d1abde2e06 Removed "hasnodata" column output of ST_BandMetaData as per #1681. If a band does NOT have a NODATA value, the "nodatavalue" column will be NULL.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9484 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-13 16:13:48 +00:00
Paul Ramsey 987e550427 Remove reliance on pwd for raster build and test.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9423 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-07 20:38:53 +00:00
Bborie Park c4d679a6d6 Add handling of when clamped pixel values is equal to the band's clamped NODATA value. Ticket is #1139.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9380 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-02 01:15:35 +00:00
David Zwarg c566325249 Added regression test for error case reported in #1638.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9379 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-01 22:25:12 +00:00
Bborie Park da2ddaa065 Refactored how skewed rasters are computed as the extents were not correct. Rewrote parts of rt_raster_gdal_warp and rt_raster_gdal_rasterize. Related ticket is #1615.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9378 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-01 22:17:28 +00:00
Bborie Park 4e0e8a5948 Update regression tests for 1-raster ST_MapAlgebraExpr due to commit r9371
git-svn-id: http://svn.osgeo.org/postgis/trunk@9373 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-01 16:47:20 +00:00
Pierre Racine e15f24052c Fix for ticket #1635. Added explicit ~ and && operators on raster and geometry.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9372 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-01 16:47:18 +00:00
Pierre Racine 82dd3e883c Fix for ticket 1536. Added a nodataval[] parameter to ST_Intersection and removed the otheruserfunc one.
Changed the ST_Clip trimraster parameter name to crop and set it to true by default.

Updated the doc.


git-svn-id: http://svn.osgeo.org/postgis/trunk@9336 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-29 02:47:35 +00:00
Paul Ramsey 729d1061cb Try again with line endings, this time using eol-style instead of eol-type (#1605)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9324 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-27 22:08:12 +00:00
Bborie Park 2ea489449e Correct handling of 8BSI pixel types when converting a raster to a GDAL MEM dataset. This should resolve the failures in #1617.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9313 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-27 16:42:03 +00:00
Bborie Park daa8db9ca9 Additional test of rt_raster_to_gdal().
git-svn-id: http://svn.osgeo.org/postgis/trunk@9303 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-26 18:31:38 +00:00
Paul Ramsey 154d3402be Compress sed calls into one to make life better for MSYS
git-svn-id: http://svn.osgeo.org/postgis/trunk@9300 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-25 19:46:00 +00:00
Bborie Park abc24ff5a2 Forgot to update regression tests for changes made in r9293
git-svn-id: http://svn.osgeo.org/postgis/trunk@9294 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-24 23:42:58 +00:00
Bborie Park 9d9c19d7c1 Added additional conditions for rt_raster_gdal_rasterize() determining when to expand the extent.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9286 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-24 17:33:48 +00:00
Bborie Park c91f947cf4 Set all raster CASTs to be ASSIGNMENT not IMPLICIT. Related ticket is #490. Knowing my luck, I'll be reverting this due to some showstopper.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9282 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-24 05:05:25 +00:00
Bborie Park 5bb4a73a5f Added correct handling of negative scale-x and positive scale-y in rt_raster_gdal_warp().
git-svn-id: http://svn.osgeo.org/postgis/trunk@9281 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-23 22:25:54 +00:00
Bborie Park dea913f123 Renamed rt_raster_dump_as_wktpolygons() to rt_raster_gdal_polygonize(). Refactored rt_raster_gdal_polygonize() to use LWPOLY objects instead of WKT strings. Also added cleanup code to make invalid dumped geometries valid. Associated tickets are #1586 and #637.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9280 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-23 21:49:51 +00:00
Bborie Park 4f3020d1b5 Rewrote chunks of rt_raster_gdal_warp() and rt_raster_gdal_rasterize() to correctly generate skewed rasters. Related ticket is #1395. This should also resolve #1586.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9271 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-22 23:06:26 +00:00
Paul Ramsey 46bbc14bfb Switch to evaluating tests using psql with verbosity=terse
git-svn-id: http://svn.osgeo.org/postgis/trunk@9260 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-22 18:59:09 +00:00
Pierre Racine 06aa92b83e Fix for #1576 & #1569. ST_Clip now works on multiband rasters and accept an array of nodata values.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9195 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-15 19:28:31 +00:00
Bborie Park add85641d3 Readded rt_clip regression test.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9188 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-14 17:47:12 +00:00
Pierre Racine ee19eb5332 Temporarily remove st_clip regress...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9183 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-13 22:46:36 +00:00
Pierre Racine 8d55a8d413 Closing ticket #597. Added regression tests for ST_Clip. More tests to come when fixing #1576.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9181 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-13 21:58:53 +00:00
Pierre Racine d4590827ad Fix regression broken by the limit imposed to SRID < 999999. Anyway the srid provided was not the right one. Changed from 4269 to 26919.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9169 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-13 15:43:16 +00:00
Paul Ramsey 17215f5474 Fix regression in OSX (-0 vs 0)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9156 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-11 16:08:26 +00:00
Bborie Park 9369f89557 Added checks of SRID to make sure that SRIDs are within the permitted range. Ticket is #1568.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9154 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-10 23:33:37 +00:00
Bborie Park 485af0e81f Fix to correct building of testapi in MinGW. Ticket is #1560.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9121 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-08 21:58:49 +00:00
David Zwarg b3b27f387b Removed geotransform type. Fixed rounding, so Hudson will be my friend in raster regression tests.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9114 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-08 21:03:39 +00:00
David Zwarg c2e9e45a2a Added geotransform methods and correction to basis vectors during raster rotation. #1353
git-svn-id: http://svn.osgeo.org/postgis/trunk@9109 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-08 19:04:48 +00:00
David Zwarg a8fa877d41 Added ST_StdDev4ma raster neighborhood processing function. #1318
git-svn-id: http://svn.osgeo.org/postgis/trunk@9101 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-08 17:23:14 +00:00
Bborie Park 03ee5561c2 Added regression tests for raster2pgsql loader. Ticket is #1388
git-svn-id: http://svn.osgeo.org/postgis/trunk@9098 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-08 16:11:13 +00:00
David Zwarg 3f209b47b6 Added ST_Distinct4ma helper neighborhood processing function. See #1318
git-svn-id: http://svn.osgeo.org/postgis/trunk@9090 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-08 00:43:28 +00:00
Bborie Park 4ba681650c Clean up raster regression and move loader regression directory.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9077 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-07 22:05:05 +00:00
David Zwarg 4c2ed59e35 Added positional parameters to 1 raster version of ST_MapAlgebraFct. Closes #1525
git-svn-id: http://svn.osgeo.org/postgis/trunk@9070 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-07 19:25:08 +00:00
David Zwarg b236795b54 Corrected clamped values in tests for ST_MapAlgebraExpr and ST_MapAlgebraFct.
Implemented prepared statements in ST_MapAlgebraExpr.


git-svn-id: http://svn.osgeo.org/postgis/trunk@9068 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-07 18:07:57 +00:00
Bborie Park 90ece61b86 Added support to pass pixel positions of both rasters to user function in 2-raster ST_MapAlgebraFct. This provides similar functionality to the keywords described in #1525.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9052 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-06 20:53:19 +00:00
David Zwarg b723f7cac9 Reordered linking order for core regression tests. Follow up to http://postgis.refractions.net/pipermail/postgis-devel/2011-December/016646.html and r8399
git-svn-id: http://svn.osgeo.org/postgis/trunk@9040 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-06 17:26:17 +00:00
Sandro Santilli 45694ba759 Implemented new keywords for 1-raster ST_MapAlgebraExpr (#1525)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9031 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-04 17:53:39 +00:00
Bborie Park 729741d8b6 Implemented keywords for 2-raster ST_MapAlgebraExpr as described in #1525. Will do 2-raster ST_MapAlgebraFct next.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9023 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-03 22:57:36 +00:00
Bborie Park 7f1ae773b8 Fixed optimization bug in 1-raster ST_MapAlgebraExpr. Ticket is #1515.
git-svn-id: http://svn.osgeo.org/postgis/trunk@9017 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-03 18:09:27 +00:00
Bborie Park 6414e70abb Additional cleanup of a few functions using ST_PixelAsPolygon(raster, int, int, int). Also, made map algebra expression case-sensitive in 2-raster ST_MapAlgebraExpr. Now, the keywords must be RAST1 and RAST2.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8999 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-01 15:28:40 +00:00
Bborie Park a7cac53372 Refactored regression test for ST_PixelAsPolygon
git-svn-id: http://svn.osgeo.org/postgis/trunk@8998 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-01 14:58:32 +00:00
Sandro Santilli 17f19047df Make test more readable
git-svn-id: http://svn.osgeo.org/postgis/trunk@8996 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-01 11:51:42 +00:00
Sandro Santilli 59b4fce3b1 Keep initial value when an expression eveluates to null (#1523)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8995 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-01 11:39:36 +00:00
Sandro Santilli b06105cb0d Implement RAST.X and RAST.Y keyword substitution in ST_MapAlgebraExpr
Includes regression test and documentation update. See #1519.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8994 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-01 10:15:53 +00:00
Sandro Santilli 4661b67807 Exclude raster_columns from geometry_columns (#1122)
Add regress test, with a newborn "tickets" testcase for raster

git-svn-id: http://svn.osgeo.org/postgis/trunk@8889 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-20 09:11:42 +00:00
Sandro Santilli ec5bfe1318 Update expected raster intersection results after fix to #852
I've carefully checked the cases and where indeed expecting wrong
results (the point is very close to the raster's convex hull boundary
but slightly outside, ST_Distance reports 1.58882185807825e-14 units)

git-svn-id: http://svn.osgeo.org/postgis/trunk@8876 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-19 17:03:07 +00:00
Sandro Santilli 3a61ab1f87 Run the testsuite again after upgrading (#1326)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8855 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 17:52:57 +00:00
Sandro Santilli 419470fc86 Enhance staged install to include raster, topology and all scripts
Add an --upgrade switch to regress/run_test in preparation of
regress testing upgrade scripts (#1326)

git-svn-id: http://svn.osgeo.org/postgis/trunk@8853 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-17 17:13:32 +00:00
Mark Cave-Ayland 2f32b97fdf Use normal autoconf convention of using #define to determine whether or not GDALFPOLYGONIZE is present, rather than always having it present and setting its value to either 0 or 1.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8810 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-14 00:49:29 +00:00
Bborie Park bd703fcc7f Fixed incorrect call to rt_raster_geopoint_to_cell in rt_band_load_offline_data and added additional debug messages
git-svn-id: http://svn.osgeo.org/postgis/trunk@8752 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-10 19:36:52 +00:00
Bborie Park 35b0ff01ae Make the data of externally-loaded band internally owned so a call to rt_band_destroy() properly frees the memory.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8731 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-09 20:08:15 +00:00
Bborie Park 370bae1ed5 Add read-only support for band data located outside the database in raster files. All "get" and analysis functions should work for out of database bands. Related ticket is #1440. Also added a test raster file for use by an out of db band and future use for raster2pgsql loader regression tests.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8730 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-09 19:48:21 +00:00
Bborie Park 4f81e7e099 Code cleanup related to registering and deregistering GDAL drivers
git-svn-id: http://svn.osgeo.org/postgis/trunk@8704 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-08 16:28:12 +00:00
Bborie Park 2e75260f57 Added shortcut mechanism for copying data in rt_raster_from_gdal_dataset() when the natural block width is the raster width. Enhanced testing in testapi.c.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8684 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-05 21:18:56 +00:00
Bborie Park 43938cd381 Additional regression tests for ST_AsGDALRaster, ST_GDALDrivers, ST_AsRaster, ST_Resample, ST_Metadata. Syntax cleanup in rt_pg.c and testwkb.c
git-svn-id: http://svn.osgeo.org/postgis/trunk@8681 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-05 20:13:12 +00:00
Bborie Park 9dbf209ce1 Memory bug fixes and additional regression tests for ST_SummaryStats, ST_Histogram, ST_ValueCount, ST_Reclass and ST_Quantile. Ticket is #1432.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8679 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-05 18:59:52 +00:00
Sandro Santilli 7761d221f0 run_test doesn't need USE_VERSION anymore
git-svn-id: http://svn.osgeo.org/postgis/trunk@8557 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 10:42:48 +00:00
Sandro Santilli 341478efe6 Drop created function after run
git-svn-id: http://svn.osgeo.org/postgis/trunk@8553 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:59:14 +00:00
Sandro Santilli f729c9a9b3 Ensure mapalgebra test functions are dropped
git-svn-id: http://svn.osgeo.org/postgis/trunk@8552 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:59:08 +00:00
Sandro Santilli 1aeba672f2 Don't load rt_utility_test data creator as test
git-svn-id: http://svn.osgeo.org/postgis/trunk@8551 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:59:00 +00:00
Sandro Santilli f81369f04f Add rt_empty_raster dropper script
git-svn-id: http://svn.osgeo.org/postgis/trunk@8550 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:53 +00:00
Sandro Santilli 741f548c00 Add rt_properties_test dropper script
git-svn-id: http://svn.osgeo.org/postgis/trunk@8549 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:46 +00:00
Sandro Santilli 2bcde30d50 Move single-test data tables within the testfiles, cleanup after run
git-svn-id: http://svn.osgeo.org/postgis/trunk@8548 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:39 +00:00
Sandro Santilli a8e3b2daa3 Cleanup after run
git-svn-id: http://svn.osgeo.org/postgis/trunk@8547 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:31 +00:00
Sandro Santilli a138fc0600 Add a drop_rt_band_properties_test script for cleanup purposes
git-svn-id: http://svn.osgeo.org/postgis/trunk@8546 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:25 +00:00
Sandro Santilli 18fd4a5dda cleanup data tables
git-svn-id: http://svn.osgeo.org/postgis/trunk@8545 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:17 +00:00
Sandro Santilli 24b57c918d Add a drop_rt_gist_test.sql file for cleanup purposes (#301)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8544 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:10 +00:00
Sandro Santilli e259e46af1 Cleanup created objects
git-svn-id: http://svn.osgeo.org/postgis/trunk@8543 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 09:58:03 +00:00
Bborie Park ccf13f9862 Correct handling of make target "distclean". Next is "uninstall".
git-svn-id: http://svn.osgeo.org/postgis/trunk@8474 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-20 02:58:11 +00:00
Bborie Park 6336860b6e Fixed to suppress PL/pgSQL notices causing issues due to line # output. Added order by to check_raster_overviews to ensure consistent output.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8464 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-19 04:56:31 +00:00
Bborie Park deb951ba5b Refactored and cleaned up the regressions checks of values in raster_columns and raster_overviews views.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8457 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-19 01:53:09 +00:00
Sandro Santilli c2f8b62af6 Do not expect things to happen in "userland" schema (what is it?)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8455 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-18 22:42:33 +00:00
Bborie Park ae7aca281d Minor comment cleanup in rtpostgis.sql.in.c. Added regression tests for AddRasterConstraints, AddOverviewConstraints, DropRasterConstraints and DropOverviewConstraints.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8448 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-16 22:07:26 +00:00
Bborie Park 7edd2ae967 Addition of C-based ST_MinPossibleValue to replace the existing ST_MinPossibleVal which uses hard-coded values. Updated dependent functions and scripts/plpgsql to use new function. Deleted scripts/plpgsql/st_minpossibleval.sql to stop people from using it. Associated ticket is #1298.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8436 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-16 01:11:21 +00:00
Bborie Park 9e994cde30 Addition of two-raster ST_Intersection function set in raster-space well as another set for raster,geometry ST_Intersection in raster-space. Associated ticket is #1381
git-svn-id: http://svn.osgeo.org/postgis/trunk@8434 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-15 23:47:25 +00:00
Bborie Park e105d93474 Renamed st_bytea to bytea as per PostGIS convention. Existing databases will not be affected if upgraded using the upgrade scripts. Associated ticket is #1003
git-svn-id: http://svn.osgeo.org/postgis/trunk@8423 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-15 00:21:31 +00:00
Bborie Park c79a760c46 Renamed operator functions and made appropriate changes to associated operators to be inline with usage for geometry and geography. Associated ticket is #633. Existing users will not be affected as the upgrade scripts do not drop or add new operators.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8421 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-14 23:51:24 +00:00
Bborie Park 03521be301 Dropped casts to box2d and replaced with casts to box3d. Associated ticket is #1330.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8419 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-14 22:57:58 +00:00
Bborie Park fce6e3a842 Added option -G to get listing of supported raster types instead of calling ST_GDALDrivers in SQL. Had to tweak rt_raster_gdal_drivers in rt_api.c to not limit drivers based upon creation capabilities. Associated ticket is #1374.
Added ability to specify band indices with ranges for option -b.  Example: -b 1-5,7,9-15.  Associated ticket is #1375.
Added warning messages when loader is processing more than one raster and rasters may have different number of bands, pixel types, hasnodata flags, NODATA values, geotransforms andtile sizes.  Associated ticket is #153.


git-svn-id: http://svn.osgeo.org/postgis/trunk@8418 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-14 22:23:42 +00:00
Regina Obe e887b76b2e Revisions to ST_Union for raster: get rid of dependency on rastexpr (and get rid of type), put in regress tests, get rid of many ST_Union permutations and limit to st_union(rast), st_union(rast,p_expression), st_union(rast,band_num), st_union(rast,band_num,p_expression). Note for drop I'm not dropping those other versions in case people have installed them from scripts folder or are currently using them. just dropping the ones I'm replacing.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8351 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-11 15:45:07 +00:00
Regina Obe b53ce2c834 ST_AddBand version that takes an array of rasters
git-svn-id: http://svn.osgeo.org/postgis/trunk@8343 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-10 03:12:06 +00:00
Bborie Park af14045d90 As per discussions and ticket #1319, raster_columns and raster_overviews are now constraint-based views. AddRasterColumn, DropRasterColumn and DropRasterTable are now deprecated in favor of AddRasterConstraints and DropRasterConstraints. Additional constraints are now available for enforcing the consistency of the rasters in a table.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8305 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-05 18:58:51 +00:00
Bborie Park 1c264ccf8b Removed VARIADIC from ST_BandMetadata. Associated ticket is #1343.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8300 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-03 06:54:04 +00:00
David Zwarg bc11c03245 Added neighborhood hillshade on top of ST_MapAlgebraFctNgb. Part of #1318
git-svn-id: http://svn.osgeo.org/postgis/trunk@8274 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-01 04:29:24 +00:00
Bborie Park 9ad8d2bdc6 Tweaked ST_BandMetadata so that calling the function with an empty array returns all metadata of all bands. Example: ST_BandMetadata(rast, VARIADIC ARRAY[]::int[])
git-svn-id: http://svn.osgeo.org/postgis/trunk@8273 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-01 02:23:46 +00:00
David Zwarg 070d5b4702 Added ST_Aspect map algebra neighborhood shortcut function. #1318
git-svn-id: http://svn.osgeo.org/postgis/trunk@8265 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-30 22:34:29 +00:00
David Zwarg c46934ade1 Added ST_Slope map algebra neighborhood shortcut function.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8264 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-30 21:44:36 +00:00
Bborie Park 1897194dd0 Fixed ST_AsRaster to duplicate exactly the attributes of a reference raster.
Associated ticket is #1336.


git-svn-id: http://svn.osgeo.org/postgis/trunk@8263 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-30 20:35:57 +00:00
David Zwarg 8fee101ce1 Added helper user functions for common MapAlgebra operations: Min, Max, Mean, Range. #1318
git-svn-id: http://svn.osgeo.org/postgis/trunk@8262 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-30 19:26:34 +00:00
David Zwarg 3b770bde14 Updated tests for 'dog-ate-my-homework' test. Expanded comments and elaborated on complex conditionals in ST_MapAlgebraFctNgb
git-svn-id: http://svn.osgeo.org/postgis/trunk@8261 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-30 16:45:54 +00:00
David Zwarg 6582cf9f06 Added additional tests for ST_MapAlgebraFctNgb, changed string compare on nodatamode to !=
git-svn-id: http://svn.osgeo.org/postgis/trunk@8260 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-30 14:51:33 +00:00
Bborie Park 28c81a8579 In preparation of turning the table raster_columns into a view, refactored ST_BandMetadata to have the bandnum parameter be variadic. Fleshed out regression tests for ST_BandMetadata.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8259 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-29 23:25:49 +00:00
David Zwarg 5255d20dab Nodata mode defaults to 'ignore' if it is NULL. Added tests for out of range neighborhoods.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8185 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 21:28:04 +00:00
David Zwarg d7c4d5437d Non-functional change. Updated author email address for dzwarg.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8184 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 20:56:57 +00:00
David Zwarg 663a3de49e Refactored ST_MapAlgebraFctNgb to cache userfunction lookup, and accept NULL input and output values.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8183 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 20:53:46 +00:00
David Zwarg 15c2f240d2 Refactored ST_MapAlgebraFct to cache userfunction lookup, and accept NULL input and output values.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8182 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 20:15:00 +00:00
Bborie Park 028ea10f03 Added a flag --with-raster-dblwarning so as to provide the software builder the option of enabling all the value truncation/clamping/conversion warnings, which can be many. The new default is to suppress those warnings. All appropriate regression tests have been updated.
Associated ticket is #1307


git-svn-id: http://svn.osgeo.org/postgis/trunk@8181 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 18:30:00 +00:00
David Zwarg 1459ec6ebd Enabled all tests on ST_MapAlgebraFctNgb.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8180 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 15:53:54 +00:00
Bborie Park 8faec69f9a Fix the 8.4 error only described in #1296.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8165 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-17 22:48:57 +00:00
Bborie Park 6183db8972 Fixed invalid handling of nodatavalue in ST_BandMetaData(). Issue arises due to C backend using Float8GetDatum while SQL frontend using real datatype.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8162 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-17 14:49:34 +00:00
David Zwarg 237f13cc96 Added single version of map algebra that operates on neighborhoods.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8154 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-14 23:21:12 +00:00
Bborie Park 5bd86f0e99 Added ability to specify raster width and height to ST_Resample.
Associated ticket is #1267


git-svn-id: http://svn.osgeo.org/postgis/trunk@8153 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-14 21:40:25 +00:00
Bborie Park 7264f90764 Added checks to make sure user-function is valid. Also added check for volatility of user-function with notice if function is volatile.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8147 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-12 15:12:30 +00:00
Bborie Park 3f1a35b8fb Add ST_MapAlgebraFct for 2 rasters. This is the sibling of 2-raster ST_MapAlgebraExpr. Renamed RASTER_mapAlgebra2Expr to RASTER_mapAlgebra2 as both 2-raster ST_MapAlgebraExpr and ST_MapAlgebraFct call the same function.
Associated ticket is #1281.


git-svn-id: http://svn.osgeo.org/postgis/trunk@8137 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-11 15:41:32 +00:00
Bborie Park 8a5872696a Removed all remaining memory leaks from testapi.c
git-svn-id: http://svn.osgeo.org/postgis/trunk@8130 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-09 23:52:45 +00:00
Bborie Park ee0f16bd37 Rolled back attempt to clean up memory handling. We'll just live with this until testapi.c is replaced by cunit tests for raster.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8129 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-09 23:12:29 +00:00
Bborie Park 41d2a118dc Separated the output raster's extent calculation from RASTER_mapAlgebra2Expr() in rt_pg.c to rt_raster_from_two_rasters() in rt_api.c. Added test of rt_raster_from_two_rasters() in testapi.c
git-svn-id: http://svn.osgeo.org/postgis/trunk@8128 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-09 23:00:53 +00:00
Bborie Park 0fb583a086 Fixed bug where an expression doesn't contain a placeholder (either rast1 or rast2).
Associated ticket is #1276.


git-svn-id: http://svn.osgeo.org/postgis/trunk@8126 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-09 15:35:06 +00:00
Bborie Park 53e28c2724 Renamed ST_MapAlgebra2Expr to ST_MapAlgebra after concensus with Pierre and Regina.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8111 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-08 05:27:51 +00:00
Bborie Park 4a340dd97c Replaced ST_MapAlgebraExpr's "nodatavalueexpr" parameter with "nodataval" and datatype changed from text to double precision. This makes this parameter the same as "nodatanodataval" found in ST_MapAlgebra2Expr.
Associated ticket is #866


git-svn-id: http://svn.osgeo.org/postgis/trunk@8110 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-08 00:00:51 +00:00
Bborie Park c395e3cfe2 Addition of 2-raster map algebra function ST_MapAlgebra2Expr. Next is ST_MapAlgebra2Fct.
Ticket is #1268.


git-svn-id: http://svn.osgeo.org/postgis/trunk@8108 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-07 21:07:56 +00:00
Bborie Park f759f57e69 Renamed output parameter "hasnodatavalue" to "hasnodata" in ST_BandMetadata(). This makes the parameter name consistent with all other use of "hasnodata" and the docs for ST_BandMetadata.
git-svn-id: http://svn.osgeo.org/postgis/trunk@8103 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-06 19:30:32 +00:00
Bborie Park 4c7dbc99ce Corrected rt_raster_same_alignment() and RASTER_sameAlignment() to behave as an end-user would expect it to. So intead of errors when parameters don't match, return false.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7999 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-21 19:10:53 +00:00
David Zwarg 41b8676733 Implemented raster map algebra with user functions/callbacks. (#860)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7980 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-14 18:11:27 +00:00
Sandro Santilli b14980566d Do not input an explicit value to mean unknown SRID (in raster test)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7962 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-10 07:35:36 +00:00
Bborie Park 49ca7588dd Added additional error checking and error messages to ST_SameAlignment function
git-svn-id: http://svn.osgeo.org/postgis/trunk@7959 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-07 00:29:40 +00:00
Bborie Park d911b1ee21 Implements ST_SameAlignment.
Associated ticket is #589.


git-svn-id: http://svn.osgeo.org/postgis/trunk@7951 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-05 23:03:19 +00:00
Bborie Park 2bbfeb294e For linestrings, use same logic for points where extent is increased by half a pixel to catch geometries on the edges.
Associated ticket is #1213


git-svn-id: http://svn.osgeo.org/postgis/trunk@7941 b70326c6-7e19-0410-871a-916f4a2858ee
2011-10-04 19:50:54 +00:00
David Zwarg bc06f1739b Changed ST_MapAlgebra to ST_MapAlgebraExpr. Also moved around the pixeltype parameter -- it is no longer optional. Also updated docs that referred to ST_MapAlgebra. (#860)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7925 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-30 20:03:23 +00:00