#!/usr/bin/env python3
import sys, os, psycopg2
MINTCAST_PATH = os.environ.get('MINTCAST_PATH')
hostname = ''
username = ''
password = ''
database = ''
- Fix json problem √
- Add shapefile √
- Timeseries Json file
- with hotspot geojson object
- with a series data loading
- time slide desc data
- Consistence √
- filename √
- only use Json file instead of
metadata.json
√ - timeseries source-layer √
- layer name and source name, make them consistent √
- Timeseries Play √
- frame request √
- play/pause button √
- slide bar redesign
- Postgres
- No show all √
- Add one flag if it changed
0
not changed1
changing2
changed
- New structure √
- no metadata.json √
- only seperate files √
- md5 file √
- Search without metadata.json √
- Search using redis √
- Search via AJAX √
- redis: name: md5 √
- Increment
- Postgresql with timeseries flag => md5
- Generate into the same json file with the same timeseries flag
- each file is one seperated record
- the reason still using Json file not DB √
- faster to send the response √
- more secure √
- without connect and join tables √
- Json file structure √
- move
metadata.json
to seperated json files √
- move
- Hotspot data generating
- Geojson object
- store data into Postgresql for each file
- when generate json file merge them into one geojson object
- Map
- a new variable to fly to a new area
- remove metadata.json √
- remove
show all dataset
√ - move search to redis √
Server | Full planet | Diff updates | Non-OSM data | GeoJSON | TopoJSON | Mapbox Vector Tiles |
---|---|---|---|---|---|---|
node-mapnik | Yes | Yes | Yes | Some | No | Yes |
Tilezen tileserver | Yes | Yes | Yes | Yes | Yes | Yes |
Tegola | Yes | Yes | Yes | No | No | Yes |
t-rex | Yes | Yes | Yes | No | No | Yes |
TileStache | Yes | Yes | Yes | Yes | No | Yes |
Tilemaker | No | No | Yes | No | No | Yes |
VectorTileCreator | Unknown | No | No | No | No | No |
"layerNames": [
"Evap"
],
"layerIds": [
"evap_vector_pbf"
],
"sourceLayers": [
"evap"
],
"hasData": [
true
],
"hasTimeline": [
true
],
"vectorMD5":[
null
],
"rasterMD5":[
null
],
"layers": [
{
"id": "evap_vector_pbf",
"source-layer": "evap",
"minzoom": 14,
"maxzoom": 3,
"type": "vector",
"dataset": "Elevation",
"axis":"slider",
"stepOption":{"name":"Time","type":"string|unix", "format":"yyyyMMdd", },
"step":[],
"vectormd5":["59feb8015325307ba6e75078519c424a","xxx"],
"rasterMD5":["x","xxx"]
},
"data": {
"59feb8015325307ba6e75078519c424a": {
"mbtiles": "./dist/{dataset}/{year}/{month}/whatever-it-is{day}.nc/evap_vector_pbf.mbtiles"
}
When install Gdal, flags have to be added to ./configure --with-armadillo --with-complete --with-libkml --with-unsupported
brew install jasper netcdf
brew reinstall gdal --with-armadillo --with-complete --with-libkml --with-unsupported
-
The project name
mintcast
-
All lib scripts should be
function
, will be included usingsource lib/xxx.sh
, and call the functionxxx(x1, x2)
-
All names should be in lowercase
-
All file should have
shebang line
, like#!/usr/bin/env bash
or#!/usr/bin/env python3
- All python scripts will be added executable mod when user run
./install.sh
- Thus, there is no difference between python3 or python2.7 scripts when run it.
- All python scripts will be added executable mod when user run
-
Names of
lib
scripts should start withcheck_
,proc_
andhandle_
check_
likelib/check_type.sh
, the function inside this file should becheck_type()
proc_
likelib/proc_polygonize.sh
, the function should beproc_polygonize()
handle_
likelib/handle_netcdf.sh
, the function should behandle_netcdf.sh
,- !!!(deperacted) the return value should be
YES\NO
to indicate whether the process is a success. Other return data should be transfered by referenced parameters - All functions will be called in
bin/mintcast.sh
- Important info should show in different color https://misc.flogisoft.com/bash/tip_colors_and_formatting
-
Names of
python
scripts should bemacro_
orhandle_
likepython/handle_grid_csv/__main__.py
orpython/macro_extract_lnglat/__main__.py
- Python script should get paramter from
promot
- Python script should output every thing in
stdout
- Python script should show process message in
stderr
in a different colors as bash
- Python script should get paramter from
mysql -umint -pyOuaReAgeNius -h 13.57.22.75 mintmap
- lib/
- shell function
- python/
- python script to handle
-
-qml
-
-type
-
nc
-
tiff
-
tiled
-
-
-dir
-
Use for time series
-
Use for tiled
- -dir aaa/*.zip
-
-
-start-time
-
-end-time
-
-layer-name
-
Store to MySQL
-
Use as condition to run procedure
-
Tiff
-
Tiff with QML
-
Detect whether dataset is Byte format/if not convert
-
Clip use shapefile
-
Detect/To EPSG 3857
-
Python to handle QML
-
Generate color.txt
-
Write to database
-
-
Generate Raster Tile
-
-tr 10 10 (Resolution to keep the cell)
-
Render color.txt on tiff
- Question: How to render linear gradient to tif ?(0% #000. 100% #fff)?
-
Translate tif to mbtiles
-
gdaladdo mbtiles generate different levels
-
Read mbtiles’ metadata table, store data to database
-
-
Generate Vector Tile
-
Polygonize to geojson
-
Get the layer name from parameter
-
Layer name from parameter
-
If there are multiple file(like netcdf), use the name of subdataset
-
Property name would be always
value
-
-
Tippecanoe geojson to mbtiles
-
Read mbtiles’ metadata table, store data to database
-
Generate dataset.json file for vector tile
-
-
Update website’s config.json
-
Copy all mbtiles files to a location
-
Mbtile To dist/
-
Json to dist/json
-
Intermediate file to tmp/
-
All in .gitignore
-
-
Delete all mediate files
-
-
NetCDF
-
Timeseries
-
Pass dir name
-
Start time and end time
-
-
Read NetCDF get all subdatasets
-
Proceed as Tiff with QML
-
When generate vector mbtiles, try to merge all layer in one for oneday
-
Store the time series in database
-
-
Tiled
-
Detect & unzip all files
-
Merge files to tif
-
Proceed as Tiff (with QML)
-
-
QML
-
To colormap
-
To database
-
-
Handle the result of gdal_info
-
To database
-
return value
-
-
Multiple legend
-
Show all
-
csv
-
Click after remove layers
-
metadata
-
key
-
server
-
Tile format
-
Config file location
-
Mbtile location
-
metajson file location
-
borderFeatures
- {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"stroke": "#000000",
"stroke-width": 3,
"stroke-opacity": 1,
"fill": "#555555",
"fill-opacity": 0.3
},
"geometry": {
"type": "Polygon",
"coordinates": []
}
}
]
}
- {
-
-
value
-
-
layer
-
layerid
-
type
-
name
-
sourceLayer
-
hasData
-
originalDatasetBounds
-
maxzoom
-
minzoom
-
Bounds
-
hasTimeline
-
mbfilename
-
DirectoryFormat:string
- like {year}/{month}/{day}/{name}.mbtiles
-
starttime
-
endtime
-
jsonfile
-
server
-
styleType
-
original_id
-
Colormap
-
legendType
-
legend
-
valuesArray
-
originalDatasetCoordinate
-
mapping
-
defaultColor
-
-
original
-
Dataset name
-
Filename
-
Filepath
-
realtive to South_Sudan
- Like South_Sudan/Rawdata/Soil/xxx/xx.tif
-
-
gdalinfo:text
-
Related Json
- convert from xml or other to json
-
-
Generate metadata.json (will update the website)
-
Generate *.json for each dataset
-
Legend
-
Map render
-
-
Generate configuration(tileserver-gl and TileStache)