From 3faa5d99805c2d0a9dbb23a17a0eec0e1f7a9752 Mon Sep 17 00:00:00 2001 From: Pierre Racine Date: Wed, 29 Feb 2012 03:01:03 +0000 Subject: [PATCH] git-svn-id: http://svn.osgeo.org/postgis/trunk@9339 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference_raster.xml | 10 ++++++---- raster/rt_pg/rtpostgis.sql.in.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index 9580ab76b..2216bc3fe 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -1368,10 +1368,12 @@ WHERE rid=35; Description Returns an empty raster (having no band) of given dimensions (width & height) and georeferenced in spatial (or world) coordinates with upper left X (upperleftx), upper left Y (upperlefty), - pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). - The last version use a single parameter to specify the pixel size (pixelsize). - In this case scalex and scaley are set to this parameter and skewx and skewy are set to 0. - If an existing raster is passed in, it returns a new raster with the same meta data settings (without the bands). + pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid). + + The last version use a single parameter to specify the pixel size (pixelsize). scalex is set to this argument and scaley is set to the negative value of this argument. skewx and skewy are set to 0. + + If an existing raster is passed in, it returns a new raster with the same meta data settings (without the bands). + If no srid is specified it defaults to 0. After you create an empty raster you probably want to add bands to it and maybe edit it. Refer to to define bands and to set initial pixel values. diff --git a/raster/rt_pg/rtpostgis.sql.in.c b/raster/rt_pg/rtpostgis.sql.in.c index b1adfd59f..6721e29dc 100644 --- a/raster/rt_pg/rtpostgis.sql.in.c +++ b/raster/rt_pg/rtpostgis.sql.in.c @@ -196,7 +196,7 @@ CREATE OR REPLACE FUNCTION st_makeemptyraster(width int, height int, upperleftx CREATE OR REPLACE FUNCTION st_makeemptyraster(width int, height int, upperleftx float8, upperlefty float8, pixelsize float8) RETURNS raster - AS $$ SELECT st_makeemptyraster($1, $2, $3, $4, $5, $5, 0, 0, ST_SRID('POINT(0 0)'::geometry)) $$ + AS $$ SELECT st_makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, ST_SRID('POINT(0 0)'::geometry)) $$ LANGUAGE 'SQL' IMMUTABLE STRICT; CREATE OR REPLACE FUNCTION st_makeemptyraster(rast raster) -- 2.40.0