add full tests

This commit is contained in:
abelvm
2016-08-16 10:44:13 -04:00
parent 630965605c
commit 51b8da5bf8
2 changed files with 0 additions and 14 deletions
@@ -1,12 +1,7 @@
SET client_min_messages TO WARNING;
\set ECHO none
<<<<<<< HEAD
nn | nni | idw
-----+--------------------------+-----------------
200 | 780.79470198683925288365 | 341.46260750526
=======
cdb_spatialinterpolation
t
>>>>>>> ebbf68af5700f33737ac18516e2bdc22ea330b24
(1 row)
@@ -1,21 +1,12 @@
SET client_min_messages TO WARNING;
\set ECHO none
<<<<<<< HEAD
=======
\pset format unaligned
>>>>>>> ebbf68af5700f33737ac18516e2bdc22ea330b24
WITH a AS (
SELECT
ARRAY[800, 700, 600, 500, 400, 300, 200, 100] AS vals,
ARRAY[ST_GeomFromText('POINT(2.1744 41.403)'),ST_GeomFromText('POINT(2.1228 41.380)'),ST_GeomFromText('POINT(2.1511 41.374)'),ST_GeomFromText('POINT(2.1528 41.413)'),ST_GeomFromText('POINT(2.165 41.391)'),ST_GeomFromText('POINT(2.1498 41.371)'),ST_GeomFromText('POINT(2.1533 41.368)'),ST_GeomFromText('POINT(2.131386 41.41399)')] AS g
)
<<<<<<< HEAD
SELECT
CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'),0) as NN,
CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'),1) as NNI,
CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'),2) as IDW
FROM a;
=======
SELECT (cdb_crankshaft.CDB_SpatialInterpolation(g, vals, ST_GeomFromText('POINT(2.154 41.37)'), 1) - 780.79470198683925288365) / 780.79470198683925288365 < 0.001 As cdb_spatialinterpolation FROM a;
>>>>>>> ebbf68af5700f33737ac18516e2bdc22ea330b24