Skip to content

Commit ef879b7

Browse files
author
Carlos Tampier
committed
CT: Updated Readme with instructions to serve tiles.
1 parent 8f25892 commit ef879b7

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

README.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,14 +608,52 @@ Most of the parameters are self-explanatory, but the following should be noted:
608608

609609
<br/><br/>
610610

611-
## _8. Offline Usage of the web GUI_
611+
## _8. Offline usage of the web GUI (local tile server)_
612612

613613
Completing the installation steps for the web GUI enables the offline usage of the application on your machine, the one **exception** being the tile server.
614614

615-
A tile server is needed for the leaflet map viewer in the FTT. By default, OpenStreetMap is used. Without internet access, a local tile server must be configured. A guide on how to do this can be found on:
615+
A tile server is needed for the leaflet map viewer in the FTT. By default, OpenStreetMap is used. Without internet access, a local tile server must be configured.
616+
617+
### **8.1. Configuring a tile server with OSM data**
618+
619+
A guide on how to do this can be found at:
616620

617621
- https://switch2osm.org/serving-tiles/manually-building-a-tile-server-18-04-lts
618622

619-
A docker container is also available on:
623+
A docker container is also available at:
620624

621625
- https://github.com/Overv/openstreetmap-tile-server
626+
627+
### **8.2. Configuring a tile server with a GeoTIFF image**
628+
629+
Serving tiles from a GeoTIFF image is easier done with the [GeoServer](https://geoserver.org/) tool. A handy docker container can be found at:
630+
631+
- https://github.com/kartoza/docker-geoserver
632+
633+
That repository includes sample docker-compose.yml and .env files to quicky configure and install the application. Once installed, the GeoServer needs to be set up to serve tiles from the GeoTIFF image. The following steps will walk you through this process.
634+
635+
1. Move your GeoTIFF data to the GeoServer docker image data volume. This is easier done by modifying the docker-compose file to mount the volume in a local rounte of the host machine, e.g. by changig:
636+
```
637+
geoserver:
638+
volumes:
639+
- geoserver-data:/opt/geoserver/data_dir
640+
```
641+
To:
642+
```
643+
geoserver:
644+
volumes:
645+
- ./geoserver_data:/opt/geoserver/data_dir
646+
```
647+
And then creating a directory called `geoserver_data` in the same location as your docker-compose file.
648+
649+
2. Set up a Workspace in the GeoServer. Go to the GeoServer home page (`http://localhost:8600/geoserver` by default in the sample configuration) and log in using your credentials (by default, user: `admin`, password: `myawesomegeoserver`). On the left side, click on `Workspaces` then `Add new workspace`. You can choose a name and URI, such as `ftt` and `http://localhost:8600/geoserver/ftt`, then click `save`.
650+
651+
3. Set up a Store. Again on the left side, click on `Store`, then `Add new store`. Select `GeoTIFF` as the data source type. Pick a data source name, write a description and browse for your .tiff image. Click `save`.
652+
653+
4. Set up a Layer. On the page that opens after step 3, click on `Publish`. Change the `Name` of the layer to something simple (e.g. `MyLayer`), then click on `save` at the bottom of the page.
654+
655+
5. Set up Tile Caching. Once again on the left side, click on `Tile Layers`. Select your newly created layer (ftt:MyLayer in this example) and under the `Tile Caching` tab, near the bottom of the page, expand the list for `Add grid subset`. Type and select `WebMercatorQuad` and click on the plus icon on the right to add it. Click `save`.
656+
657+
6. You can now fetch the tiles using the following URL format (note that this may vary depending on your workspace and layer name).
658+
659+
- http://localhost:8600/geoserver/gwc/service/tms/1.0.0/ftt:MyLayer/{z}/{x}/{y}.png?flipY=true

0 commit comments

Comments
 (0)