Javier Goizueta
6d30903531
Merge branch 'mapconfig-aggregation' of github.com:CartoDB/Windshaft-cartodb into mapconfig-aggregation
...
# Conflicts:
# lib/cartodb/models/mapconfig/adapter/aggregation-mapconfig-adapter.js
2017-12-13 12:53:20 +01:00
Javier Goizueta
4a63fed943
Simplify Aggregation classes
...
We're using the same aggregation queries for the Raster and Vector cases, so we don't need the class hierarchies used to handled them differently.
AggregationProxy has been renamed to Aggregation
2017-12-13 12:35:17 +01:00
Daniel García Aubert
6fe73862f3
Create a MapConfig's subclass to delegate aggregation
2017-12-13 11:42:51 +01:00
Daniel García Aubert
239aa12622
Merge branch 'mapconfig-aggregation' of github.com:CartoDB/Windshaft-cartodb into mapconfig-aggregation
2017-12-12 20:28:50 +01:00
Daniel García Aubert
aa43eb8953
Remove aggregation validation and use MapConfig validation
2017-12-12 20:10:42 +01:00
Daniel García Aubert
6d46a21005
Validate aggregation query param
2017-12-12 19:23:21 +01:00
Raul Ochoa
fb7f79594d
Merge remote-tracking branch 'origin/master' into mapconfig-aggregation
2017-12-12 17:15:22 +00:00
Daniel García Aubert
f390a10830
Remove methods that check map-config aggregation and use the ones that MapConfig model provides
2017-12-12 17:58:42 +01:00
Javier Goizueta
4193f96c03
Fix point-grid aggregation query
2017-12-12 17:38:39 +01:00
Javier Goizueta
4405d61845
Remove support for arbitrary aggregation SQL expressions.
...
Only the supported aggregate functions can be used now, currently count, sum, avg, min & max.
2017-12-12 16:17:42 +01:00
Javier Goizueta
eb2825eea8
Merge branch 'mapconfig-aggregation' of github.com:CartoDB/Windshaft-cartodb into mapconfig-aggregation
...
# Conflicts:
# lib/cartodb/models/aggregation/aggregation-templates.js
2017-12-12 16:08:58 +01:00
Daniel García Aubert
ae35acd21d
typo
2017-12-12 15:54:36 +01:00
Daniel García Aubert
d4d32bdfa3
Make jshint more happy
2017-12-12 15:53:35 +01:00
Javier Goizueta
3b7db0b08f
Fix typo
2017-12-12 15:48:25 +01:00
Daniel García Aubert
e26cfb2efb
Remove magic number
2017-12-12 13:32:01 +01:00
Mario de Frutos
8d16bf566d
Force png tile generation for static maps ( #808 )
...
* Force png tile generation for static maps
If the user tries to generate a static map requesting JPG it will fail
because is going to try to generate the tiles using JPG as format which
is not supported by now, this bug was introduced in the version 4.0.1
So we now force, again, the tiles to be generated as PNG but we pass
the requested format, JPG, to windshaft to generate the final image as
the user reqests
* Added support to define image format in the image assertions
* Added test for JPEG static image generation
Also I've added support for:
- JPEG images
- Different tolerance based on the file type, it seems that due to
different compression we need different tolerance for JPG images
2017-12-12 13:20:22 +01:00
Daniel García Aubert
0b27d174ef
Check if query retrieves results
2017-12-12 12:53:29 +01:00
Daniel García Aubert
869f2ac322
Improve error message
2017-12-12 12:39:12 +01:00
Daniel García Aubert
faaebaa07d
Remove console.log
2017-12-12 12:02:10 +01:00
Daniel García Aubert
eceffda87f
Do not use control flag
2017-12-12 12:01:25 +01:00
Daniel García Aubert
e93fe13b41
Get the right columns from aggregation
2017-12-12 11:57:38 +01:00
Daniel García Aubert
acd0610517
Merge branch 'mapconfig-aggregation' of github.com:CartoDB/Windshaft-cartodb into mapconfig-aggregation
2017-12-12 11:31:56 +01:00
Javier Goizueta
b2fcbdd8a3
Implement aggregation columns
2017-12-12 11:22:09 +01:00
Daniel García Aubert
2f68d658f0
Remove local variable
2017-12-12 11:10:12 +01:00
Daniel García Aubert
85e7245a33
Remove control flag
2017-12-12 11:07:04 +01:00
Daniel García Aubert
f52cc276be
Remove control flag
2017-12-12 10:57:50 +01:00
Daniel García Aubert
c637caf9c9
Replace nested conditional with guard clause
2017-12-12 10:56:23 +01:00
Daniel García Aubert
d405987a96
Replace nested conditional with guard clause
2017-12-12 10:49:05 +01:00
Daniel García Aubert
06efe410ef
Replace nested conditional with guard clause (early return)
2017-12-12 10:43:49 +01:00
Daniel García Aubert
5bf4eba215
Remove unused thenable
2017-12-11 19:35:59 +01:00
Daniel García Aubert
87c4848e19
Improve namig
2017-12-11 19:22:15 +01:00
Daniel García Aubert
3f075ca432
Remove unused argument
2017-12-11 19:18:29 +01:00
Daniel García Aubert
6725025e1a
Improve naming for a method
2017-12-11 19:17:32 +01:00
Daniel García Aubert
8d42909eab
Change argument order to be more consistent
2017-12-11 19:14:16 +01:00
Daniel García Aubert
d947700646
Get connection at the begining of adapt layers functionality
2017-12-11 19:12:10 +01:00
Daniel García Aubert
cc68b84212
Extract checkLayerAggregationMetadata method
2017-12-11 19:06:53 +01:00
Daniel García Aubert
446449bbde
Move variable declaration close to the place that it's used
2017-12-11 18:47:20 +01:00
Daniel García Aubert
b1f788fb57
Remove unuseful callback
2017-12-11 18:42:03 +01:00
Daniel García Aubert
f80e7112bc
Merge branch 'mapconfig-aggregation' of github.com:CartoDB/Windshaft-cartodb into mapconfig-aggregation
2017-12-11 18:35:54 +01:00
Daniel García Aubert
68f967e582
Extract adaptLayer method
2017-12-11 18:34:22 +01:00
Javier Goizueta
2edcbb4724
Implement aggregation queries.
...
Implmented for placements: centroid, point-gird, point-sample.
Aggregated columns not yet implemented (only count).
Aggregation could be made more efficient by using quadkeys
2017-12-11 18:33:06 +01:00
Daniel García Aubert
006dd86614
Merge branch 'master' into mapconfig-aggregation
2017-12-11 17:36:58 +01:00
Daniel García Aubert
dab204ea71
Do not aggregate if rows cout is lower than threshold or the layer's sql has geometries distinct of points
2017-12-11 17:32:06 +01:00
Raul Marin
7c5b7641d8
Date histogram: Add missing GROUP BY column
2017-12-11 11:27:13 +01:00
Raul Marin
1b405e42c2
Date histogram optimizations
2017-12-11 11:27:13 +01:00
Raul Marin
088a8b81a6
Timeseries tests: Set timestamps to the start of the aggregations
...
Also, increase the end of the range check so it includes some data
2017-12-11 11:27:13 +01:00
Raul Marin
243e982bd6
Optimize formulae queries
2017-12-11 11:27:13 +01:00
Raul Marin
dfe01c836c
Escape getQueryRowCount with $$
2017-12-11 11:27:13 +01:00
Raul Marin
fcbf5ffcc5
Move sql helper functions to query-utils.js
2017-12-11 11:27:13 +01:00
Raul Marin
90c9ad18e0
Optimize histogram queries
2017-12-11 11:27:13 +01:00