Open apercas opened 7 years ago
raster name (varchar) | color type (varchar) |
---|---|
my_awesome_raster_field5_raster | NDVI |
second_raster_temperature | Temperature |
Current plan for once a user drags a raster dataset:
tiff_loader.rb
and raster2pgsql.rb
raster_layer.js
class from our fork of cartodb.js query over the SQL API and look for the type.Ideas @jjmata @ivanprado?
Some thoughts:
# Archivo de exportación de mapa de colores generado por QGIS
INTERPOLATION:INTERPOLATED
-0.012712,26,150,65,255,mu verde
0.066397,166,217,106,255,menos verde
0.145507,255,255,192,255,amarillea
0.224616,253,174,97,255,esta reguleras
0.303725,215,25,28,255,esta fatal
Just as a reference, QGIS file for styling example (please note that we also have the opacity
value in case we don't want to display them with the same transparency):
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="2.18.2" minimumScale="inf" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0">
<pipe>
<rasterrenderer opacity="1" alphaBand="0" classificationMax="50.4219" classificationMinMaxOrigin="CumulativeCutSubExtentEstimated" band="1" classificationMin="29.2193" type="singlebandpseudocolor">
<rasterTransparency/>
<rastershader>
<colorrampshader colorRampType="INTERPOLATED" clip="0">
<item alpha="255" value="29.2" label="29.2" color="#d7191c"/>
<item alpha="255" value="34.5" label="34.5" color="#fdae61"/>
<item alpha="255" value="39.8" label="39.8" color="#ffffbf"/>
<item alpha="255" value="45.1" label="45.1" color="#abd9e9"/>
<item alpha="255" value="50.4" label="50.4" color="#2c7bb6"/>
</colorrampshader>
</rastershader>
</rasterrenderer>
<brightnesscontrast brightness="0" contrast="0"/>
<huesaturation colorizeGreen="128" colorizeOn="0" colorizeRed="255" colorizeBlue="128" grayscaleMode="0" saturation="0" colorizeStrength="100"/>
<rasterresampler maxOversampling="2"/>
</pipe>
<blendMode>0</blendMode>
</qgis>
Add a legend with the color steps in it when a raster layer is displayed. Coordinate with @agrosmartrural for data validation.