From 41dd23b429aabeca90c51019297c104050c1eb99 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 26 Mar 2013 12:46:05 +0100 Subject: [PATCH] Do not run the query twice when exporting to KML --- NEWS.md | 1 + app/controllers/app.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index bdc7a1f5..0a2d469f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ ----- * Fix parsing of numeric arrays (#88) * node-pool upgraded to 2.0.3 +* Reduce memory use on KML export 1.3.6 (DD/MM/YY) ----- diff --git a/app/controllers/app.js b/app/controllers/app.js index e73521c5..1470e522 100755 --- a/app/controllers/app.js +++ b/app/controllers/app.js @@ -215,7 +215,9 @@ function handleQuery(req, res) { // see https://github.com/Vizzuality/CartoDB-SQL-API/issues/80 sql += ' where ' + gn + ' is not null'; } - } else if (format === 'shp') { + } else if (format === 'shp' || format === 'kml' ) { + // These format are implemented via OGR2OGR, so we don't + // need to run a query ourselves return null; } else if (format === 'svg') { var svg_ratio = svg_width/svg_height;