Version 21 (modified by 12 years ago) ( diff ) | ,
---|
Test 0:
CREATE TABLE test_source_raster_0 AS SELECT 1 AS rid,rast FROM (SELECT ST_MakeEmptyRaster(10,10,0,0,1,1,0,0,4326) AS rast)foo; CREATE TABLE test_source_geometry_0 AS SELECT generate_series(1,10) AS id,ST_RandomPoints(the_geom,10) AS the_geom FROM (SELECT ST_SetSRID(ST_Extent(rast::geometry),4326) AS the_geom FROM test_source_raster_0)foo; CREATE TABLE test_ref_raster_0 AS SELECT 1 AS rid,rast FROM (SELECT ST_MakeEmptyRaster(10,10,0,0,1,1,0,0,4326) AS rast)foo;
0-a: Test NULL Raster. Should be true.
SELECT ST_EuclideanDistance(NULL,NULL,'public','test_source_geometry_0','the_geom',False) IS NULL FROM test_ref_raster_0;
0-b: Test Empty Raster. Should be true.
SELECT ST_IsEmpty(ST_EuclideanDistance(0,10,0,0,1,1,0,0,4326,-999,'32BF','public','test_source_geometry_0','the_geom',False));
Test 1: Small number of sources vs low resolution raster: (Source: 10 points, Raster: 10x10)
1-a: Source geometry within the extent of the desired raster:
CREATE TABLE test_source_raster_1 AS SELECT 1 AS rid,rast FROM (SELECT ST_MakeEmptyRaster(10,10,0,0,1,1,0,0,4326) AS rast)foo; CREATE TABLE test_source_geometry_1 AS SELECT generate_series(1,10) AS id,ST_RandomPoints(the_geom,10) AS the_geom FROM (SELECT ST_SetSRID(ST_Extent(rast::geometry),4326) AS the_geom FROM test_source_raster_1)foo; CREATE TABLE test_ref_raster_1 AS SELECT 1 AS rid,rast FROM (SELECT ST_MakeEmptyRaster(10,10,0,0,1,1,0,0,4326) AS rast)foo;1-a-i: Generate Euclidean Distance from a one-band reference raster
1-a-i-1: Snap is True; Max distance NOT specified:
CREATE TABLE test_eudist_1_a_i_1 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1','the_geom',True) AS rast FROM test_ref_raster_1);1-a-i-2: Snap is True; Max distance is specified:
CREATE TABLE test_eudist_1_a_i_2 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1','the_geom',True,4) AS rast FROM test_ref_raster_1);1-a-i-3: Snap is False; Max distance NOT specified:
CREATE TABLE test_eudist_1_a_i_3 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1','the_geom',False) AS rast FROM test_ref_raster_1);1-a-i-4: Snap is False; Max distance is specified:
CREATE TABLE test_eudist_1_a_i_4 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1','the_geom',False,4) AS rast FROM test_ref_raster_1);1-a-ii: Generate Euclidean Distance from a set of raster specifications:
1-a-ii-1: Snap is True; Max distance NOT specified:
CREATE TABLE test_eudist_1_a_ii_1 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1','the_geom',True) AS rast);result: same as test_eudist_1_a_i_1.gif
1-a-ii-2: Snap is True; Max distance is specified:
CREATE TABLE test_eudist_1_a_ii_2 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1','the_geom',True,4) AS rast);result: same as test_eudist_1_a_i_2.gif
1-a-ii-3: Snap is False; Max distance NOT specified:
#! CREATE TABLE test_eudist_1_a_ii_3 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1','the_geom',False) AS rast);result: same as test_eudist_1_a_i_3.gif
1-a-ii-4: Snap is False; Max distance is specified:
CREATE TABLE test_eudist_1_a_ii_4 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1','the_geom',False,4) AS rast);result: same as test_eudist_1_a_i_4.gif
1-b: Source geometry completely outside of the extent of the desired raster:
CREATE TABLE test_source_raster_1_b AS SELECT 1 AS rid,rast FROM (SELECT ST_MakeEmptyRaster(10,10,-10,-12,1,1,0,0,4326) AS rast)foo; CREATE TABLE test_source_geometry_1_b AS SELECT generate_series(1,10) AS id,ST_RandomPoints(the_geom,10) AS the_geom FROM (SELECT ST_SetSRID(ST_Extent(rast::geometry),4326) AS the_geom FROM test_source_raster_1_b)foo;1-b-i: Generate Euclidean Distance from a one-band reference raster:
1-b-i-1: Snap is True; Max distance NOT specified:
#! sql CREATE TABLE test_eudist_1_b_i_1 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_b','the_geom',True) AS rast FROM test_ref_raster_1);1-b-i-2: Snap is True; Max distance is specified:
#! sql CREATE TABLE test_eudist_1_b_i_2 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_b','the_geom',True,15) AS rast FROM test_ref_raster_1);1-b-i-3: Snap is False; Max distance NOT specified:
#! sql CREATE TABLE test_eudist_1_b_i_3 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_b','the_geom',False) AS rast FROM test_ref_raster_1);1-b-i-4: Snap is False; Max distance is specified:
#! sql CREATE TABLE test_eudist_1_b_i_4 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_b','the_geom',False,15) AS rast FROM test_ref_raster_1);1-b-ii: Generate Euclidean Distance from a set of raster specifications:
1-b-ii-1: Snap is True; Max distance NOT specified:
#! sql CREATE TABLE test_eudist_1_b_ii_1 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1_b','the_geom',True) AS rast FROM test_ref_raster_1);result: same as test_eudist_1_b_i_1.gif[BR]]
1-b-ii-2: Snap is True; Max distance is specified:
#! sql CREATE TABLE test_eudist_1_b_ii_2 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1_b','the_geom',True,15) AS rast FROM test_ref_raster_1);result: same as test_eudist_1_b_i_2.gif[BR]]
1-b-ii-3: Snap is False; Max distance NOT specified:
#! sql CREATE TABLE test_eudist_1_b_ii_3 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1_b','the_geom',False) AS rast FROM test_ref_raster_1);result: same as test_eudist_1_b_i_3.gif[BR]]
1-b-ii-4: Snap is False; Max distance is specified:
#! sql CREATE TABLE test_eudist_1_b_ii_4 AS (SELECT 1 AS rid,ST_EuclideanDistance(10,10,0,0,1,1,0,0,4326,NULL,'32BF','public','test_source_geometry_1_b','the_geom',False,15) AS rast FROM test_ref_raster_1);result: same as test_eudist_1_b_i_4.gif[BR]]
1-c: Source geometry partially outside of the extent of the desired raster:
CREATE TABLE test_source_raster_1_c AS SELECT 1 AS rid,rast FROM (SELECT ST_MakeEmptyRaster(10,10,-5,-2,1,1,0,0,4326) AS rast)foo; CREATE TABLE test_source_geometry_1_c AS SELECT generate_series(1,10) AS id,ST_RandomPoints(the_geom,10) AS the_geom FROM (SELECT ST_SetSRID(ST_Extent(rast::geometry),4326) AS the_geom FROM test_source_raster_1_c)foo;1-c-i: Generate Euclidean Distance from a one-band reference raster:
#! sql CREATE TABLE test_eudist_1_c_i_1 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_c','the_geom',True) AS rast FROM test_ref_raster_1);1-c-i-2: Snap is True; Max distance is specified:
#! sql CREATE TABLE test_eudist_1_c_i_2 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_c','the_geom',True,6) AS rast FROM test_ref_raster_1);1-c-i-3: Snap is False; Max distance NOT specified:
#! sql CREATE TABLE test_eudist_1_c_i_3 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_c','the_geom',False) AS rast FROM test_ref_raster_1);1-c-i-4: Snap is False; Max distance is specified:
#! sql CREATE TABLE test_eudist_1_c_i_4 AS (SELECT 1 AS rid,ST_EuclideanDistance(rast,'32BF','public','test_source_geometry_1_c','the_geom',False,6) AS rast FROM test_ref_raster_1);
-- Test 2: Small number of sources vs high resolution raster:(Source: 10 points, Raster: 300x300)
-- Test 3: Large number of sources vs low resolution raster:(Source: 1000 points, Raster: 300x300)
-- Test 4: Large number of sources vs high resolution raster:(Source: 1000 points, Raster: 1000x1000)
-- Test 5: Scalability test:
-- Test 6: Performance test:
Attachments (28)
- test_eudist_1_a_i_1.gif (17.9 KB ) - added by 12 years ago.
- test_eudist_1_a_i_2.gif (17.6 KB ) - added by 12 years ago.
- test_eudist_1_a_i_3.gif (23.6 KB ) - added by 12 years ago.
- test_eudist_1_a_i_4.gif (24.4 KB ) - added by 12 years ago.
- test_eudist_1_b_i_1.gif (25.9 KB ) - added by 12 years ago.
- test_eudist_1_b_i_2.gif (25.8 KB ) - added by 12 years ago.
- test_eudist_1_b_i_3.gif (26.6 KB ) - added by 12 years ago.
- test_eudist_1_b_i_4.gif (26.3 KB ) - added by 12 years ago.
- test_eudist_1_c_i_1.gif (20.9 KB ) - added by 12 years ago.
- test_eudist_1_c_i_2.gif (18.3 KB ) - added by 12 years ago.
- test_eudist_1_c_i_3.gif (25.0 KB ) - added by 12 years ago.
- test_eudist_1_c_i_4.gif (23.4 KB ) - added by 12 years ago.
- test_eudist_2_a.gif (32.5 KB ) - added by 12 years ago.
- test_eudist_2_a_2.gif (35.4 KB ) - added by 12 years ago.
- test_eudist_2_a_3.gif (32.6 KB ) - added by 12 years ago.
- test_eudist_2_a_4.gif (35.6 KB ) - added by 12 years ago.
- test_eudist_3_a_1.gif (231.1 KB ) - added by 12 years ago.
- test_eudist_3_a_1_zoomin.gif (97.8 KB ) - added by 12 years ago.
- test_eudist_3_a_3.gif (232.0 KB ) - added by 12 years ago.
- test_eudist_3_a_3_zoomin.gif (110.4 KB ) - added by 12 years ago.
- test_eudist_4_a.gif (96.6 KB ) - added by 12 years ago.
- test_eudist_4_b.gif (155.7 KB ) - added by 12 years ago.
- test_eudist_4_d.gif (178.8 KB ) - added by 12 years ago.
- test_eudist_4_c.gif (228.7 KB ) - added by 12 years ago.
- test_eudist_4_e.gif (191.2 KB ) - added by 12 years ago.
- test_eudist_4_f.gif (190.1 KB ) - added by 12 years ago.
- test_eudist_4_g.gif (171.1 KB ) - added by 12 years ago.
- test_eudist_4_h.gif (122.8 KB ) - added by 12 years ago.