pull/39/head
Etienne Trimaille 2016-07-20 09:21:46 +07:00
rodzic 5ee47588ad
commit e1fc4981c9
3 zmienionych plików z 26 dodań i 8 usunięć

Wyświetl plik

@ -215,12 +215,14 @@ class Importer(object):
def _import_clip_function(self):
"""Create function clean_tables()."""
self.info('Import clip function.')
command = ['psql']
command += ['-h', self.default['HOST']]
command += ['-U', self.default['USER']]
command += ['-d', self.default['DATABASE']]
command += ['-f', self.clip_sql_file]
call(command)
self.info('!! Be sure to run \'make import_clip\' !!')
def clip(self):
"""Perform clipping if the clip table is here."""

Wyświetl plik

@ -18,10 +18,21 @@ wget -c -O country.pbf http://download.openstreetmap.fr/extracts/africa/south_af
### Clipping
You can put a shapefile in the clip folder. This shapefile will be used for clipping every features after the import.
You can put a shapefile in the clip folder. This shapefile will be
used for clipping every features after the import.
This file has to be named 'clip.shp'. When the database container is
running, import the shapefile in the database using the command :
'make import_clip'.
You can remove the clip file : 'make remove_clip'.
### QGIS Styles
'make import_styles'
'make remove_styles'
'make backup_styles'
### SQL Trigger
### Build and run
@ -39,6 +50,11 @@ In production you should daemonize the services when bringing them up:
docker-compose up -d
```
You can check the timestamp of your database by reading the file :
'settings/timestamp.txt'
or you can use :
'make timestamp'
## Docker OSM Update
This docker image when run will fetch on a regular interval any new diff file

Wyświetl plik

@ -9,19 +9,19 @@ html, body, #map { height: 100%; width: 100%; background-color: #2b6adb;}
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script>
var map = L.map('map').setView([0, 0], 3);
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?');
var baseMaps = {
"OSM-Tiles": osm
};
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?').addTo(map);
var wms = L.tileLayer.wms("http://localhost:8198/cgi-bin/qgis_mapserv.fcgi?", {
map: '/web/project.qgs',
layers: 'project',
format: 'image/png',
transparent: true,
attribution: "OpenStreetMap"
});
}).addTo(map);
var overlays = {
"OSM-Docker": wms
"OSM-Docker": wms,
"OSM-Tiles": osm
};
L.control.layers(baseMaps, overlays).addTo(map);
L.control.layers({}, overlays).addTo(map);
</script></body></html>