Commit graph

343 commits

Author SHA1 Message Date
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