Commit d432dc28 authored by Bborie Park's avatar Bborie Park

Inclusion of missing ST_PixelWidth and ST_PixelHeight functions and regression tests.

Associated ticket is #928


git-svn-id: http://svn.osgeo.org/postgis/trunk@7779 b70326c6-7e19-0410-871a-916f4a2858ee
parent 3ac670b9
......@@ -135,6 +135,16 @@ CREATE OR REPLACE FUNCTION st_width(raster)
AS 'MODULE_PATHNAME','RASTER_getWidth'
LANGUAGE 'C' IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION st_pixelwidth(raster)
RETURNS float8
AS 'MODULE_PATHNAME', 'RASTER_getPixelWidth'
LANGUAGE 'C' IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION st_pixelheight(raster)
RETURNS float8
AS 'MODULE_PATHNAME', 'RASTER_getPixelHeight'
LANGUAGE 'C' IMMUTABLE STRICT;
CREATE OR REPLACE FUNCTION st_rotation(raster)
RETURNS float8
AS 'MODULE_PATHNAME','RASTER_getRotation'
......
......@@ -54,6 +54,7 @@ TEST_PROPS = \
create_rt_properties_test.sql \
rt_dimensions.sql \
rt_scale.sql \
rt_pixelsize.sql \
rt_upperleft.sql \
rt_rotation.sql \
rt_georeference.sql \
......
-----------------------------------------------------------------------
-- $Id$
--
-- Copyright (c) 2011 David Zwarg <dzwarg@azavea.com>
--
-- This is free software; you can redistribute and/or modify it under
-- the terms of the GNU General Public Licence. See the COPYING file.
-----------------------------------------------------------------------
-----------------------------------------------------------------------
-- st_pixelwidth
-----------------------------------------------------------------------
SELECT id, name, scalex, skewy
FROM rt_properties_test
WHERE NOT sqrt(scalex*scalex + skewy*skewy) = st_pixelwidth(rast);
-----------------------------------------------------------------------
-- st_pixelheight
-----------------------------------------------------------------------
SELECT id, name, scaley, skewx
FROM rt_properties_test
WHERE NOT sqrt(scaley*scaley + skewx*skewx) = st_pixelheight(rast);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment