Install tilecache on IIS

Source: Internet
Author: User

Tilecache is a GIS Component I learned when translating the book GIS for Web Developer. It is located before the GIS server and can cache data of any WMS service, to produce tile-style WebGIS effect. I have been searching for information on tilecache installation and usage for a long time on the Internet, but I have never had any results. Later, I found a piece of "seting up tilecache on IIS" in Google's cache.Article.

 

The cache Effect of tilecache can accelerate the WMS service by 10-times or even higher, but it is an open-source tool developed using Python and Its developer is metacarta labs. We will use tilecache on IIS. (I think IIS is quite useful, compared to Apache)

 

  • Download the latest version of Python (2.5.1) [version 2.1 is unavailable ]. I installed ESRI 2.4, so the following versions may be different;
  • Run Python installer fow windows and install python in the default directory "C: \ python24"
  • After installing python, you need to set its environment variables. As shown in:
  • Add "; C: \ python24 \;" to the variable path.
  • Download the latest tilecache version 2.0.4 and decompress it to "C: \ Inetpub \ wwwroot \ tilecache:
  • Open the IIS manager. A shortcut is to enter inetmgr;
  • Now we need to enable IIS to parse the Python script. Right-click "default website" and choose "properties", "main directory", and "configuration:
  • In the displayed ing dialog box, click "add". The following settings are displayed in the dialog box. note two % s:
  • After the input is complete, the following situations will occur. Now IIS can parse Python:
  • Right-click the tilecache folder and choose "properties". The dialog box is displayed:
  • In the dialog box, "directory" and "application"ProgramThe "Application name" of "set" should not exist. Click "new" next to it to see the following situation:
  • Open the command line window, And in the C: \ Inetpub \ adminscripts directory, type the following two commands in sequence:
    • Adsutil set w3svc/allowpathinfoforscriptmappings true
    • Adsutil set w3svc/1/allowpathinfoforscriptmappings true
  • Rename the 'C: \ Inetpub \ wwwroot \ tilecache. cgi 'file to 'C: \ Inetpub \ wwwroot \ tilecache. py'
  • Edit the tilecache. py fileCode'#! Delete/usr/bin/ENV Python and change the parameter in service. Load to 'C: \ Inetpub \ wwwroot \ tilecache. cfg '. As shown below:
  • Create a new cache folder in the tilecache folder to generate the cache directory. We need to give this folder a "writable" permission.
  • Edit the tilecache. cfg file in the tilecache folder and modify [cache:

    Change
  • Modify the URL value under [basic]. [basic] is the name of the layer You Want To Cache. This setting must be correct. The following is a layer from metacarta's WMS service named basic
  • Edit the index.html file in the tilecachefolder and set tilecache. cgi? Changed to tilecache. py?
  • Now, congratulations, your tilecache installation on IIS has been completed.
  • Check the cache folder, which has been generated by cache. The basic folder represents the basic layer. You can see many folders:
  • Now let's generate a cache for the entire map, that is, manually generate the cache. In the command line tool, enter the following command:
    Python "c: \ Inetpub \ wwwroot \ tilecache \ tilecache_seed.py" "http: // localhost/tilecache. py ?" Basic 0 2
  • Here, refers to the cache level of the map. You can set it by yourself. If you set it to 0 6, it will generate a map cache of 7 levels, but it takes a lot of time. I did not.
  • Modify the content of index.html. Note that titlecache:
  • Congratulations again, everything is successful.

    [For more information, see http://www.hmis.cn /]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.