mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Stage1.5 [OSM] (#2473)
* change osm_branch to maps_branch. That is what it is * wiki says stage1 does not include changes to maps/main.js * get the map catalog from ukids * skip bypass download if files are present * add an init.json * add in extend_sat * first cut * first errors * put fonts in iiab font dir * get the php tilesserve in place * add tileserver.php * add in search files * fonts are available already * Revert "fonts are available already" This reverts commit c93a38a4ed99080ae5590abaffa8cf69196ed9dd. * Create README.md * put fonts back in * getting ready to transfer to rpi * move regions.json to test * create the symlinks for viewer * use wget * deal with detail from regions.json * reformat to IIAB for map tiles * deleting z0-z9 takes 30min * remove sleep * transfer current state to hadron * bump transition between white labels to black on sat style from 7 to 9 * added init.json to aggregate * put regions.json in iiab map role * get files from archive.org * detail_url was wrong from update_regions.py * get regions.json from iiab repo * put regios.json where admin console needs it * update details_url * create yamls for osm * fix typos in new yamls * missing with_items clause * put detail.mbtiles in ./tiles folder * do the move from working to viewer * choose the version which uses lib_adm * first cut * first errors * put fonts in iiab font dir * get the php tilesserve in place * add tileserver.php * add in search files * fonts are available already * Revert "fonts are available already" This reverts commit c93a38a4ed99080ae5590abaffa8cf69196ed9dd. * put fonts back in * getting ready to transfer to rpi * move regions.json to test * create the symlinks for viewer * use wget * deal with detail from regions.json * reformat to IIAB for map tiles * deleting z0-z9 takes 30min * remove sleep * transfer current state to hadron * bump transition between white labels to black on sat style from 7 to 9 * added init.json to aggregate * put regions.json in iiab map role * get files from archive.org * detail_url was wrong from update_regions.py * get regions.json from iiab repo * put regios.json where admin console needs it * update details_url * create yamls for osm * fix typos in new yamls * missing with_items clause * put detail.mbtiles in ./tiles folder * install dir.php * change docroot in tileserver.php * Update README.md * regions.json updated with 2019 data * add mbtileinfo.php and put it in place * changes to osm-fixup * osm-fixup receive url * typo in fixup and wronge mbtileinfo base * sloppy mistakes arount found_region * can use adm-lib.py * change regions.json to map-catalog.json * change regios.json to map-catalog.json, bump 2map-reorg to 3map-reorg as branch name * another region->map * call the console script to add menu items * fetch test-page from test branch * typo in osm-fixup.py comment * remove the map_functions from test page * new bboxes, title to san_jose * remove the regions.json and map_functions.js * let the map repo have all files related to test-page * first cut * first errors * put fonts in iiab font dir * get the php tilesserve in place * add tileserver.php * add in search files * start debugging * fonts are available already * Revert "fonts are available already" This reverts commit c93a38a4ed99080ae5590abaffa8cf69196ed9dd. * Create README.md * put fonts back in * getting ready to transfer to rpi * move regions.json to test * create the symlinks for viewer * use wget * deal with detail from regions.json * reformat to IIAB for map tiles * deleting z0-z9 takes 30min * remove sleep * transfer current state to hadron * bump transition between white labels to black on sat style from 7 to 9 * added init.json to aggregate * put regions.json in iiab map role * get files from archive.org * detail_url was wrong from update_regions.py * get regions.json from iiab repo * put regios.json where admin console needs it * update details_url * create yamls for osm * fix typos in new yamls * missing with_items clause * put detail.mbtiles in ./tiles folder * do the move from working to viewer * these moves work * first cut * first errors * put fonts in iiab font dir * get the php tilesserve in place * add tileserver.php * add in search files * start debugging * fonts are available already * Revert "fonts are available already" This reverts commit c93a38a4ed99080ae5590abaffa8cf69196ed9dd. * put fonts back in * getting ready to transfer to rpi * move regions.json to test * create the symlinks for viewer * use wget * deal with detail from regions.json * reformat to IIAB for map tiles * deleting z0-z9 takes 30min * remove sleep * transfer current state to hadron * bump transition between white labels to black on sat style from 7 to 9 * added init.json to aggregate * put regions.json in iiab map role * get files from archive.org * detail_url was wrong from update_regions.py * get regions.json from iiab repo * put regios.json where admin console needs it * update details_url * create yamls for osm * fix typos in new yamls * missing with_items clause * put detail.mbtiles in ./tiles folder * install dir.php * change docroot in tileserver.php * Update README.md * regions.json updated with 2019 data * add mbtileinfo.php and put it in place * changes to osm-fixup * osm-fixup receive url * typo in fixup and wronge mbtileinfo base * sloppy mistakes arount found_region * can use adm-lib.py * change regions.json to map-catalog.json * change regios.json to map-catalog.json, bump 2map-reorg to 3map-reorg as branch name * another region->map * call the console script to add menu items * fetch test-page from test branch * typo in osm-fixup.py comment * remove the map_functions from test page * new bboxes, title to san_jose * remove the regions.json and map_functions.js * let the map repo have all files related to test-page * add css * get nginx /maps working * helps admin console work with osm-maps * point to the stage1 branch in maps * add bypass * pull from map repo from a branch that is controlled by a variable * somehow this install was missing php-sqlite * add init.json * change osm_branch to maps_branch. That is what it is * wiki says stage1 does not include changes to maps/main.js * get the map catalog from ukids * skip bypass download if files are present * let osm_enalbled control world to zoom 10 * expand bypass to install-map-region * lots of errors in download script * both are modified * need python to write init.json - but bash workds * add in make_init.py * init.json updated via python * get the installer mbtiles * change to map branch staage1 * add tileserve.php to installer * put style-osm.json in installer * create a link for planet in installer * turn off enable in local_vars for osm-vector-maps * copy scripts to /usr/bin * softcode satellite fname * typos * sat_dir needed work * standatdize output satellite mbtile name * sat_bboxes not defined * period to comma in sat_bboxes * too many errors--did this ever work * period to comma * move new file into place, save old to /tmp * cannot move to /tmp from root -- different filesystem. So use copy * add iiab-summarize.sh to /usr/bin * write init.json correctly * only the web-pack from stage1 branch * let installer use php * point to maps rc-master * partially working but with many missing pieces * got on the wrong machine * got through it once with pages in rc-master * add installer_functions to install.yml * spell installer_functions with a .js * need tileserver.php for installer * colorize the map list for installed tiles * add s to iiab-maps-finish.py * get the name correct for iiab-maps-finish.py * map->maps, add python3-pil * iiab-extend-sat much better, maybe good enouth * start work on README * Update README.md * move README.md up oe level * change default map page to installer * working on test-page redirect * create assets in test-page * get the installer redirect working * can now record satellite download info in database -- needs improvement in bounds * hyphen/underebar problem installer-functions.js * change rc-master to master * eliminate aggregate.py, dir.php, create_empty_mbtiles.sh * move assets from iiab to maps * removed dead wood and did get_url for map stuff * extra space in with_items clause after hyphen caused errors * keep stuff in main.yml I do not understand * last vestiges of maps in iiab repo * after runroles, nginx needs restarting * remove dead wood, pull redirect for maplist from maps repo * observe iiab standards * remove redundant code * get nginx box/maps to work * fonts moved, so the pointers must change * enabled => true in all
This commit is contained in:
parent
5d64c06662
commit
8090f3bb29
31 changed files with 1331 additions and 656 deletions
|
@ -1,15 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
CMDSRV_SCRIPTS="/opt/admin/cmdsrv/scripts"
|
||||
if [ ! -f "$CMDSRV_SCRIPTS/iiab-update-map.py" ]; then
|
||||
echo "Admin Console not installed. Exiting."
|
||||
exit
|
||||
fi
|
||||
|
||||
$CMDSRV_SCRIPTS/iiab-update-map.py
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Update Menus Failed."
|
||||
exit 1
|
||||
fi
|
||||
exit
|
|
@ -1,57 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Osm-Vector Splash Page</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- Bootstrap -->
|
||||
<link href="/common/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src='/common/js/jquery.min.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<h2>Vector Maps Test Page -- Use The Admin Console to Download a Selected Region</h2>
|
||||
<p>The IIAB vector maps are based upon OpenStreetMap Data. Each map has general geographic information that covers the <b>whole world </b>with a resolution of about 5 KM. The detailed regions provide data about items that are 5 meters apart. </p>
|
||||
<div class="row">
|
||||
<div class="col-sm-12"><a href="/admin"><button id="INST-MODS" type="button" class="btn btn-lg btn-primary">Go To Admin Console</button></a></div>
|
||||
</div>
|
||||
|
||||
<div id="osmRegionSelection" >
|
||||
<style>
|
||||
#map-container{
|
||||
background-color: #b2d3f8;
|
||||
float: right;
|
||||
width: 70%;
|
||||
right: 10px;
|
||||
height: 500px;
|
||||
}
|
||||
body {
|
||||
padding: 40px;
|
||||
}
|
||||
</style>
|
||||
<div id="map-container"></div>
|
||||
|
||||
</div>
|
||||
<div id='regionlist'>placeholdr</div>
|
||||
</div> <!-- End instOsmRegion Submenu Option Pane -->
|
||||
<script>
|
||||
function readableSize(kbytes) {
|
||||
if (kbytes == 0)
|
||||
return "0";
|
||||
var bytes = 1024 * kbytes;
|
||||
var s = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'];
|
||||
var e = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
return (bytes / Math.pow(1024, e)).toFixed(2) + " " + s[e];
|
||||
}
|
||||
</script>
|
||||
<script src="/osm-vector-maps/maplist/assets/map_functions.js"></script>
|
||||
<script>
|
||||
window.$ = window.$ = jQuery;
|
||||
$.when(readMapCatalog()).done(function() {
|
||||
renderRegionList(false);
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="/osm-vector-maps/maplist/main.js"></script></body>
|
||||
</html>
|
|
@ -1,89 +0,0 @@
|
|||
import {Fill, Stroke, Style} from 'ol/style';
|
||||
import 'ol/ol.css';
|
||||
import GeoJSON from 'ol/format/GeoJSON';
|
||||
import Map from 'ol/Map';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import View from 'ol/View';
|
||||
//import XYZSource from 'ol/source/XYZ';
|
||||
//import MVT from 'ol/format/MVT';
|
||||
|
||||
// a global variable to control which features are shown
|
||||
var show = {};
|
||||
var mapData = "/common/assets";
|
||||
|
||||
|
||||
var map = new Map({
|
||||
target: 'map-container',
|
||||
layers: [
|
||||
new VectorLayer({
|
||||
source: new VectorSource({
|
||||
format: new GeoJSON(),
|
||||
url: mapData + '/countries.json'
|
||||
}),
|
||||
style: new Style({
|
||||
fill: new Fill({
|
||||
color: 'rgb(219, 180, 131)'
|
||||
}),
|
||||
stroke: new Stroke({
|
||||
color: 'white'
|
||||
})
|
||||
})
|
||||
}),
|
||||
|
||||
],
|
||||
|
||||
view: new View({
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
})
|
||||
});
|
||||
|
||||
var setBoxStyle = function(feature) {
|
||||
var name = feature.get("name");
|
||||
//alert(keys+'');
|
||||
if (typeof show !== 'undefined' &&
|
||||
show != null && name == show) {
|
||||
return new Style({
|
||||
fill: new Fill({
|
||||
color: 'rgba(67, 163, 46, 0.2)'
|
||||
}),
|
||||
stroke: new Stroke({
|
||||
color: 'rgba(67, 163, 46, 1)',
|
||||
width: 2
|
||||
})
|
||||
})
|
||||
} else {
|
||||
return new Style({
|
||||
fill: new Fill({
|
||||
color: 'rgba(255,255,255,.10)'
|
||||
}),
|
||||
stroke: new Stroke({
|
||||
color: 'rgba(255,255,255,.3)'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var boxLayer = new VectorLayer({
|
||||
source: new VectorSource({
|
||||
format: new GeoJSON(),
|
||||
url: mapData + '/bboxes.geojson'
|
||||
}),
|
||||
id: 'boxes',
|
||||
style: setBoxStyle
|
||||
});
|
||||
map.addLayer(boxLayer);
|
||||
|
||||
$( document ).on("mouseover",".extract",function(){
|
||||
|
||||
var data = JSON.parse($(this).attr('data-region'));
|
||||
show = data.name;
|
||||
//setBoxStyle();
|
||||
boxLayer.changed();
|
||||
});
|
||||
$( document ).on("mouseout",".extract",function(){
|
||||
var data = JSON.parse($(this).attr('data-region'));
|
||||
show = '';
|
||||
boxLayer.changed();
|
||||
});
|
|
@ -1,21 +1,20 @@
|
|||
# For downloadable regional vector tilesets
|
||||
location /maps {
|
||||
rewrite ^/maps(.*)$ /osm-vector-maps$1;
|
||||
location ~ ^/maps {
|
||||
rewrite ^/maps(.*)$ /osm-vector-maps/viewer$1;
|
||||
}
|
||||
|
||||
location /osm-vector-maps {
|
||||
alias {{ vector_map_path }}; # /library/www/osm-vector-maps
|
||||
}
|
||||
|
||||
location ~ ^/osm-vector-maps/(.*)\.php(.*)$ {
|
||||
alias {{ vector_map_path }}/$1.php$2; # /library/www/osm-vector-maps
|
||||
location ~ ^/osm-vector-maps(.*)\.php(.*)$ {
|
||||
alias /library/www/osm-vector-maps$1.php$2; # /library/www/osm-vector-maps
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
fastcgi_pass php;
|
||||
fastcgi_index index.html;
|
||||
include fastcgi_params;
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $2;
|
||||
}
|
||||
location ~ ^/osm-vector-maps/ {
|
||||
root /library/www;
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# For downloadable regional vector tilesets, see https://github.com/iiab/iiab/wiki/IIAB-Maps
|
||||
Alias /map {{ vector_map_path }}
|
||||
Alias /maps {{ vector_map_path }}
|
||||
Alias /osm-vector-maps {{ vector_map_path }}
|
||||
<Directory {{ vector_map_path }}>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
Loading…
Add table
Add a link
Reference in a new issue