Commit graph

459 commits

Author SHA1 Message Date
Bborie Park 25b8f66978 Added parameters to ST_Tile(raster) to control padding of generated tiles.
ST_Tile(raster) no longer defaults to padding tiles. Ticket #2069

git-svn-id: http://svn.osgeo.org/postgis/trunk@10836 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-14 20:27:06 +00:00
Bborie Park 00fd6a924c Tweaked the extent computed for the extent constraint
git-svn-id: http://svn.osgeo.org/postgis/trunk@10832 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-14 20:26:30 +00:00
Bborie Park d83f052c5e raster2pgsql no longer pads tiles by default based upon tile position and tile
size. This is part of the refactoring to remove padded tiles. Flag -P
added so that users can indicate that tiles should be padded.
Ticket #826.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10829 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-14 20:26:05 +00:00
Bborie Park dc568e069e Quiet down ST_SameAlignment(raster, raster) as it was way too talkative
git-svn-id: http://svn.osgeo.org/postgis/trunk@10827 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-14 20:25:45 +00:00
Bborie Park 3fd546c380 Updated regression tests for raster2pgsql
git-svn-id: http://svn.osgeo.org/postgis/trunk@10826 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-14 20:25:33 +00:00
Bborie Park cebb5c8923 Fixed behavior of ST_ConvexHull() for empty rasters. Ticket #2126
git-svn-id: http://svn.osgeo.org/postgis/trunk@10810 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-07 01:08:21 +00:00
Bborie Park 1d1dadd509 Removed PICFLAGS from CFLAGS when compiling CUnit suites. Ticket #2125
git-svn-id: http://svn.osgeo.org/postgis/trunk@10779 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-02 22:36:16 +00:00
Bborie Park 249b501069 Added ST_Resize(raster) to resize a raster using desired width/height.
Ticket #1293.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10774 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-01 01:19:53 +00:00
Bborie Park 58e564f82b Removed requirements of SRID for calling GDAL Warp API
git-svn-id: http://svn.osgeo.org/postgis/trunk@10773 b70326c6-7e19-0410-871a-916f4a2858ee
2012-12-01 01:19:45 +00:00
Bborie Park 997d2424cf Added a special case to RASTER_GDALWarp() where if the input raster has
no SRID (SRID_UNKNOWN) AND the operation does not involve a
reprojection, then use a catchall/substitute SRID (in this case 4326).
Ticket #2119

git-svn-id: http://svn.osgeo.org/postgis/trunk@10768 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-30 01:12:58 +00:00
Bborie Park e11c36ae9e Removed confusion between ST_Resample(raster) and ST_Transform(raster)
by removing srid parameter for ST_Resample(). Ticket #1653

git-svn-id: http://svn.osgeo.org/postgis/trunk@10760 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-29 18:59:22 +00:00
Bborie Park 4baab52252 Added CUnit test suites for raster core. Old raster core regression
tests can still be found in raster/test/core but are no longer run.
Probably should delete before 2.1 is released.
Ticket #173

git-svn-id: http://svn.osgeo.org/postgis/trunk@10749 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-29 01:21:33 +00:00
Bborie Park 1806858225 Refactored return and parameters of rt_raster_iterator()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10746 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-28 20:16:45 +00:00
Bborie Park 0f70d41994 Refactored return and parameters of rt_raster_from_two_rasters()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10745 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-28 19:31:59 +00:00
Bborie Park f43ac4e121 Refactored return and parameters of rt_raster_surface()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10744 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-28 15:27:47 +00:00
Bborie Park 224492f6fa Added ST_NotSameAlignmentReason(raster, raster). Ticket #1709
git-svn-id: http://svn.osgeo.org/postgis/trunk@10742 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-27 00:58:36 +00:00
Bborie Park 3b70874da9 Added ST_Transform(raster) variant that allows of aligning output
rasters to a reference raster. Ticket #2105

