Talparo MapProxy is an easy to install, Windows based installer of the awesome & highly configurable MapProxy. Note, this is not an official distribution of MapProxy and is in no way endorsed by the fine folks at MapProxy.org.
Talparo MapProxy is a distribution of MapProxy 1.5.0 for Windows based systems. It uses an embedded Portable Python distribution (version 2.7.5.1) and includes all necessary egg files for offline installation. This project aims to make the MapProxy installation as easy and automatic as possible on Windows based systems.
There are a number of map based tile servers available online, however some clients that use these services do not do the best job in caching the requests so that there is most efficient use of the network. In addition, some popular map services do not provide a WMS based interface and so cannot be used by some of the clients who require this interface.
MapProxy (from mapproxy.org) is a python based WMS Proxy server that can be used to cache tile based map data for better performance and offline access. The following documentation details how to manually setup and configure the requirements for all the prerequisites necessary to create a mapproxy service. This is automated by the Talparo MapProxy MSI installer.
Since MapProxy is a python based application, the first thing we need installed is Python. MapProxy as of this writing requires Python 2.7 and for our purposes we will use portable python available from http://portablepython.com/. I chose portable python so that the mapproxy service will not be dependent on other python installations or conflict with other versions of python installed in the system. The only module installed is PIL which is required for MapProxy to function.
Next we install the setuptools script so we can get access to easy_install. We get the script from https://bitbucket.org/pypa/setuptools and use the link to ez_setup.py (https://bitbucket.org/pypa/setuptools/downloads/ez_setup.py) and run it using the python.exe in the App folder of the portable python extraction.
The easy_install executable is located in the scripts folder (Python2751\App\Scripts\easy_install.exe) and to install libproj4 (a library MapProxy needs) we run the command "Python2751\App\Scripts\easy_install pyproj". After that completes successfully, we install MapProxy. We do this by running the command "Python2751\App\Scripts\easy_install MapProxy".
As per the installation instructions we check the installation by running a version check on mapproxy-util. We do this by running the command "Python2751\App\Scripts\mapproxy-util -version". As of writing this MapProxy is at version 1.5.0 and this should be displayed at the command prompt.
Finally we create the specific proxy configuration named "talparo" after the area in Trinidad and Tobago. This is done by executing the following command "Python2751\App\Scripts\mapproxy-util create -t base-config talparo". This creates a talparo folder and inside it we create a server.bat file. This file will let us start the services for the mapproxy.
The contents of the server.bat is below:
@echo off ..\Python2751\App\Scripts\mapproxy-util serve-develop mapproxy.yaml -b 1962 > talparo.mapproxy.log
This short batch file uses the mapproxy.yaml configuration file, binds to port 1962 and creates a log file named talparo.mapproxy.log in the current directory. Next, we try to get the batch file to run as a windows service. For this, we use winsw found at https://github.com/kohsuke/winsw.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY PARTY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.