<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>cartoweb &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/cartoweb/</link>
	<description>Feed of posts on WordPress.com tagged "cartoweb"</description>
	<pubDate>Tue, 07 Oct 2008 01:59:08 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Mapserver 5.0.1 telah dikeluarkan...]]></title>
<link>http://mapserver.wordpress.com/?p=11</link>
<pubDate>Sat, 26 Jan 2008 07:56:38 +0000</pubDate>
<dc:creator>jtv</dc:creator>
<guid>http://mapserver.id.wordpress.com/2008/01/26/mapserver-501-telah-dikeluarkan/</guid>
<description><![CDATA[Kabar gembira buat temen-temen yang ingin selalu mencoba yang baru, Mapserver 5.0.1 telah di-release]]></description>
<content:encoded><![CDATA[<p>Kabar gembira buat temen-temen yang ingin selalu mencoba yang baru, Mapserver 5.0.1 telah di-release.</p>
<p>Banyak perbaikan di sana sini, contohnya:</p>
<p>Avoid crash when generating error message (#2389) <a href="http://trac.osgeo.org/mapserver/browser/tags/rel-5-0-1/mapserver/HISTORY.TXT" title="Mapserver" target="_blank">baca lebih lanjut</a></p>
<p><a href="http://mapserver.gis.umn.edu/download/current/">Download Mapserver 5.0.1</a></p>
<p>Mulai hari ini, saya akan mencoba CartoWeb, mudahan-mudahan berhasil dan bisa saya sharing di blog ini...</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[CartoWeb Installation]]></title>
<link>http://bkurniawan.wordpress.com/2007/03/26/cartoweb-installation/</link>
<pubDate>Mon, 26 Mar 2007 07:01:46 +0000</pubDate>
<dc:creator>bkurniawan</dc:creator>
<guid>http://bkurniawan.id.wordpress.com/2007/03/26/cartoweb-installation/</guid>
<description><![CDATA[1.1. CartoWeb Installation


1.1.1. Prerequisite for Installing CartoWeb
CartoWeb depends on sever]]></description>
<content:encoded><![CDATA[<h2 class="title">1.1. CartoWeb Installation</h2>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.1.1. Prerequisite for Installing CartoWeb</h3>
<p>CartoWeb depends on several software components for its proper         working. Some are required and others are optional, depending on what you         intend to do.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>Windows users can ignore this chapter and go directly to              <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.download" title="1.1.2. CartoWeb Download">Section 1.1.2, “CartoWeb Download”</a></p>
<p>The required software are:</p>
<p class="variablelist">
<p class="title">                 <strong>A Web Server</strong></p>
<dl>
<dt>                   <span class="term"></span>
</dt>
<dd>Such as Apache <a href="http://httpd.apache.org/">http://httpd.apache.org</a></dd>
</dl>
<p class="variablelist">
<p class="title">                 <strong>PHP &#62;= 5.0.3</strong></p>
<dl>
<dt>                   <span class="term"></span>
</dt>
<dd> See <a href="http://www.php.net/">http://www.php.net</a> for more informations.                 You will need to have some features available in PHP:</p>
<p class="itemizedlist">
<ul>
<li><span class="emphasis"><em>Gettext</em></span> (optional): You need the Gettext module if you want                       to enable the Internationalization in CartoWeb. See                       <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.i18n.html" title="16. Internationalization">Chapter 16, <em>Internationalization</em></a> for configuration.
<p class="note">
<h3 class="title">Note</h3>
<p>If you are using the demo, you need to have Gettext                           support installed, as it uses Gettext by default.</p>
<p>If you are using Cygwin, simply install the <span class="emphasis"><em>gettext-devel</em></span> package.</li>
<li><span class="emphasis"><em>SOAP</em></span> (optional if using direct mode only): You need the SOAP module if you want                      to use CartoWeb as a Webservice or with separated CartoClient and CartoServer. This is related to the <code>cartoserverDirectAccess</code>                      parameter described in <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.config.html#user.config.client" title="4.2.        client.ini     ">Section 4.2, “       <code>client.ini</code>     ”</a></li>
</ul>
<p class="note">
<h3 class="title">Note</h3>
<p>If you are using Windows, simply use the Windows Installer                  <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.download" title="1.1.2. CartoWeb Download">Section 1.1.2, “CartoWeb Download”</a>. If you absolutely want to install                  PHP manually, see <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/appendix.windows_manual_install.html" title="Appendix B. Apache &#38; Mapserver Windows Manual Installation">Appendix B, <em>Apache &#38; Mapserver Windows Manual Installation</em></a>.</p>
</dd>
</dl>
<p class="variablelist">
<p class="title">                 <strong>MapServer PHP/MapScript (from MapServer &#62;= 4.4)</strong></p>
<dl>
<dt>                   <span class="term"></span>
</dt>
<dd>See <a href="http://www.maptools.org/php_mapscript/">http://www.maptools.org/php_mapscript/</a>                 for more information and installation instructions.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>If you are using Debian, and you need to install MapServer, you can have a                  look at <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/appendix.debian_mapserver.html" title="Appendix A. Mapserver Debian Installation">Appendix A, <em>Mapserver Debian Installation</em></a></p>
<p class="note">
<h3 class="title">Note</h3>
<p>If you are using Windows, simply use the Windows Installer                  <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.download" title="1.1.2. CartoWeb Download">Section 1.1.2, “CartoWeb Download”</a>. If you absolutely want to install                  MapServer manually, see <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/appendix.windows_manual_install.html" title="Appendix B. Apache &#38; Mapserver Windows Manual Installation">Appendix B, <em>Apache &#38; Mapserver Windows Manual Installation</em></a>.</p>
</dd>
</dl>
<p class="variablelist">
<p class="title">                 <strong>PostgreSQL with PostGIS Support (Optional)</strong></p>
<dl>
<dt>                   <span class="term"></span>
</dt>
<dd>If you want spatial database support in CartoWeb you               will need to install PostGIS of the PostgreSQL database.               See <a href="http://postgis.refractions.net/">http://postgis.refractions.net/</a>                for more information.</dd>
</dl>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.1.2. CartoWeb Download</h3>
<p>There are two ways to get CartoWeb:</p>
<p class="orderedlist">
<ol>
<li><strong>Complete package from the official website: </strong>
<p class="itemizedlist">
<ul>
<li>Download CartoWeb package from <a href="http://cartoweb.org/downloads.html">http://cartoweb.org/downloads.html</a>.                     It is recommended that you download the version with demo for a better                     user experience.</li>
<li>                     Uncompress the archive somewhere in your path accessible by your web                      server.</li>
</ul>
</li>
<li><strong>From CVS: </strong>Get the current development version via CVS using the following command:
<pre>cvs -d :pserver:anonymous@dev.camptocamp.com:/var/lib/cvs/public co cartoweb3</pre>
<p><strong>From CVS with cw3setup.php: </strong>If you already have the <code>cw3setup.php</code> file, which comes along the CartoWeb package              or CVS source, you can fetch CartoWeb from CVS and set up it at once. See              <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.setup.example.reinstall" title="1.1.3.2.6. Install or Reinstall CartoWeb from CVS and Set Up It at Once">Section 1.1.3.2.6, “Install or Reinstall CartoWeb from CVS and Set Up It at Once”</a> for more details.</li>
</ol>
<p>Once you have CartoWeb, point your web browser to the file located in          <code>htdocs/info.php</code>, and check that the PHP         information page displays correctly (meaning PHP is correctly setup)         and that you have do not have a WARNING message at the top of the page         about MapScript failing to load.         If it is not the case, CartoWeb will not run correctly. You should         install and set up PHP and PHP/MapScript correctly. See            <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.prerequisite" title="1.1.1. Prerequisite for Installing CartoWeb">Section 1.1.1, “Prerequisite for Installing CartoWeb”</a>.</p>
<p>Having Gettext installed is recommended if you wish to use the multilingual features of CartoWeb.</p>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.1.3. Command Line Installation</h3>
<p>CartoWeb installer is <code>cw3setup.php</code>, located in the root directory of the application.</p>
<p>You can run this file with the <code>--help</code> parameter to see the          available options. For instance:</p>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --help</pre>
<p>where &#60;PHP-INTERPRETER&#62; is the location of your php interpreter. On         Windows, it can be <code>c:\wamp\php\php.exe</code> or on Unix         <code>/usr/lib/cgi-bin/php</code>.</p>
<p class="sect3">
<p class="titlepage">
<h4 class="title">1.1.3.1. List of Available Options</h4>
<pre>Usage: cw3setup.php ACTION [OPTION_1] ... [OPTION_N]

Possible actions:

 --help, or -h              Display this help and exit.
 --version or -v            Output version information and exit.
 --install                  Install CartoWeb.
 --fetch-demo               Fetch the demo data from cartoweb.org, and extract
                            it in the demo project if not already there.
 --clean                    Clean generated files and caches.

List of options:

 --debug                    Turn on output debugging.

 --writableowner OWNER      The user who should have write permissions for
                            generated files.

 --cvs-root                 CVS Root directory to use when fetching
                            CartoWeb/project out of CVS.
 --fetch-from-cvs           Fetch CartoWeb from CVS and install it in the
                            current directory, or in the directory given by
                            the --install-location parameter.
                            NOTE: You must be located where cartoweb3 directory
                            will be created, not inside like other commands.
 --cartoweb-cvs-option OPTIONS  A string which will be given to the cvs checkout
                            command of cartoweb (not projects!).
                            For instance, to fetch a specific branch,
                            use '-r MY_BRANCH'. Or for a specific date,
                            use '-D "2005-09-05 11:00"'.
 --fetch-from-dir DIRECTORY Copy CartoWeb from the specified directory into the
                            current directory, or in the directory given by the
                            --install-location parameter.
                            NOTE 1: You must be located where cartoweb3
                            directory will be created, not inside like other
                            commands.
                            NOTE 2: You may either use a path relative to the
                            target cartoweb3 directory or an absolute path.
 --install-location         Directory where to install CartoWeb
                            (when using --fetch-from-cvs/dir options).

 --delete-existing          Overwrite existing directories if any.
 --no-symlinks              Do not use symbolic links, even if your operating
                            system supports them.

 --config-from-file FILE    Location of a configuration file for automatic
                            variable replacement in .in files.
                            NOTE: You may either use a path relative to the
                            target cartoweb3 directory or an absolute path.
--config-from-project PROJECT Read the configuration file containing variables
                            to replace in .in files from the specified project.

 --fetch-project-cvs PROJECT Fetch the given project from CVS (see --cvs-root
                            option). To fetch several projects at a time,
                            specify this option as many times as necessary.
 --fetch-project-dir DIRECTORY Fetch the given project from a directory. To
                            fetch several projects at a time, specify this
                            option as many times as necessary.
 --project PROJECT          Installation is launched only for given project. To
                            install several projects at a time, specify this
                            option as many times as necessary.

 --default-project PROJECT  Default project to use.
 --base-url BASEURL         URL where you can find client.php.
 --profile PROFILENAME      The profile to use (development/production/custom).
                            NOTE: default is 'development'
 --clean-views              Clean views (must be used with --clean).
 --clean-accounting         Clean accounting (must be used with --clean).
 --keep-directories         Do not remove the generated directories during
                            cleaning (must be used with --clean).
 --keep-permissions         Do not alter the permissions of writable directories.</pre>
<p class="sect3">
<p class="titlepage">
<h4 class="title">1.1.3.2. Examples of Use</h4>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.3.2.1. Basic Setup</h5>
<p>To perform a basic setup of CartoWeb, such as if you want to run the demo project, type:</p>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --install --base-url
            http://www.example.com/cartoweb</pre>
<p>In this example, http://www.example.com/cartoweb is the address which corresponds             to the <code>cartoweb3/htdocs</code> directory. You should find              <code>client.php</code> if you type this URL.</p>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.3.2.2. Installing a Project from a Directory</h5>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --install --fetch-project-dir
            /home/foo/my_project --base-url http://www.example.com/cartoweb</pre>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.3.2.3. Updating CartoWeb after Modifications</h5>
<p>When you modify or add new content/features to CartoWeb, you need to update it.            This will set relative links or copy new/modified resources files (templates, images, new plugins, ...)</p>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --install --base-url
            http://www.example.com/cartoweb</pre>
<p>Same as <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.setup.example.basic" title="1.1.3.2.1. Basic Setup">Section 1.1.3.2.1, “Basic Setup”</a>. Existing files              are not overwritten.</p>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.3.2.4. Cleaning Generated Files (Map, PDF, Temporary Files and Smarty Cache)</h5>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --clean</pre>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.3.2.5. Fetching the Demo Data</h5>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --fetch-demo</pre>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.3.2.6. Install or Reinstall CartoWeb from CVS and Set Up It at Once</h5>
<p class="sect5">
<p class="titlepage">
<h6 class="title">1.1.3.2.6.1. Install</h6>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --install --cvs-root
              :pserver:anonymous@dev.camptocamp.com:/var/lib/cvs/public
              --fetch-from-cvs --base-url http://www.example.com/cartoweb</pre>
<p class="note">
<h3 class="title">Note</h3>
<p>Do no execute this command from the <code>cartoweb3</code> folder! Because this will fetch                  the whole cartoweb3 hierarchy from cvs, including the <code>cartoweb3</code> folder. If you                  executed this from the <code>cartoweb3</code> folder you would end up with something like                  <code>cartoweb3/cartoweb3/...</code>. Instead, copy the <code>cw3setup.php</code> in the parent directory,                  delete (or backup) the cartoweb3 folder and execute the command.</p>
<p class="sect5">
<p class="titlepage">
<h6 class="title">1.1.3.2.6.2. Reinstall</h6>
<pre>&#60;PHP-INTERPRETER&#62; cw3setup.php --install --cvs-root
              :pserver:anonymous@dev.camptocamp.com:/var/lib/cvs/public
              --fetch-from-cvs --delete-existing
              --base-url http://www.example.com/cartoweb</pre>
<p class="warning">
<h3 class="title">Warning</h3>
<p>This command will automatically delete the existing <code>cartoweb3/</code> folder! Be sure to backup                the files and projects you wish to keep.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>See note on <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.setup.example.reinstall.new" title="1.1.3.2.6.1. Install">Section 1.1.3.2.6.1, “Install”</a>.                  Notice here the <span class="emphasis"><em>--delete-existing</em></span> parameter. Needed here because                  <code>cartoweb3/</code> already exists. Without it the cw3setup script issues a warning and stops.</p>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.3.2.7. Update CartoWeb from CVS</h5>
<p>To keep your CartoWeb up-to-date with the development version, simply type              the following command in the <code>CartoWeb</code> root folder:</p>
<pre>cvs -d :pserver:anonymous@dev.camptocamp.com:/var/lib/cvs/public update</pre>
<p class="warning">
<h3 class="title">Warning</h3>
<p>This may have some serious effects on your existing developments,                it is recommended you backup the CartoWeb root folder and all subforders before execution.</p>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.1.4. Windows Installation</h3>
<p class="sect3">
<p class="titlepage">
<h4 class="title">1.1.4.1. Windows Install with Win32 Installer (Recommended)</h4>
<p class="itemizedlist">
<ul>
<li>               Download the WAMP installer at <a href="http://www.wampserver.com/">http://www.wampserver.com/</a>. Double-click on the executable to launch it. This will install Apache with PHP5.</li>
<li>               Download the CartoWeb installer at <a href="http://cartoweb.org/downloads.html">http://cartoweb.org/downloads.html</a>. Double-click on the executable to launch it. This will install MapServer and CartoWeb.</li>
<li>Reboot Windows when prompted.</li>
<li>               That's it! Point your browser to <a href="http://localhost/cartoweb3/htdocs/client.php">http://localhost/cartoweb3/htdocs/client.php</a>.</li>
<li>              An installer for the demo data is available as well. Download it at <a href="http://cartoweb.org/downloads.html">http://cartoweb.org/downloads.html</a> and double-click on the executable to launch it. This will only install the demo data, CartoWeb must have been previously installed.</li>
</ul>
<p class="warning">
<h3 class="title">Warning</h3>
<p>Do not forget to restart your web server (WAMP &#62; Services &#62; Restart Apache) after installing CartoWeb!</p>
<p>Once it is installed, you can modify CartoWeb setup with the command-line script <code>cw3setup.php</code> (<a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.setup" title="1.1.3. Command Line Installation">Section 1.1.3, “Command Line Installation”</a>) from either a DOS or a Cygwin prompt. See <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.win32.setup" title="1.1.4.3. CartoWeb Setup">Section 1.1.4.3, “CartoWeb Setup”</a> for more info about how to use those interfaces.</p>
<p class="sect3">
<p class="titlepage">
<h4 class="title">1.1.4.2. Windows Manual Install</h4>
<p>Instructions for Apache/PHP and MapServer installation are given in <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/appendix.windows_manual_install.html" title="Appendix B. Apache &#38; Mapserver Windows Manual Installation">Appendix B, <em>Apache &#38; Mapserver Windows Manual Installation</em></a></p>
<p>Then download CartoWeb as described above (<a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.download" title="1.1.2. CartoWeb Download">Section 1.1.2, “CartoWeb Download”</a>).</p>
<p>Eventually set CartoWeb up with the command-line script <code>cw3setup.php</code> (<a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.setup" title="1.1.3. Command Line Installation">Section 1.1.3, “Command Line Installation”</a>) from either a DOS or a Cygwin prompt. See <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.win32.setup" title="1.1.4.3. CartoWeb Setup">Section 1.1.4.3, “CartoWeb Setup”</a> for more info about how to use those interfaces.</p>
<p class="sect3">
<p class="titlepage">
<h4 class="title">1.1.4.3. CartoWeb Setup</h4>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.4.3.1. CartoWeb Setup with DOS</h5>
<p>Open a command prompt (Start menu &#62; Run &#62; "cmd") and go to the CartoWeb root:</p>
<pre>cd C:\wamp\www\cartoweb3</pre>
<p>Then see <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.setup.example.basic" title="1.1.3.2.1. Basic Setup">Section 1.1.3.2.1, “Basic Setup”</a></p>
<p class="note">
<h3 class="title">Note</h3>
<p>To enable you to execute PHP scripts easily (like <em><code>php cw3setup.php --someparameters</code></em>                instead of <code>C:\wamp\php.exe cw3setup.php --someparameters</code>), set the path to the PHP binary                in your PATH environment variable (control panel &#62; system &#62; Advanced &#62; Environment Variables.                If there is no PATH variable, add a new one. If a PATH variable is already present, you can                add the path to php.exe at the end of the existing path values, but add a ";" inbetween:                path1;path2;path3):</p>
<pre>C:\wamp\php;</pre>
<p>The example above is true if the PHP binary are installed in <code>C:\wamp\php</code>.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>If you are using the demo, you need to have Gettext                 support installed, as it uses Gettext by default.                 If you used the win32 installer, Gettext is already installed, otherwise you must                  install it manually. You can get a version of Gettext for Windows there                  <a href="http://gnuwin32.sourceforge.net/packages/gettext.htm">http://gnuwin32.sourceforge.net/packages/gettext.htm</a>.                 Also set the path to the Gettext binary in your PATH environment variable.</p>
<pre>C:\Program Files\GnuWin32\bin;</pre>
<p>The example above is true if the Gettext binaries are installed in <code>C:\Program Files\GnuWin32\bin</code>.                 This is needed by the <code>po2mo.php</code> script to merge and compile the languages translation files.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>If you intend to use CVS in command line, you need to install a CVS client.                  Use <a href="http://www.wincvs.org/">WinCVS</a>                  or <a href="http://www.tortoisecvs.org/download.shtml">TortoiseCVS</a>, both                  are free Open Source clients.                  You must add the path to the CVS binary in your PATH environment variable.</p>
<pre>C:\Program Files\TortoiseCVS;</pre>
<p>The example above is true if you installed TortoiseCVS in <code>C:\Program Files\TortoiseCVS</code>.</p>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.1.4.3.2. CartoWeb Setup with Cygwin</h5>
<p>Open a Cygwin window  and go to the CartoWeb root:</p>
<pre>cd C:
cd wamp/www/cartoweb3/</pre>
<p>Then see <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.main.setup.example.basic" title="1.1.3.2.1. Basic Setup">Section 1.1.3.2.1, “Basic Setup”</a></p>
<p class="note">
<h3 class="title">Note</h3>
<p>You can download Cygwin here <a href="http://www.cygwin.com/"><em>Cygwin</em>             </a>. When you install Cygwin, be sure to select the packages <span class="emphasis"><em>tar</em></span>              (or <span class="emphasis"><em>unzip</em></span>) and <span class="emphasis"><em>cvs</em></span>. You can also install the              <span class="emphasis"><em>gettext-devel</em></span> package, so you wont need to get an external gettext installation later.             If you have already installed Cygwin, type the following command to see what package are currently installed.</p>
<pre>cygcheck -c</pre>
<p>If the packages mentioned above are not present, run Cygwin setup again              and add the missing packages.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>To enable you to execute PHP scripts easily, set the path to the PHP binary in your              <code>.bashrc</code> (in <code>C:\cygwin\home\Administrator\</code> by default):</p>
<pre>export PATH=$PATH:/cygdrive/c/wamp/php</pre>
<p>The example above is true if the PHP binary are installed in <code>c:\wamp\php</code>.</p>
<p>If you do not want to install the <span class="emphasis"><em>cvs</em></span> and <span class="emphasis"><em>gettext</em></span> Cygwin package,              you need to add also the path to the external CVS and gettext binaries.</p>
<pre>export PATH=$PATH:/cygdrive/c/program Files/GnuWin32/bin
export PATH=$PATH:/cygdrive/c/program Files/TortoiseCVS</pre>
<p>See the note in              <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html#user.install.win32.installer.dos" title="1.1.4.3.1. CartoWeb Setup with DOS">Section 1.1.4.3.1, “CartoWeb Setup with DOS”</a></p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">1.2. Demos</h2>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.2.1. Introduction</h3>
<p>A few demos are embedded in CartoWeb to demonstrate the range of functionalities that CartoWeb offers and give users examples on how to implement them:</p>
<p class="itemizedlist">
<ul>
<li><span class="emphasis"><em>demoCW3</em></span>: this is an overview of the standard functionalities              that are somehow visible for an end-user in CartoWeb,</li>
<li><span class="emphasis"><em>demoPlugins</em></span>: it shows the new functionalities that              are available in latest CartoWeb versions,</li>
<li><span class="emphasis"><em>demoEdit</em></span>: a simple demonstration of the geographical objects              edition and persistent storage tools.</li>
</ul>
<p>Demo data are freely downloadable. Next section explains how to install them.          Configuration and programming details are then described.</p>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.2.2. Installation</h3>
<p>Before installing these demos, you need to have a working CartoWeb installation. You can refer to the previous chapters how to install it.</p>
<p>To install the demoCW3 project, you need to gather the data by launching the <span class="emphasis"><em>cw3setup.php</em></span> with the <span class="emphasis"><em>--fetch-demo</em></span> option.</p>
<p>On the other hand, the demoPlugins project uses plugins that work with databases. Consequently some databases settings and configuration are required. We describe here how to install these databases and how to use <span class="emphasis"><em>cw3setup.php</em></span>.</p>
<p>Step by step guide:</p>
<p class="orderedlist">
<ol>
<li><strong>Install PostgreSQL with PostGIS support. </strong>               <span class="emphasis"><em>Prerequisite</em></span>: Postgresql &#62;= 8.0
<p class="note">
<h3 class="title">Note</h3>
<p>If you are on Debian, you can have a look at <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/appendix.debian_mapserver.html" title="Appendix A. Mapserver Debian Installation">Appendix A, <em>Mapserver Debian Installation</em></a></li>
<li><strong>Create a PostgreSQL database using the following command: </strong>
<pre>$ createdb demo_plugins</pre>
</li>
<li><strong>Integrate PostGIS functionalities in this database. </strong>               Typically, you can type:
<pre>$ createlang plpgsql demo_plugins
$ psql -d demo_plugins -f lwpostgis.sql
$ psql -d demo_plugins -f spatial_ref_sys.sql</pre>
<p class="note">
<h3 class="title">Note</h3>
<p><span class="emphasis"><em>psql</em></span> is a terminal-based front-end for PostgreSQL. It enables you to type                 in queries interactively, issue them to PostgreSQL, and see the query results.                 Don't forget to specify its location on your system to use it.                 If the <span class="emphasis"><em>lwpostgis.sql</em></span> and <span class="emphasis"><em>                 spatial_ref_sys.sql</em></span> files aren't in the current directory, you have to specify their path.</li>
<li><strong>Create tables used by the locate plugin to allow you to do a recenter             on features by searching their names. </strong>                 To do so, you should export the free downloadable layers <span class="emphasis"><em>airport, agglo,                district</em></span> and <span class="emphasis"><em>town</em></span> in PostgreSQL/PostGIS tables by typing                the following command:
<pre>$ shp2pgsql -I aerofacp.shp airport &#62; /tmp/airport.sql
$ psql -d demo_plugins -f /tmp/airport.sql

$ shp2pgsql -I builtupa.shp agglo &#62; /tmp/agglo.sql
$ psql -d demo_plugins -f /tmp/agglo.sql

$ shp2pgsql -I polbnda.shp district &#62; /tmp/district.sql
$ psql -d demo_plugins -f /tmp/district.sql

$ shp2pgsql -I mispopp.shp town &#62; /tmp/town.sql
$ psql -d demo_plugins -f /tmp/town.sql</pre>
<p class="note">
<h3 class="title">Note</h3>
<p><span class="emphasis"><em>shp2pgsql</em></span> is a command-line program that exports a shapefile into SQL commands.                 Don't forget to specify its location on your system to use it.                 You have to specify the path to the shapefiles if they aren't in the current directory.</li>
<li><strong>Execute <code>cw3setup.php</code>. </strong>               file, with the <span class="emphasis"><em>--fetch-demo</em></span> option to download geographical data.</li>
<li><strong>cw3setup.php Options. </strong>               To finish demoPlugins installation, you will need to launch the <code>cw3setup.php</code>               with the <span class="emphasis"><em>--config-from-file</em></span> parameter pointing to a property file                containing database configuration informations. Such a file is provided in the                <code>cartoweb3/projects/demoPlugins/demo.properties</code> file. You need to edit this file               and change the parameter to match your environment. In particular the <span class="emphasis"><em>DB_HOST</em></span>,                <span class="emphasis"><em>DB_USER</em></span>, <span class="emphasis"><em>DB_PASSWD</em></span> and <span class="emphasis"><em>DB_PORT</em></span> options               need to match your database access configuration.               <span class="emphasis"><em>DB_LOCATE_NAME</em></span> must be set to the name               of the database for the locate plugin.               This file contains comments about the description of each variables.               Here's an example how to call the <span class="emphasis"><em>cw3setup.php</em></span> script with the                <span class="emphasis"><em>--config-from-file</em></span> option.
<pre>php cw3setup.php --install --base-url http://www.example.com/cartoweb
                --config-from-file projects/demoPlugins/demo.properties</pre>
</li>
</ol>
<p class="note">
<h3 class="title">Note</h3>
<p>Routing fonctionnalities are also integrated in this demo. But they need a  more advanced configuration         and the Pgdijkstra module installed in the database, so they aren't integrated in the basic installation.         The steps to integrate routing fonctionnalities and create database tables are described in next section.</p>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.2.3. Routing specific installation</h3>
<p class="itemizedlist">
<ul>
<li><strong>Install the Pgdijkstra PostgreSQL module. </strong>
<p class="note">
<h3 class="title">Note</h3>
<p>To do so,</p>
<p class="itemizedlist">
<ul>
<li>                         if you are on Debian, you can directly install the Pgdijkstra PostgreSQL extension module.                         To do so, you can have a look at <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/appendix.debian_mapserver.html" title="Appendix A. Mapserver Debian Installation">Appendix A, <em>Mapserver Debian Installation</em></a>.</li>
<li>                         instead, you can download the Pgdijkstra Routing Module file and follow the instructions                         given in the routing module README file at <a href="http://www.cartoweb.org/contribs.html">http://www.cartoweb.org/contribs.html</a>.</li>
</ul>
</li>
<li><strong>Execute the <span class="emphasis"><em>dijkstra.sql</em></span> file to install the functions in                your database by typing: </strong>
<pre>$ psql -d demo_plugins -f dijkstra.sql</pre>
</li>
<li><strong>If you have PostGIS installed, you should launch <span class="emphasis"><em>dijkstra_postgis.sql</em></span> : </strong>
<pre>$ psql -d demo_plugins -f dijkstra_postgis.sql</pre>
</li>
<li><strong>Import Europe road geodata in PostGIS, create its graph structure and configure                plugin routing database. </strong>               To do so, simply execute the <span class="emphasis"><em>demo_routing.sql</em></span> file, located                in the <code>&#60;CARTOWEB_HOME&#62;/projects/demoPlugins/server_conf/sql</code> directory.
<p class="note">
<h3 class="title">Note</h3>
<p>These steps are detailed in the next section.</li>
<li><strong>Edit the <code>cartoweb3/projects/demoPlugins/demo.properties</code> file. </strong>                 and uncomment the line beginning with <span class="emphasis"><em>;ROUTING_PLUGINS</em></span></li>
<li><strong>Execute <code>cw3setup.php</code>. </strong>                 file, with the <span class="emphasis"><em>--config-from-file</em></span> option as                 described in the previous steps.</li>
</ul>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.2.4. Locate Plugin specific installation</h3>
<p>This plugin allows user to search features by their names, and recenter on them.</p>
<p>By typing the first letters of a name, user is given a list of corresponding         names. Clicking on one of them recenters the map on it.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>In the <code>locate.ini</code>, you also need to specify the layers on which you want to do a search         by name and the sql statements to request the database.</p>
<p class="tip">
<h3 class="title">Tip</h3>
<p>Ensure that the tables have the correct privileges (GRANT SELECT) in          the database.</p>
<p class="sect2">
<p class="titlepage">
<h3 class="title">1.2.5. Plugins extensions further information</h3>
<p>The aim of this part is to give you further informations on creation of demoPlugins and          demoEdit plugins extensions. If you create a new plugin or adapt an existing one, we guess          it will be helpful to take these plugins extensions for example or use one of these two          resources:</p>
<p class="itemizedlist">
<ul>
<li>               User HowTo: <a href="http://www.cartoweb.org/cwiki/HowTo">http://www.cartoweb.org/cwiki/HowTo</a>,</li>
<li>               Dev tutorial new plugins part: <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html" title="2. New Plugins">Chapter 2, <em>New Plugins</em></a>.</li>
</ul>
<p class="sect3">
<p class="titlepage">
<h4 class="title">1.2.5.1. demoRouting Extension</h4>
<p>The routing module is a set of functions that compute a shortest path from a set of edges and vertices.           Some functions are provided for importing data from geometric tables, and for generating results           as geometries.</p>
<p class="note">
<h3 class="title">Note</h3>
<p>For more information on these functions, you can have a look to the routing module README file              <a href="http://www.cartoweb.org/downloads/pgdijkstra/README.txt">http://www.cartoweb.org/downloads/pgdijkstra/README.txt</a>.</p>
<p>This section explains the main steps to integrate the routing fonctionnalities in a custom application.           We describe the steps followed to install the routing demo. To make short, we used an Europe roads shapefile,           imported it in PostGIS, generated the graph tables and configured files to suggest a search of the shortest           path between two European towns.</p>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.2.5.1.1. Europe Road Geodata Importation in PostGIS</h5>
<pre>$ shp2pgsql -I roadl.shp roads_europe &#62; /tmp/roadl.sql
$ psql -d demo_plugins -f /tmp/roadl.sql
# Only lauch the following commmands if you did not import the town table already
$ shp2pgsql -I mispopp.shp town &#62; /tmp/town.sql
$ psql -d demo_plugins -f /tmp/town.sql</pre>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.2.5.1.2. Graph Importation</h5>
<p>The first step is to add needed columns to the table roads_europe. To do so, you can type:</p>
<pre>$ ALTER TABLE roads_europe ADD COLUMN source_id int;
$ ALTER TABLE roads_europe ADD COLUMN target_id int;
$ ALTER TABLE roads_europe ADD COLUMN edge_id int;
-- next line is to work around a pgdijkstra bug in update_cost_from_distance (fixed in latest CVS)
$ ALTER TABLE roads_europe RENAME id TO id_old;</pre>
<p>You can then fill the columns <span class="emphasis"><em>source_id</em></span> and <span class="emphasis"><em>target_id</em></span> with the              "assign_vertex_id" function.</p>
<pre>$ SELECT assign_vertex_id('roads_europe', 1);</pre>
<p>Here is the content of the roads_europe table:</p>
<pre>$ SELECT gid, source_id, target_id, edge_id, AStext(the_geom) FROM roads_europe limit 3;

  gid  &#124; source_id &#124; target_id &#124; edge_id &#124;                              AStext
-------+-----------+-----------+---------+----------------------------------------------
 13115 &#124;     11051 &#124;     11099 &#124;      14 &#124; MULTILINESTRING((1062096.06 4861316.234,...))
 12869 &#124;     10918 &#124;     10916 &#124;     267 &#124; MULTILINESTRING((250681.597 4779596.532,...))
 12868 &#124;     10918 &#124;     10913 &#124;     268 &#124; MULTILINESTRING((250681.597 4779596.532,...))
(3 lignes)</pre>
<p>But if the data quality is poor, you need to delete the duplicates edges (they have the same             source-target pairs of vertices).             For example, to check that you have duplicated edges, you can type:</p>
<pre>$ SELECT * FROM (SELECT source_id, target_id, count(*) AS c FROM roads_europe group by
source_id, target_id order by c)
AS foo where foo.c = 2;</pre>
<p>If there is duplicated edges, to delete one of two rows, you can type:</p>
<pre>$ CREATE TABLE doublons AS SELECT * FROM roads_europe WHERE gid  in
(SELECT gid FROM (SELECT DISTINCT on (source_id, target_id) source_id, gid
FROM roads_europe) AS doublon);
$ DELETE FROM roads_europe;
$ INSERT INTO roads_europe (SELECT * FROM doublons);
$ DROP TABLE doublons;</pre>
<p>The following step is to create and fill the edges and vertices tables of the resulting graph.              To do so, you can use "create_graph_tables" function.</p>
<pre>$ SELECT create_graph_tables('roads_europe', 'int4');</pre>
<pre>SELECT * FROM roads_europe_edges LIMIT 3;
 id &#124; source &#124; target &#124; cost &#124; reverse_cost
----+--------+--------+------+--------------
  1 &#124;      1 &#124;      2 &#124;      &#124;
  2 &#124;      3 &#124;      3 &#124;      &#124;
  4 &#124;      2 &#124;      2 &#124;      &#124;
(3 rows)</pre>
<p>We can see that it contains NULL values for the cost column.              The function update_cost_from_distance can update the cost column with             the distance of the lines contained in the geometry table, attached to             each edge:</p>
<pre>$ SELECT update_cost_from_distance('roads_europe');</pre>
<p>The costs are now:</p>
<pre> id &#124; source &#124; target &#124;       cost       &#124; reverse_cost
----+--------+--------+------------------+--------------
  1 &#124;      1 &#124;      2 &#124; 6857.46585793103 &#124;
  2 &#124;      3 &#124;      4 &#124; 37349.9592156392 &#124;
  3 &#124;      5 &#124;      6 &#124; 14040.5673116933 &#124;
(3 lignes)</pre>
<p>Then you need to add the column which will contain the town labels,             which will be shown in the drop-down list for selecting the two             points of a path.</p>
<p>The label information is contained in the <code>roads</code>             table which was originally imported using the              <span><strong>shp2pgsql</strong></span> utility. The following             commands will create a temporary table, fill it with the town             information, and then update the vertices table. The towns contained             in the shapefile may not be on the exact same point that the intersections             of the roads. Thus, all intersections which are in a distance             less that 2000 meters are associated to the town label. This distance             may be adjusted according to the dataset you are using.</p>
<pre>$ CREATE TABLE roads_source_town AS
   SELECT DISTINCT t.txt, source_id, distance(PointN(r.the_geom, 1), t.the_geom) AS d
     FROM roads_europe r, town t, roads_europe_vertices
     WHERE t.txt != 'UNK' AND distance(PointN(r.the_geom, 1), t.the_geom) &#60; 2000
      AND geom_id = source_id ORDER BY t.txt, d;
$ CREATE TABLE roads_source_town_uniq AS
   SELECT * FROM roads_source_town a WHERE a.txt IN
     (SELECT b.txt FROM roads_source_town b where a.txt = b.txt LIMIT 1)
     AND a.d IN (SELECT b.d FROM roads_source_town b WHERE a.txt = b.txt LIMIT 1);
$ ALTER TABLE  roads_europe_vertices ADD COLUMN txt character varying(50);
$ SELECT AddGeometryColumn('','roads_europe_vertices','the_geom','-1','POINT',2);
$ UPDATE roads_europe_vertices SET txt = (SELECT DISTINCT txt
   FROM roads_source_town_uniq
    WHERE roads_europe_vertices.geom_id = roads_source_town_uniq.source_id);
-- clean the temporary tables
$ DROP TABLE roads_source_town;
$ DROP TABLE roads_source_town_uniq;</pre>
<p>The last step is to fill the geometry column of the vertices table:</p>
<pre>$ CREATE TABLE roads_europe_vertices_geom AS
    SELECT v.id, v.geom_id, v.txt,startPoint(geometryn(r.the_geom, 1)) AS
      the_geom FROM roads_europe r LEFT JOIN roads_europe_vertices v ON v.geom_id = r.source_id;
$ INSERT INTO roads_europe_vertices_geom
    SELECT v.id, v.geom_id, v.txt, endPoint(geometryn(r.the_geom, 1)) AS the_geom
      FROM roads_europe r LEFT JOIN roads_europe_vertices v ON v.geom_id = r.target_id;
$ DELETE FROM roads_europe_vertices;
$ INSERT INTO roads_europe_vertices SELECT DISTINCT ON (id) * FROM roads_europe_vertices_geom;
$ DROP TABLE roads_europe_vertices_geom;</pre>
<p>Now, all is set up correctly for using the shortest path function on these data.              But to include the routing fonctionnalities in a custom project, we also must respect some rules              dictated by the routing plugin.</p>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.2.5.1.3. Routing Plugin Database Configuration</h5>
<p>The two things to do are to:</p>
<p class="itemizedlist">
<ul>
<li>                   create the routing results table. In this example the table is routing_results.
<pre>$ CREATE TABLE routing_results (
    results_id integer,
    "timestamp" bigint,
    gid integer
  );
$ SELECT AddGeometryColumn('','routing_results','the_geom','-1',
'MULTILINESTRING',2);</pre>
</li>
<li>                   create the 'routing_results_seq' sequence.
<pre>$ CREATE SEQUENCE routing_results_seq
    INCREMENT 1
    MINVALUE 1
    MAXVALUE 9223372036854775807
    START 1
    CACHE 1;</pre>
</li>
</ul>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.2.5.1.4. Mapfile Configuration</h5>
<p>In the mapfile, you must include the routing layer, its connection to the database, a symbology             for the route and a first route using a unique identifier.             The data parameter will be overwritten by the routing plugin to draw the route chosen by the end-user.             Example:</p>
<pre>LAYER
  NAME "graph"
  TYPE LINE
  TRANSPARENCY 80
  CONNECTIONTYPE postgis
    CONNECTION "user=@DB_USER@ password=@DB_PASSWD@ host=@DB_HOST@ dbname=@DB_NAME@"
    DATA "the_geom from (SELECT the_geom from routing_results) as foo using unique
    gid using srid=-1"
  TEMPLATE "t"
  CLASS
    NAME "0"
    STYLE
      SYMBOL "circle"
      SIZE 10
      COLOR 90 27 191
    END
  END
END</pre>
<p class="sect4">
<p class="titlepage">
<h5 class="title">1.2.5.1.5. General Configuration</h5>
<p>For the demo, we suggest that you select your route by starting from a town until an other town.             This is possible because for each object of a european-towns layer, we have identified the nearest              object of the roads_europe_vertices table. That is why in the demoRouting configuration there is a              client-side configuration.             Normally, in the plugin routing, client-side only allows you to type an id of object, from which to start             and an other to finish the route. No configuration is needed.             So, if you use demoRouting extension, you must specify client-side, the:</p>
<p class="itemizedlist">
<ul>
<li>postgresRoutingVerticesTable: vertices table</li>
<li>stepName: vertices table col containing informations you want to propose a choice on</li>
<li>dsn: the connexion string to the database</li>
</ul>
<p>Anyway, server-side, you must specify :</p>
<p class="itemizedlist">
<ul>
<li>the routing table (postgresRoutingTable option),</li>
<li>the routing layer in the mapfile (postgresRoutingResultsLayer option),</li>
<li>the results routing table (postgresRoutingResultsTable),</li>
<li>the connexion string to the database (dsn option).</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Create new projects in Cartoweb 3.3.0]]></title>
<link>http://bkurniawan.wordpress.com/2007/03/26/create-new-projects-in-cartoweb-330/</link>
<pubDate>Mon, 26 Mar 2007 06:57:01 +0000</pubDate>
<dc:creator>bkurniawan</dc:creator>
<guid>http://bkurniawan.id.wordpress.com/2007/03/26/create-new-projects-in-cartoweb-330/</guid>
<description><![CDATA[Development Interface &#8211;&gt; Cartoclient
Cartoweb3 Demo &#8211;&gt; Cartoweb 3 Demonstration
1.]]></description>
<content:encoded><![CDATA[<p>Development Interface --&#62; Cartoclient</p>
<p>Cartoweb3 Demo --&#62; Cartoweb 3 Demonstration</p>
<p>1.  Masuk ke dalam folder Projects di</p>
<p>c:\wamp\www\cartoweb3\projects</p>
<p>rename sampleProjects or etc menjadi newProjects (coba)</p>
<p>* Edit client.ini --&#62; mapId = coba</p>
<p>* Buka folder server_conf dan rename folder sampleProjects menjadi coba</p>
<p>2. Jalankan cmd, install newProjects</p>
<p>c:\wamp\www\cartoweb3&#62; php cw3setup.php --install --base-url http://localhost/cartoweb3/htdocs/ --profile development --projects coba</p>
<p>3. Edit mapfile di serv_conf - coba</p>
<p>coba.map, coba.ini, layers.ini</p>
<p>4. Copy location.ini dari sampleFiles ke serv_conf/coba</p>
<p>5. Tambahkan coba.php di c:\wamp\www\cartoweb3\htdocs</p>
<p>5. Done, tambahkan saja plugins jika ingin</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Konfigurasi Cartoweb]]></title>
<link>http://bkurniawan.wordpress.com/2007/03/06/konfigurasi-cartoweb/</link>
<pubDate>Tue, 06 Mar 2007 01:30:36 +0000</pubDate>
<dc:creator>bkurniawan</dc:creator>
<guid>http://bkurniawan.id.wordpress.com/2007/03/06/konfigurasi-cartoweb/</guid>
<description><![CDATA[
Get in the projects folder of Cartoweb. Rename the      sampleProject directory to the name of your]]></description>
<content:encoded><![CDATA[<p class="sect1">
<p class="titlepage">Get in the <code>projects</code> folder of Cartoweb. Rename the      <code>sampleProject</code> directory to the name of your project.</p>
<p>Edit the <code>client.ini.in</code> of this new project, and modify      the mapId parameter value with the name of your project:</p>
<pre>mapId = your_project_name</pre>
<p>Open the <code>server_conf</code> directory and rename the     <code>sampleProject</code> directory to the name of your project.</p>
<p>In this folder, two more files need to be renamed (     <code>sampleProject.map</code> and <code>sampleProject.ini</code>)     with the name of the new project.</p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.2. Setup Your Project</h2>
<p>In a command line prompt (DOS, shell), launch the <code>cw3setup.php</code>      setup script.</p>
<pre>
 cw3setup.php --install
     --base-url http://localhost/cartoweb3/htdocs/ --profile development
     --project </pre>
<p>See <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.install.html" title="1. Installation">Chapter 1, <em>Installation</em></a> for more info on the installation script.</p>
<p>If no error occured, you should be able to access your project by typing     <a href="http://localhost/cartoweb3/htdocs/client.php">http://localhost/cartoweb3/htdocs/client.php</a> in your      browser and selecting your project from the projects drop-down menu.</p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.3. Project Shortcut</h2>
<p>To make development easier, you can create a shortcut file to access    your project directly. Go in <code>cartoweb3/htdocs/</code> and copy     the file <code>demoCW3.php</code>.</p>
<p>Rename the file to any name (usually your project name). Edit the file    and replace <span class="emphasis"><em>'demoCW3'</em></span> by <span class="emphasis"><em>'your_project_name'</em></span>.    Your project is now directly available with the URL    <a href="http://localhost/cartoweb3/htdocs/your_project_name.php">http://localhost/cartoweb3/htdocs/your_project_name.php</a>. (the URL given above depends on your installation, see the previous comments about cartoclientBaseUrl and --base-url).</p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.4. Loading Data</h2>
<p>As you can see, the project you created is hopelessly empty. Then,    we'll load spatial data in it.</p>
<p>Add the following in the mapfile (<code>your_project_name.map</code>) :</p>
<pre>  LAYER
    NAME "region"
    TYPE POLYGON
    DATA "reg_france"
    TEMPLATE "ttt"
    CLASS
      NAME "region"
      STYLE
        COLOR 240 240 240
        OUTLINECOLOR 255 165 96
      END
    END
    METADATA
      "id_attribute_string" "CODE"
    END
  END</pre>
<p>And in the <code>layers.ini</code> file    (<code>server_conf/your_project_name/</code>) add the following :</p>
<pre>layers.region.className = Layer
layers.region.label = Régions
layers.region.msLayer = region</pre>
<p>And add the new layer id in the root layer children list :</p>
<pre>layers.root.children = region</pre>
<p>For more details on how to fill the layers.ini file, see    <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.layers.html" title="6. Layers">Chapter 6, <em>Layers</em></a>.</p>
<p>Also edit the <code>your_project_name.ini</code> file in a text    editor in order to set some initial mapstates such as default selected    layers.</p>
<p>Add the following :</p>
<pre>mapInfo.initialMapStates.default.layers.region.selected = true</pre>
<p>See <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.config.html#user.config.server.maps_config.initial" title="4.3.3.3. Initial Mapstates">Section 4.3.3.3, “Initial Mapstates”</a> for more    info about initialMapStates.</p>
<p>In your browser, click on the <span class="emphasis"><em>reset_session</em></span> button    and you should now see the France regions.</p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.5. Location Parameters</h2>
<p>Move the location.ini file you will find in the sampleFiles folder into    the <code>server_conf/your_project_name/</code> one.</p>
<p>This file defines some parameters such as scales or shortcuts. For more    details on how to configure those parameters, see    <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.location.html" title="7. Navigation">Chapter 7, <em>Navigation</em></a></p>
<p>Click on the reset_session button in your browser page. New elements should appear. You should be able to choose a scale and a shortcut.</p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.6. Your Own Data</h2>
<p>After that the next point is to add your own data. You should just have    to :</p>
<p class="itemizedlist">
<ul>
<li>get your data available, by default in the data folder or somewhere        else on your filesystem,</li>
<li>modify the mapfile extent,</li>
<li>modify the extent defined in the initialMapstates      (<code>your_project_name.ini</code>),</li>
<li>add layers definitions in the mapfile      (<code>your_project_name.map</code>),</li>
<li>add layers definitions in the      <code>layers.ini</code>.</li>
<li>reset the session in the browser, and get your data displayed.</li>
</ul>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.7. Outline</h2>
<p>Let's see how to load a plugin. Edit the <code>client.ini.in</code>    file (<code>client_conf/</code>) and add the outline plugin in the     list of plugins to load:</p>
<pre>loadPlugins = outline</pre>
<p>Do the same in the <code>your_project_name.ini</code> file on    server-side (<code>server_conf/your_project_name/</code>) but also    add the mapOverLay plugin :</p>
<pre>mapInfo.loadPlugins = outline, mapOverlay</pre>
<p>Move the <code>outline.ini</code> file from    <code>sampleFiles</code> to <code>server_conf/your_project_name/</code>.</p>
<p>In the mapfile (<code>your_project_name.map</code>), add the    following at the bottom of the layers definition section :</p>
<pre>  LAYER
    NAME "cartoweb_point_outline"
    TYPE POINT
    CLASS
      STYLE
        SYMBOL "circle"
        COLOR 0 0 205
        SIZE 10
      END
      LABEL
        TYPE TRUETYPE
        FONT "Vera"
        SIZE 7
        COLOR 0 0 0
        OUTLINECOLOR 255 255 255
        POSITION lc
      END
    END
  END

  LAYER
    NAME "cartoweb_line_outline"
    TYPE LINE
    TRANSPARENCY 100
    CLASS
      STYLE
        OUTLINECOLOR 255 0 0
        SYMBOL "line-dashed"
        SIZE 3
      END
      LABEL
        TYPE TRUETYPE
        FONT "Vera"
        SIZE 7
        COLOR 0 0 0
        OUTLINECOLOR 255 255 255
        ANGLE auto
        POSITION uc
      END
    END
  END

  LAYER
    NAME "cartoweb_polygon_outline"
    TYPE POLYGON
    TRANSPARENCY 60
    CLASS
      STYLE
        COLOR 255 153 0
        OUTLINECOLOR 0 0 0
      END
      LABEL
        TYPE TRUETYPE
        FONT "Vera"
        SIZE 7
        OUTLINECOLOR 255 255 255
        COLOR 0 0 0
        POSITION cc
      END
    END
  END</pre>
<p>Launch the setup script. This step is compulsary to convert    <code>.ini.in</code> files into <code>.ini</code>     configuration files read by Cartoweb.</p>
<p>By clicking on the <span class="emphasis"><em>reset_session</em></span> button in the    browser window, you should see new buttons in the toolbar and the    corresponding folder in the leftbar.</p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.8. Pdf Printing</h2>
<p>As done for the outline plugin, add <span class="emphasis"><em>"exportPdf"</em></span> to    the list of plugins to load on both client and server-side.</p>
<p>After launching the setup script and refreshing the application (reset_session), you should be able to test the new functionality as a new folder appeared in the interface. But a warning printed in the pdf file advices you to edit your <code>exportPdf.ini</code> file.</p>
<p>So move <code>exportPdf.ini</code> from    <code>sampleFiles</code> to <code>client_conf</code>. Take     care that this is a client-side configuration file. Try a new print (no     need to reset).</p>
<p>For more information on how to edit your    <code>exportPdf.ini</code> file, see <a href="http://www.cartoweb.org/doc_head/docbook/xhtml/user.pdf.html" title="12. PDF Export">Chapter 12, <em>PDF Export</em></a>.</p>
<p class="sect1">
<p class="titlepage">
<h2 class="title">C.9. Templating and Layout</h2>
<p>Create a new <code>templates</code> folder in your project    directory and move the <code>cartoclient.tpl</code> file from     <code>sampleFiles</code> to this new folder.</p>
<p>This file is the main template for CartoWeb.</p>
<p>Refresh the application in your browser (refresh button) and enjoy!</p>
<p>To customize your project even more, you may apply styles sheets.    To do so, first create a <code>htdocs</code> folder in your project    directory. In this folder, create a new folder named <code>css</code>. Then move    <code>cartoweb.css</code> and <code>folders.css</code> from    <code>sampleFiles</code> to this new folder.</p>
<p>At this step, you need to launch the setup script so that the new ressources you just created are copied or linked (depending on your OS) in a web reachable folder.</p>
<p>You can now refresh the browser and see the new colors and styles.</p>
]]></content:encoded>
</item>

</channel>
</rss>
