@Sorin helped me putting raster into PostGIS at Changing table name of command using raster2pgsql?
Now, I want to output raster tile, then view it on QGIS. But the problem is the output of ST_RasterToWorldCoord(raster rast, integer x, integer y) makes me confused. I have 2 questions here:
- According to the docs, the function returns (long,lat) of the upper left corner of raster. So what is the use of the last 2 params (x,y)?
- I run the sql, and got the result of a raster (long,lat) = (563985, 2346615). I don't understand the result here. I think the long, lat values should be with in (-90 -> 90, -180 -> 180).
I output the raster to file, and view it on a map. But the coordinate of the raster seems to be wrong, so it cannot be displayed.
Here my query:
SELECT st_rastertoworldcoord(rast,1,1)
FROM landsat
I have a raster before putting in postGIS. I can display it in QGIS, and it interscts/overlap some polygons, which come from a SHP file.
However, after cutting it into tiles and putting it into postGIS then run ST_Intersects(rast, geom). The function return 'false' in all rows.
My raster was imported with SRID 4326
(long,lat) = (-180 -> 180, -90 -> 90).