I'm trying to ST_Clip() raster in `SRID:32617' with a polygon.
What I did
- ST_Transform(polygon, 32617): It fails, couldn't project point() exceeded limit (-14)
- ST_Transform(rast, 4326, 'NearestNeighbor'): It runs really slow (more than 700,000,000 ms, then I terminated before it finished) about 1300 rasters (tiles)
My polygon got lon/lat from Google map:
ST_GeomFromText('POLYGON((105.78873 21.38659, 106.49185 21.38659, 105.78873 20.71758,
106.49185 20.71758, 105.78873 21.38659))', 4326)
I'm using postGIS 2.1
UPDATE:
My raster is retrieved from Landsat8. I downloaded the raster from earthexplorer.usgs.gov
The raster is imported into postGIS by raster2pgsql
with tile-size 500x500, SRID is kept as original (32617,32617, 32632, 32648, 32649, 32658, 32659, 32660)
)
UPDATE:
Here's Map projection in metadata text of one scene.
GROUP = PROJECTION_PARAMETERS
MAP_PROJECTION = "UTM"
DATUM = "WGS84"
ELLIPSOID = "WGS84"
UTM_ZONE = 49
GRID_CELL_SIZE_PANCHROMATIC = 15.00
GRID_CELL_SIZE_REFLECTIVE = 30.00
GRID_CELL_SIZE_THERMAL = 30.00
ORIENTATION = "NORTH_UP"
RESAMPLING_OPTION = "CUBIC_CONVOLUTION"
END_GROUP = PROJECTION_PARAMETERS
UPDATE
The polygon above is invalid. Here's correction:
ST_GeomFromText('POLYGON((105.78873 21.38659, 106.49185 21.38659, 106.49185 20.71758, 105.78873 20.71758, 105.78873 21.38659))', 4326)
SRID:32617