today? ü Windows 10? ü Windows 7? ü OS X? ü Linux? ü Others? Q2: What Browser do you use today? (choose all you want to use) ü Google Chrome? ü Firefox? ü Safari? ü Microsoft Edge? ü Others?
and strive to provide universal and affordable access to the Internet in least developed countries by 2020 + Vector Tiles even saves the bandwidth use. Vector tiles are gradually getting ready for everyone.
vector tiles for basemaps by public organizations. Structure Import Produce Host Style Optimize Existing datasource e.g. PostGIS, Shapefile, GeoJSON Tippecanoe Maputnik Interoperable with both Open Source and other frameworks. Tailor-made Node.js scripts Openly maintained on GitHub. Maximum use of existing OSS while adding tailor-made scripts shared openly. vt-optimizer 15 You have accessed this in the step 0.
zoom levels. Custom open source scripts. Create vector tile packages in mbtiles format. Tippecanoe Host modular vector tile packages in a simple and scalable manner. Custom open source scripts. Style hosted vector tiles. Maputnik Enhance the optimization of the size of individual vector tiles by visualizing them. vt-optimizer and other custom open source scripts. Import Produce Host Style Optimize
tools, rather than a monolithic DB/Server suite. Because: ü Inputs are diverse. ü Depolyment environments are diverse. Flexibility is the core value. And sometimes the server shall be isolated from the master database (for security and scarability).
cd ${your-workspace} $ git clone https://github.com/un-vector-tile- toolkit/spinel-produce $ cd spinel-produce Download and install the scripts for producing vector tiles. If this does not work… ü Install git. ü Setup git (next slide). [spinel-produce]$ npm install If this does not work… ü Setup Node.js (next to the next slide)
In Ubuntu, you may want to run the following command, too. curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - For other Linux-based platforms: https://github.com/nodesource/distributions
# If you have time… [spinel-produce]$ gzcat src/6-46-30.ndjson.gz [spinel-produce]$ gzcat src/gmlk20.ndjson.gz This may take time depending on the Internet bandwidth. These are Newline Delimited GeoJSON features. i.e. each line is a GeoJSON Feature. This format is also called GeoJSON Text Sequences (RFC 8142) with Record Separator (RS) omitted.
what3numbers import.js modify.js The number assigned to a tile (in slippy map tilenames) used as the extent of the vector tile package. e.g. 4-46-30 overwraps Sri Lanka. The code to read each features, apply “modify function” to add design properties (layer name, minimum zoom and maximum zoom), and store the resulting features to NDJSON. The code that contains a function to modify a feature by adding design properties and edit other properties of the feature. You can edit this to change the “vector tile schema”.
--drop-densest-as-needed --simplification=2 -- minimum-zoom=6 --maximum-zoom=15 --base- zoom=15 --output=6-46-30.mbtiles 6-46- 30.ndjson This may take time. You’re rendering areas as big as Sri Lanka. If this does not work… ü Install Tippecanoe (next slide)
https://github.com/mapbox/tippecanoe $ cd tippecanoe [tippecanoe]$ make –j [tippecanoe]$ sudo make install # Or you can just use ./tippecanoe without make install [tippecanoe]$ tippecanoe -v If this still does not work, see the next slide.
sudo npm install –g tileserver-gl-light $ tileserver-gl-light 6-46-30.mbtiles $ open http://localhost:8080 Please see a workaround if you see errors (e.g. in Ubuntu) Don’t worry if tileserver-gl-light doesn’t work. You can simply skip this step.
# probably “cd ..” $ git clone https://github.com/un-vector-tile- toolkit/spinel $ cd spinel [spinel]$ npm install [spinel]$ mv ../spinel-produce/6-46-30.mbtiles mbtiles/hands-on [spinel]$ node index.js spinel vector tile server starts on 8765 # After you see “spinel vector tile server starts on 8765” on the original console; $ open http://localhost:8765 $ open http://localhost:8765/hands-on Ctrl-C to stop.
the server 48 $ npm install -g pm2 $ pm2 start index.js -name spinel $ open http://localhost:8765/hands-on # when you want to monitor the server $ pm2 monit # when you want to stop and delete the server $ pm2 stop all $ pm2 delete all You don’t have to do it now. You will use the server in the next stage.
ver. 2.4.0dev of GDAL Challenge: RFC 8142 is still a new format for most software. Recommendation B: Use node-shapefile and script in Node.js Example: https://github.com/hfu/natural-coast Application code example: https://github.com/hfu/shapefile-pass-through https://github.com/mbostock/shapefile
Today, you can get these modules from http://first.vectortiles.xyz:8765/modules/{z}-{x}-{y}.pbf e.g. http://first.vectortiles.xyz:8765/modules/6-29-30.pbf
the style of the map EASIER 2 Change vector tile schema MODERATE 3 Add your own data HARD 4 Add HTTPS or SPDY for better interoperability and performance HARD
2. Start a UNIX server inside the LAN. 3. [op] Check the IP address of the server and provide a domain name using a public DNS for the ease of access. 4. Prepare tickets that contains account information, e.g. [user1, some_fancy_password] and setup such temporal accounts on the server. 5. If a participant want a ”lifeboat”, provide the ticket and allow the participant to access the server. ü If the participant does not have an ssh client, the participant may want to install “Chrome Secure Shell Extension” that provide an ssh client on top of Chrome. 69
less to find the local IP address, probably 192.168.0.{some} sudo service ssh start sudo adduser user1 Test a connection from the client ssh –l user1 192.168.0.{some} After the session sudo deluser user1 sudo rm –rf /home/user1 70 Similar on mac, but use Settings to start the server.