git-svn-id: http://svn.osgeo.org/postgis/trunk@10741 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-26 21:09:02 +00:00
Bborie Park 0b19048c55 Renamed variants of ST_World2RasterCoord() and ST_Raster2WorldCoord() to
ST_WorldToRasterCoord() and ST_RasterToWorldCoord() as names are
inconsistent with other PostGIS function names. Ticket #2104

git-svn-id: http://svn.osgeo.org/postgis/trunk@10740 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-26 19:13:04 +00:00
Bborie Park c93a40d0b1 Where appropriate, functions in rt_core now use standardized function
return states.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10735 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-25 21:55:42 +00:00
Bborie Park cf1fad5072 Fixed issue where ST_AsRaster() may not return raster with specified
pixel types. Ticket #2100

git-svn-id: http://svn.osgeo.org/postgis/trunk@10710 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-19 23:18:59 +00:00
Bborie Park faab58c46c Added RANGE uniontype option for ST_Union(raster) Ticket #2097
git-svn-id: http://svn.osgeo.org/postgis/trunk@10696 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-16 22:59:46 +00:00
Bborie Park 60bddebf57 Fixed SQL error in regression test
git-svn-id: http://svn.osgeo.org/postgis/trunk@10691 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-16 03:39:42 +00:00
Bborie Park 8aab3b0353 Added docs and regression test for extent parameter variants of
ST_Slope, ST_Aspect and ST_Hillshade

git-svn-id: http://svn.osgeo.org/postgis/trunk@10690 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-16 01:32:10 +00:00
Bborie Park 596a985b12 Refactored ST_Slope, ST_Aspect and ST_Hillshade() (also their
_st_XXX4ma() functions). Detailed docs for all three functions. Outputs
now in sync with return from ArcGIS. Ticket is #2077

git-svn-id: http://svn.osgeo.org/postgis/trunk@10619 b70326c6-7e19-0410-871a-916f4a2858ee
2012-11-02 17:22:29 +00:00
Bborie Park 36a1a9ab39 Added SRID check of geometry for ST_World2RasterCoord variants
git-svn-id: http://svn.osgeo.org/postgis/trunk@10584 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-29 22:23:05 +00:00
Bborie Park bc1deba176 Added check for SRID match in ST_Value(raster) geometry variant
git-svn-id: http://svn.osgeo.org/postgis/trunk@10583 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-29 22:22:57 +00:00
Bborie Park 6cc3ebb2d4 Rewrite of ST_Clip(raster) to be C-based and updated regression test.
Ticket is #2065

git-svn-id: http://svn.osgeo.org/postgis/trunk@10568 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-26 00:28:10 +00:00
Bborie Park bff55cd99b Fixed default Y-scale to -1 from 1
git-svn-id: http://svn.osgeo.org/postgis/trunk@10567 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-25 23:06:42 +00:00
Bborie Park efb538a7c8 Rearranged function arguments for ST_Tile(raster)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10536 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 23:59:02 +00:00
Bborie Park 714e4a202d Added news and docs for ST_Tile(raster). Additional regression tests for
one additional variant of ST_Tile(raster)

git-svn-id: http://svn.osgeo.org/postgis/trunk@10535 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 22:44:52 +00:00
Bborie Park 977d30fbfb Added ST_Tile() and regression tests. The circle is complete.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10534 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 22:44:42 +00:00
Bborie Park ecfd1ae373 Added rt_band_get_pixel_line() and regression tests
git-svn-id: http://svn.osgeo.org/postgis/trunk@10533 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-23 22:44:28 +00:00
Bborie Park f17f3b3ca9 All functions in core API now support a band's isnodata value.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10513 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-22 17:19:28 +00:00
Bborie Park 781902e9bb Changed signature of rt_band_get_nodata() as there was no way to
indicate an error if the band has no NODATA.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10512 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-22 17:19:20 +00:00
Bborie Park fd53ffe4ef Some work adding proper support for using a band's isnodata flag.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10511 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-22 17:19:11 +00:00
Bborie Park 84999882fb Changed function signature for core API function rt_band_get_pixel() to
indicate if pixel is NODATA

