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
Bborie Park
6a8a4356c4
Updated regression tests to correctly support change of unknown SRID from -1 to 0.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7923 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-30 00:11:55 +00:00
Bborie Park
167c3b8c9d
Changed function ST_Intersects(raster, raster, int, int) to ST_Intersects(raster, raster). Added additional comments to rt_raster_geopoint_to_cell().
...
Associated ticket is #1212
git-svn-id: http://svn.osgeo.org/postgis/trunk@7919 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-29 18:33:27 +00:00
Bborie Park
224a487980
Removed ST_Intersects(raster, int, raster, int) version of two raster ST_Intersects.
...
Associated ticket is #1212
git-svn-id: http://svn.osgeo.org/postgis/trunk@7901 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-27 03:40:08 +00:00
Regina Obe
265c3a8605
add missing geos flag to let it make check under mingw
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7891 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-25 20:37:39 +00:00
Bborie Park
b443689cf4
Tweaks to makefiles due to linker symbol errors in OSX. Hopefully this can also resolve the issue with #1207 .
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7889 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-24 19:05:10 +00:00
Bborie Park
c5d7903487
Further tweaks to rt_raster_gdal_rasterize to correctly handle auto-computed extents of multipoints. Addition of ST_Intersects for two rasters. Refactored the one raster and one geometry version of ST_Intersects.
...
Associated ticket is #1176
git-svn-id: http://svn.osgeo.org/postgis/trunk@7884 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-22 15:07:25 +00:00
Bborie Park
6f0e380b17
Updated expected output due to change in message
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7817 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-07 13:58:19 +00:00
Bborie Park
152a2d6786
Added optimizations and shortcuts for rt_band_get_quantiles_stream
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7802 b70326c6-7e19-0410-871a-916f4a2858ee
2011-09-02 01:54:43 +00:00
Bborie Park
aba77a3674
Fixed the function rt_band_get_summary_stats rt_core/rt_api.c to correctly handle the situation where a band's values are all nodata
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7788 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-25 23:23:46 +00:00
Bborie Park
56791ce3b5
Fixed the problem where having configure detect that GDAL has the GDALFPolygonize function does not cause the code to use GDALFPolygonize. This is due to the macro GDALFPOLYGONIZE not being set anywhere. So, it is now being set in raster_config.h.in and included in rt_core/rt_api.h. Had to update testapi.c as the geometries generated differ depending on whether or not GDALFPolygonize is used.
...
Associated ticket is #650
git-svn-id: http://svn.osgeo.org/postgis/trunk@7785 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-25 14:44:55 +00:00
Bborie Park
d432dc28e5
Inclusion of missing ST_PixelWidth and ST_PixelHeight functions and regression tests.
...
Associated ticket is #928
git-svn-id: http://svn.osgeo.org/postgis/trunk@7779 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-24 15:23:25 +00:00
Bborie Park
3ac670b992
Refactored ST_ValueCount and ST_ValuePercent to be a C function rather than a plpgsql function.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7778 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-23 22:41:22 +00:00
Regina Obe
df057abedf
#1158 add proj flags to fix mingw test issue
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7774 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-21 03:34:56 +00:00
Bborie Park
4c3dac62a8
More fixups for the quantile coverage function. Fixes segfault that seems to only occur on OSX.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7771 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-20 17:51:04 +00:00
Bborie Park
28797da0e1
Adds coverage table version of ST_Quantile and ST_ApproxQuantile. Function implemented using the algorithm discussed in
...
A One-Pass Space-Efficient Algorithm for Finding Quantiles (1995)
by Rakesh Agrawal, Arun Swami
in Proc. 7th Intl. Conf. Management of Data (COMAD-95)
http://www.almaden.ibm.com/cs/projects/iis/hdb/Publications/papers/comad95.pdf
Also refactored the regression test for rt_histogram due to unnecessary columns in output
git-svn-id: http://svn.osgeo.org/postgis/trunk@7765 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-19 19:08:36 +00:00
Bborie Park
cd974c4adc
Commit of patch provided by David Zwarg in #482 adding the functions ST_SetRotation, ST_Rotation, ST_PixelHeight and ST_PixelWidth.
...
Associated tickets are #482 , #928 , #929 and #936
git-svn-id: http://svn.osgeo.org/postgis/trunk@7763 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-19 14:04:50 +00:00
Bborie Park
33352aacb5
Consolidated various struct declarations from rt_api.c into rt_api.h as these structs are duplicatively redeclared in rt_pg.c and testapi.c
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7745 b70326c6-7e19-0410-871a-916f4a2858ee
2011-08-13 18:10:44 +00:00
Bborie Park
ed8d71db19
Addition of ST_AsRaster function to provide the ability to convert geometries into rasters.
...
Associated ticket is #1141 .
git-svn-id: http://svn.osgeo.org/postgis/trunk@7675 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-25 15:52:36 +00:00
Bborie Park
29686bbbfa
Fixed floating point issue with the remainder returned from the function modf in rt_api.c. Updated messages in rt_pg.c. Corrected expected regression results in rt_resample_expected.
...
Associated ticket is #1114
git-svn-id: http://svn.osgeo.org/postgis/trunk@7657 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-21 16:20:36 +00:00
Bborie Park
f22b886f23
Fixed width and height values expected.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7653 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-18 23:39:05 +00:00
Bborie Park
fa708f255c
- tweaked the rt_resample regression test to use SRIDs under 1000000
...
- changed the computation of width and height when aligning to a grid
git-svn-id: http://svn.osgeo.org/postgis/trunk@7652 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-18 23:29:54 +00:00
Bborie Park
65caa54e1f
Refactored functions returning sets to use Datums instead of C strings, which were causing rounding issues particularly for ST_Metadata. This refactoring affected RASTER_metadata, RASTER_bandmetadata, RASTER_summarystats, RASTER_histogram, RASTER_quantile, RASTER_valuecount and RASTER_gdaldrivers.
...
Also refactored the ST_Raster2World* and ST_World2Raster* functions to get the raster's metadata in one call using ST_Metadata rather than individual calls for the georeference components
git-svn-id: http://svn.osgeo.org/postgis/trunk@7638 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-14 14:54:49 +00:00
Bborie Park
2ad776d498
Complete refactoring of code from ST_Transform to ST_Resample. There are four new functions as of this revision: ST_Resample, ST_Rescale, ST_Reskew and ST_SnapToGrid. ST_Transform is still present but points to ST_Resample.
...
Associated ticket #1114
git-svn-id: http://svn.osgeo.org/postgis/trunk@7633 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-13 19:33:12 +00:00
Bborie Park
c2bd42d810
fixed logic issues in ST_AsJPEG
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7527 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-30 13:28:47 +00:00
Bborie Park
d6dd575dac
modified expected results for rt_pixelvalue.
...
Associated ticket is #1055
git-svn-id: http://svn.osgeo.org/postgis/trunk@7503 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-27 19:02:04 +00:00
Bborie Park
48ff0b2940
Modified ST_Transform to permit specification of projected raster's scale. This is due to the scale change that occurs when a raster is being reprojected.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7482 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-25 19:20:23 +00:00
Bborie Park
67ce832591
Added sanitization of the algorithm parameter of ST_Transform. Refactored the regression test for ST_Transform.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7471 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-24 21:20:04 +00:00
Bborie Park
04bbd059b2
Removed rt_raster_transform from rt_api.c and any calls to it since rt_raster_gdal_warp has same results for reprojections.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7455 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-23 20:46:32 +00:00
Bborie Park
6ebb8e7534
Addition of rt_raster_gdal_warp function in rt_api.c. This was written based upon GDAL's gdalwarp utility to provide a flexible means to reproject, change the scale of, adjust the skew (deskew) of and shift the origin of a raster. RASTER_transform in rt_pg.c has been adjusted to make use of rt_raster_gdal_warp instead of rt_raster_transform. Regression te
...
sts confirm that resulting rasters from rt_raster_gdal_warp are identical to that of rt_raster_transform.
The abilities to change a raster's scale, skew and origin have yet to be tested and have no user-accessible SQL functions as of this revision. This will occur in future revisions.
The function rt_raster_transform will be removed in a future revision.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7454 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-23 20:29:51 +00:00
Bborie Park
b633449bc0
Refactored code and removed the use of SET_VARSIZE for RASTER_band to fix segfault.
...
Associated ticket is #1044 .
git-svn-id: http://svn.osgeo.org/postgis/trunk@7440 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-21 05:05:16 +00:00
Bborie Park
41b6e3dc15
Changed the regression tests for ST_Transform in preparation for testing replacement ST_Transform function with different underlying code.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7432 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-20 14:55:22 +00:00
Bborie Park
8429d06e82
Changed band pixel types to 64BF instead of 32BF so that the warning messages for data getting converted are mitigated.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7400 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-15 15:43:51 +00:00
Bborie Park
4e0a89adc4
Changed SRID to something within the range permitted by GSERIALIZED. As of this revision, all raster regression tests pass successfully.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7396 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-14 19:32:18 +00:00
Bborie Park
cfdb07ccca
Fixed memory leak in RASTER_asGDALRaster of rt_pg.c and left note in comments of rt_raster_to_gdal
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7390 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-13 21:47:27 +00:00
Bborie Park
b2ca472ea1
Added function parameter "header_only" to rt_raster_deserialize. This instructs the function to only extract the raster header.
...
All functions calls to rt_raster_deserialize in rt_pg.c and testwkb.c have been modified to account for the "header_only" parameter. In addition, functions that can use PG_DETOAST_DATUM_SLICE have been modified to use it.
Associated tickets are #867 and #985 .
Now to work on valgrinding rt_pg.c
git-svn-id: http://svn.osgeo.org/postgis/trunk@7376 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-11 19:26:44 +00:00
Bborie Park
19c5577f52
Removed the ST_SummaryStats wrappers: ST_Sum, ST_Mean, ST_Stddev, ST_MinMax. Only ST_Count is preserved as it has a shortcut for when "exclude_nodata_value" is FALSE.
...
Refactored regression test for rt_transform due to removal of some ST_SummaryStats wrappers and make the tests no longer about being exact to specific values but more about being in the appropriate contexts.
Associated ticket is #1005 and to some degree, #985 .
git-svn-id: http://svn.osgeo.org/postgis/trunk@7375 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-11 19:06:15 +00:00
Bborie Park
e5062e5dc9
Refactored rt_raster_replace_band in rt_api.c to return the replaced band.
...
Additional memory cleanups in testapi.c due to segfault and leaks.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7372 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-11 04:59:19 +00:00
Bborie Park
c093bd3940
Fixed bunch of memory leaks in rt_api.c and testapi.c. Will need to valgrind the regression tests to clean up the leaks in rt_pg.c
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7369 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-11 00:05:53 +00:00
Pierre Racine
34f97a500c
Getting pixel value at out of range coordinate should only return a warning. Was broken at r7106. Added a check.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7366 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-10 19:49:29 +00:00
Bborie Park
1bb6dcb742
Rewrote ST_BandMetaData to use a C function instead of sequential calls for the metadata of a raster's band in plpgsql. Also added regression tests for ST_MetaData and ST_BandMetaData due to C functions.
...
Associated ticket #1012
git-svn-id: http://svn.osgeo.org/postgis/trunk@7357 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-10 15:19:03 +00:00