Bborie Park
885d19a614
Initialize variables that may cause compile-time warnings in rt_api.c. Added additional NLS items to raster2pgsql.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9436 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-09 19:00:25 +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
fa08dbe28d
Slightly more verbose error message for when rt_raster_gdal_rasterize() is unable to have an OSR object project a provided srs text.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9413 b70326c6-7e19-0410-871a-916f4a2858ee
2012-03-07 04:28:02 +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
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
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
3f456ff50a
Fixed conversion of pixel types between PostGIS raster and GDAL. Essentially PostGIS raster 8BSI is now a GDT_Int16.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9293 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-24 22:54:10 +00:00
Bborie Park
d1a99c694b
Additional fixups to not increase extent if an alignment is to take place in rt_raster_gdal_rasterize().
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9289 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-24 19:24:02 +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
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
Bborie Park
ce290556e6
Fixed handling of negative X-scale or positive Y-scale in rt_raster_gdal_rasterize(). Ticket is #1574 .
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9187 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-14 17:29:45 +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
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
Bborie Park
fdf046a572
Minor debug message tweak
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9099 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-08 16:44:00 +00:00
Bborie Park
96720d5525
Make sure new bands when added using ST_AddBand are correctly clamping NODATA values. Ticket is #1546 .
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9055 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-06 23:14:21 +00:00
Bborie Park
80429f9c0b
Message cleanup by removing unnecessary newlines.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@9013 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-02 19:25:37 +00:00
Sandro Santilli
5018f99cb5
Implement ST_PixelAsPolygon in C, provide a core API entry for it
...
The API entry point is expected to be useful for #1519
git-svn-id: http://svn.osgeo.org/postgis/trunk@8993 b70326c6-7e19-0410-871a-916f4a2858ee
2012-02-01 09:20:44 +00:00
Bborie Park
2efa285db7
Fixed segfault caused by an empty quantile linked list being used to get the quantile's value. Ticket is #1506 .
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8949 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-27 21:05: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
c4305740bc
Fixed incorrect use of rt_band_destroy when loading offline band data. ALso added rules to raster_columns and raster_overviews to gracefully handle insert/update/delete.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8751 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-10 18:45:19 +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
ff4cdc048c
Have rt_raster_from_gdal_dataset attempt to determine the SRID of the raster using OSR.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8695 b70326c6-7e19-0410-871a-916f4a2858ee
2012-01-07 15:24:08 +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
6e559453f1
Force initialization of output GDAL raster from rt_raster_gdal_warp to band's NODATA value. Also, spelling correction.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8602 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-28 15:45:19 +00:00
Bborie Park
63e7bbcd67
Instead of using spatial reference text in WKT format, use PROJ.4 format when possible. This does mean that in situations that require WKT format, rt_raster_gdal_sr must be called to convert from one format to the other.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8537 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-24 01:14:16 +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
Bborie Park
aaf3ac45ef
Fixed handling of output ranges going from high to low rather than the default of values going from low to high. Based upon message on postgis-users: http://postgis.refractions.net/pipermail/postgis-users/2011-December/031763.html
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8393 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-13 21:19:54 +00:00
Bborie Park
d68c6424ea
Code refactoring in rtpg_ utility functions for better memory usage and syntax cleanup in rt_api.*
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8341 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-10 01:01:37 +00:00
Bborie Park
ed7fff55e8
Return use of GDAL "natural" blocking removed in r8313 and refactor pointer handling.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8325 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-08 20:05:49 +00:00
Bborie Park
dc6178d3af
Added rt_raster_set_pixel_line for use when setting values for sequential pixels. Should be faster than repeated calls to rt_raster_set_pixel.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8314 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-07 20:46:47 +00:00
Bborie Park
13ac027977
Refactored the GDALRasterIO part of rt_raster_from_gdal_dataset to use scanlines instead of "natural" blocks, which dramatically simplifies the code and makes it easier to maintain.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8313 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-07 15:29:46 +00:00
Bborie Park
4644f0d561
Fixed regression issue with rt_raster_from_gdal_dataset by explicitly setting the valid block sizes passed into GDALRasterIO. Probably related to the changes made in r8309
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8310 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-07 01:15:46 +00:00
Bborie Park
0e17e93920
Removed attempt to duplicate entire band in rt_raster_from_gdal_dataset
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8309 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-06 16:48:12 +00:00
Bborie Park
47faf3b72f
Removed division by bin-width for when bin-widths are specified in ST_Histogram
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8304 b70326c6-7e19-0410-871a-916f4a2858ee
2011-12-05 18:36:56 +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
Bborie Park
e7ba644265
Fixed extent bug for UNION in rt_raster_from_two_rasters
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8215 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-21 19:18:37 +00:00
Bborie Park
ab61f4c1b9
Addition of function rt_util_gdal_datatype_to_pixtype to complement rt_util_pixtype_to_gdal_datatype.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8188 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 23:47:35 +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
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
9ba7a6f7e4
Fixed debug problem in #1308
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8179 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-18 14:53:36 +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
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
c01f9c6f32
Fix floating point issues in rt_raster_geopoint_to_cell in addition to other minor changes.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8120 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-08 23:18:37 +00:00
Bborie Park
4f6f5e2b41
Bug fix for evaluating remainder when remainder is infinitely close to 1. Basically, the check wasn't added to a block of code those similar blocks of code had the check.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8119 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-08 21:34:12 +00:00
Bborie Park
c450d6d83a
Fixed the bug described in #1263 . Also fixed additional code that has the same problem. Additional syntax cleaning and comments updated. Fixed the problem with "make check" running test/core twice.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@8102 b70326c6-7e19-0410-871a-916f4a2858ee
2011-11-06 04:56:30 +00:00