docker run --rm -v /srv/carto:/home osgeo/gdal gdalwarp -overwrite  -tr 250 250 -r sum  /home/08_TEST/robin/population/SZ.asc /home/08_TEST/robin/population/SZ_250.asc

# first version. Teh fi
gdalwarp -s_srs EPSG:27700 -t_srs EPSG:4326 SZ_250.asc  -r average SZ_250_WGS84.tif
# multiply for 1000, so in the polygonize process it won't be mixed
gdal_calc.py -A SZ_250_WGS84.tif  --outfile=SZ_250_WGS84_1000.tif --calc="A*1000"
# polygonize
gdal_polygonize.py -b 1 SZ_250_WGS84_1000.tif -f "ESRI Shapefile" SZ_250_WGS84_1000.shp
# In qgis we mak an extra step to divide the data by 1000 (with QGIS calculator explained in https://docs.qgis.org/3.4/en/docs/user_manual/working_with_vector/attribute_table.html#using-the-field-calculator )

# second version multiplying for 100000
# No reprojection, just change the format so that we can operate with gdal_calc
gdalwarp -s_srs EPSG:27700 -t_srs EPSG:27700 SZ_250.asc  -r average SZ_250_27700.tif
# multiply for 1000, so in the polygonize process it won't be mixed
gdal_calc.py -A SZ_250_27700.tif  --outfile=SZ_250_27700_100000.tif --calc="A*100000"
# polygonize
gdal_polygonize.py -b 1 SZ_250_27700_100000.tif -f "ESRI Shapefile" SZ_250_27700_100000.shp
# In qgis we do an extra step to divide the data by 100000 (with QGIS calculator explained in https://docs.qgis.org/3.4/en/docs/user_manual/working_with_vector/attribute_table.html#using-the-field-calculator )
