You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to render the meteo data there in a torque layer (time field: t) using temp as color param and visibility as radius param. In order to achieve that, I have generated an aggregated field in my table called torque :
update metar_db set torque =255*(round(temp/4)+ round(visibility/500)/100- min )/ (max-min)
Being min= -1, max = 8 from round(temp/4)+ round(visibility/500)/100
Then I try to extract both cat_temp = temp/4 and cat_visibility=visibility/500 and render color and radius using this CartoCSS:
/** torque_cat visualization */Map {
-torque-frame-count:256;
-torque-animation-duration:30;
-torque-time-attribute:"t";
-torque-aggregation-function:"max(torque)";
-torque-resolution:1;
-torque-data-aggregation:linear;
}
#metar_db{
comp-op: source-over;
marker-fill-opacity:0.9;
marker-line-color:#FFF;
marker-line-width:0;
marker-line-opacity:1;
marker-type: ellipse;
marker-width:6;
marker-fill:#0F3B82;
}
#metar_db[frame-offset=1] {
marker-width:8;
marker-fill-opacity:0.45;
}
#metar_db[frame-offset=2] {
marker-width:10;
marker-fill-opacity:0.225;
}
#metar_db [ value <=255] {
marker-fill:#B10026;
marker-width: value -226.6666666667;
}
#metar_db [ value <=226.6666666667] {
marker-fill:#E31A1C;
marker-width: value -198.3333333333;
}
#metar_db [ value <=198.3333333333] {
marker-fill:#FC4E2A;
marker-width:value -170;
}
#metar_db [ value <=170] {
marker-fill:#FD8D3C;
marker-width: value -141.6666666667;
}
#metar_db [ value <=141.6666666667] {
marker-fill:#FEB24C;
marker-width: value -113.3333333333;
}
#metar_db [ value <=113.3333333333] {
marker-fill:#FED976;
marker-width: value -85;
}
#metar_db [ value <=85] {
marker-fill:#FFFFB2;
marker-width: value -56.6666666667;
}
#metar_db [ value <=56.6666666667] {
marker-fill:#FFFFB2;
marker-width: value -28.3333333333;
}
#metar_db [ value <=28.3333333333] {
marker-fill:#FFFFB2;
marker-width: value;
}
#metar_db [ value <=0] {
marker-fill:#FFFFB2;
marker-width:10;
}
But I get an error message like: Invalid value for marker-width, the type float is expected. value (of type keyword) was given.
The text was updated successfully, but these errors were encountered:
In a Torque layer you only have
value
parameter, but it's only accesible in order to be compared in CartoCSS selectors, but you can't use its valueTest case:
torque
:Being min= -1, max = 8 from
round(temp/4)+ round(visibility/500)/100
Then I try to extract both
cat_temp = temp/4
andcat_visibility=visibility/500
and render color and radius using this CartoCSS:But I get an error message like:
Invalid value for marker-width, the type float is expected. value (of type keyword) was given.
The text was updated successfully, but these errors were encountered: