From 174b93bc9e8dd82c8ab8981c463a65076a35fa25 Mon Sep 17 00:00:00 2001 From: Travis Webb Date: Sun, 27 Sep 2015 15:37:39 -0400 Subject: [PATCH] update geom api --- lib/util.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/util.js b/lib/util.js index 4b9dbb2..e6ec549 100644 --- a/lib/util.js +++ b/lib/util.js @@ -234,7 +234,12 @@ const Util = { * jsonb can be used by passing true as the second argument. */ case 'json': - return table.json(name) + if (attrDefinition.geometry) { + return table.specificType(name, SpatialUtil.getSpatialType(attrDefinition)) + } + else { + return table.json(name) + } case 'jsonb': return table.json(name, true) @@ -266,12 +271,6 @@ const Util = { case 'sqlType': return table.specificType(name, type) - case 'geometry': - case 'geography': - case 'box2d': - case 'box3d': - return table.specificType(name, SpatialUtil.getSpatialType(attrDefinition)) - default: console.error('Unregistered type given for attribute. name=', name, '; type=', type) return table.text(name)