git-svn-id: http://svn.osgeo.org/postgis/trunk@10510 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-22 17:19:04 +00:00
Bborie Park cc58352ad2 Combined the gist spatial relationship tests into
rt_gist_relationships

git-svn-id: http://svn.osgeo.org/postgis/trunk@10474 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-18 23:52:45 +00:00
Bborie Park 313ca7680e Combined all raster GEOS dependent spatial relationship regression tests into
rt_geos_relationships.sql

git-svn-id: http://svn.osgeo.org/postgis/trunk@10473 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-18 23:52:36 +00:00
Bborie Park 0b7294f625 Code cleanup in rt_pg/rt_pg.c. Changed point geometry variant of
ST_SetValue() to wrap around geomval variant of ST_SetValues(). This
will result in a behavior change for geometry variant of ST_SetValue().

git-svn-id: http://svn.osgeo.org/postgis/trunk@10466 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-18 21:45:16 +00:00
Bborie Park 8da4897b8c Addition of geomval variants of ST_SetValues() and regression tests.
Added helper function rt_raster_get_inverse_geotransform_matrix().
Additional code cleanup for rt_raster_geopoint_to_cell() and
rt_raster_cell_to_geopoint().

git-svn-id: http://svn.osgeo.org/postgis/trunk@10465 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-18 21:45:06 +00:00
Bborie Park 8dc51330f8 Addition of ST_DumpValues() and regression tests. Ticket #2011
git-svn-id: http://svn.osgeo.org/postgis/trunk@10457 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-17 16:08:16 +00:00
Bborie Park 0814092391 Added 2-raster expression variant of ST_MapAlgebra() and regression
tests.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10441 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-16 19:55:50 +00:00
Bborie Park cff576de11 Additional tweaking of returning empty raster from map algebra of
INTERSECTION or UNION extent

git-svn-id: http://svn.osgeo.org/postgis/trunk@10440 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-16 19:55:41 +00:00
Bborie Park 0d253d3aab Corrected handling of NULL raster resulting from NO intersection of input rasters in map algebra. Fixed spelling mistakes. Additional tests for intersections of more than 3 rasters that don't actually intersect in ST_MapAlgebra
git-svn-id: http://svn.osgeo.org/postgis/trunk@10439 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-16 19:55:34 +00:00
Bborie Park 2558772ba5 Added one-raster expression variant for ST_MapAlgebra and appropriate
regression tests.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10438 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-16 19:55:26 +00:00
Bborie Park 9d2003cf48 Changed how ST_MapAlgebra regression test runs on PostgreSQL 9.0 as
usage of "GROUP BY raster" does not work.  Ticket is #2048.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10429 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-15 03:34:15 +00:00
Bborie Park 0daaaa2fdd Bug fix where pos array size was incorrect.
git-svn-id: http://svn.osgeo.org/postgis/trunk@10422 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-12 19:31:39 +00:00
Bborie Park 6d4a860c64 Duplicated and refactored the ST_XXX4ma() functions for ST_MapAlgebra
usage.  Exception for ST_InvDistWeight4ma() and ST_MinDist4ma(), both of
which are new for 2.1. Added regression tests as well.

git-svn-id: http://svn.osgeo.org/postgis/trunk@10419 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-12 16:06:27 +00:00
Bborie Park 514fd04622 Added n-raster ST_MapAlgebra(). Additional error checking in
rt_raster_iterator(). Added regression checks for n-raster
ST_MapAlgebra(). Ticket is #2030. Added news and docs for
ST_MapAlgebra().

git-svn-id: http://svn.osgeo.org/postgis/trunk@10392 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-10 22:02:40 +00:00
Bborie Park fdc512a4f2 Addition of flag nbnodata to rt_raster_iterator() thus allowing some
memory savings from ST_Union(raster)

git-svn-id: http://svn.osgeo.org/postgis/trunk@10373 b70326c6-7e19-0410-871a-916f4a2858ee
2012-10-03 23:07:09 +00:00
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