Regina Obe [Sun, 12 Jun 2011 04:52:03 +0000 (04:52 +0000)]
significantly improve speed of reverse geocode (when all states loaded), but using CTEs and unparameterizing query (parameterized often does not use inheritance), reverse_geocode to use default parameters, put in table column comments to describe some of what loader columns mean.
Bborie Park [Sat, 11 Jun 2011 19:26:44 +0000 (19:26 +0000)]
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.
Bborie Park [Sat, 11 Jun 2011 19:06:15 +0000 (19:06 +0000)]
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.
Regina Obe [Sat, 11 Jun 2011 13:41:19 +0000 (13:41 +0000)]
Sort what's new 2.0 by name of section insted of id since raster ids start with RT_ they are being sorted at the top above everything else which is confusing
Regina Obe [Fri, 10 Jun 2011 23:19:32 +0000 (23:19 +0000)]
get rid of ST_SRSText usage is gone and replaced with just srid so parallel with geometry. Update all the function doco -- they used to use srstext, but now they use srid.
Bborie Park [Fri, 10 Jun 2011 18:14:51 +0000 (18:14 +0000)]
Explicitly set GDALWarpOptions element padfSrcNoDataImag as it seems some folks are having regression error. Based upon the GDAL code, explicitly setting padfSrcNoDataImag and padfDstNoDataImag should eliminate the error message that is occurring.
Bborie Park [Fri, 10 Jun 2011 15:19:03 +0000 (15:19 +0000)]
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.
Bborie Park [Thu, 9 Jun 2011 18:55:35 +0000 (18:55 +0000)]
Replaced the parameter "srs" in ST_AsGDALRaster with "srid" so as to match that of ST_Transform and other functions that deals with spatial reference systems. In doing so, this eliminates the user function ST_srtext and just has a hidden _ST_srtext function for use by the underlying C functions. Another nice benefit is that I was able to reduce the number of user-facing functions.
Bborie Park [Wed, 8 Jun 2011 21:10:11 +0000 (21:10 +0000)]
Rewrote how the standard/sample deviation is computed in ST_SummaryStats for coverage tables. It now extends the existing use of a single-pass standard deviation calculation to be able to do the calculation for a coverage table.
Bborie Park [Wed, 8 Jun 2011 00:00:51 +0000 (00:00 +0000)]
fixed ST_SummaryStats for coverage tables where the sum of all tiles was not being computed.
Associated ticket #1005
Also added shortcuts to ST_Count for when parameter "exclude_nodata_value" is FALSE, just compute the count based upon the raster's dimensions. Performance difference between the normal route and the shortcut is negligible for small rasters but noticable when run on large rasters and coverage tables
Bborie Park [Tue, 7 Jun 2011 22:59:23 +0000 (22:59 +0000)]
Added support for coverage tables to ST_Histogram. This entailed adding the ability to explicitly specify the min and max values in the underlying C function rt_band_get_histogram. The min and max parameters should ONLY be used by the established coverage table handling ST_Histogram functions as the returned percent element of the histogram type is changed from returning the percentage to returning the sum of counts for that histogram.
Bborie Park [Tue, 7 Jun 2011 18:21:34 +0000 (18:21 +0000)]
Add ST_Transform function that achieves the primary purpose of reprojecting a raster to a new projection system. This makes use of the GDAL Warp API function GDALAutoCreateWarpedVRT(). In the future, the underlying C function is expected to be refactored to support skewing and pixel scaling at the same time the raster is reprojected.
Really minor changes to rt_pg/rt_pg.c adding initilization values to variables for eliminating compile warnings in Windows (thanks Pierre).
Fixed variable "status" in rt_raster_from_gdal_dataset() of rt_core/rt_api.c
Bborie Park [Sun, 5 Jun 2011 20:52:48 +0000 (20:52 +0000)]
- added additional function parameters "bandNums" and "count" to rt_raster_to_gdal_mem so that the GDAL dataset created only contains those bands specified
- any calls to rt_raster_to_gdal_mem function was refactored for the new function parameters
- refactored rt_raster_dump_as_wktpolygons to make use of rt_raster_to_gdal_mem so as to reduce duplicate code and improve cleanliness
Regina Obe [Sun, 5 Jun 2011 06:13:09 +0000 (06:13 +0000)]
#1004: census has finally released zcta5 for 2010. Get rid of zcta500 table. replace with a more generic named zcta5. Revise loader state script to load in zcta510 data and revise functions to use new zcta5 table.
Bborie Park [Fri, 3 Jun 2011 17:02:57 +0000 (17:02 +0000)]
Added rt_raster_from_gdal_dataset function to rt_core/rt_api.c. This function provides the functionality needed to convert a GDAL dataset into a PostGIS Raster object.
Regina Obe [Wed, 1 Jun 2011 08:17:27 +0000 (08:17 +0000)]
move raster types to raster section (there are way too many now to try to lump into reference_type and do case statements to exclude from postgis_comments). Revise raster_comments to look for types in reference_raster. Add docu for ST_Reclass and reclassarg type. Need at least one more example to show how to use recalssargs.
Regina Obe [Tue, 31 May 2011 01:29:19 +0000 (01:29 +0000)]
#961- reduce number of functions - Get rid of st_area(geography) and change st_area(geography, use_spheroid = true) and also have named argument names so callable by named args
Bborie Park [Mon, 30 May 2011 14:53:11 +0000 (14:53 +0000)]
renamed all instances of "hasnodata" function argument to "exclude_nodata_value" in SQL functions (and underlying code where appropriate) ST_SummaryStats, ST_Count, ST_Sum, ST_Mean, ST_StdDev, ST_MinMax, ST_Quantile, ST_Histogram, ST_ValueCount and ST_ValuePercent
Regina Obe [Mon, 30 May 2011 01:51:37 +0000 (01:51 +0000)]
Move Bborie's new cool stat functions into their own section. Add documentation for st_valuecount -- more coming for other raster functions. macro replace hasnodata with exclude_nodata_value which hopefully will be clearer to everyone. The raster codebase needs to be changed to agree with new names (mostly for those utilizing named arguments in PostgreSQL 9.0+). In enhnced section --put a note that hasnodata was renamed to exclude_nodata_value.