<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ItOpen - Open Web Solutions, WebGis Development &#187; Mapserver e mapscript</title>
	<atom:link href="http://www.itopen.it/category/programmazione/webgis/mapserver-e-mapscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itopen.it</link>
	<description>[lang_en]Open Web Solutions: WebGis, Open Source development[/lang_en][lang_it]Soluzioni WebGIS e sviluppo software Open Source[lang_it]</description>
	<lastBuildDate>Tue, 07 Feb 2012 11:18:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GIS and WebGIS at Linux Day 2007</title>
		<link>http://www.itopen.it/2007/10/31/gis-and-webgis-at-linux-day-2007/</link>
		<comments>http://www.itopen.it/2007/10/31/gis-and-webgis-at-linux-day-2007/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 20:12:43 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/2007/10/31/gis-and-webgis-at-linux-day-2007/</guid>
		<description><![CDATA[Sorry, this article is not available in english.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.itopen.it/wp-content/uploads/2007/10/logo_linuxdayd07.png" alt="Logo Linux Day 2007" align="right" /></p>
<p>Sorry, this article is not available in english.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/10/31/gis-and-webgis-at-linux-day-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A restful service for mapfile configuration</title>
		<link>http://www.itopen.it/2007/10/05/a-restful-service-for-mapfile-configuration/</link>
		<comments>http://www.itopen.it/2007/10/05/a-restful-service-for-mapfile-configuration/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 07:15:00 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/2007/10/05/a-restful-service-for-mapfile-configuration/</guid>
		<description><![CDATA[Several tools exists to help maintaining and configuring mapserver mapfiles. MapStorer is a good example. All of the available tools provide a nice GUI and a storage database adapter.


What seems to be missing at the moment is a restful service. We've started working on a project that could fill this gap.]]></description>
			<content:encoded><![CDATA[<p>Recently, we&#8217;ve been actively working on a restful mapfile configuration service.</p>
<p>The advantages of such a system are those of typical webservice:</p>
<ul>
<li>fully decoupled from the GUI, the GUI could be written in any language that talks REST</li>
<li>plain text mapfiles as the storage system</li>
</ul>
<p>The service is being written in PHP and the RESTFUL part is managed with PHP Tonic library.</p>
<p>A few examples of typical URLs:</p>
<ul>
<li>GET http://www.mymaps.com/maps &#8211; retrieve a list of mapfiles</li>
<li>POST http://www.mymaps.com/maps &#8211; creates a new mapfile with the JSON data passed on post</li>
<li>GET http://www.mymaps.com/maps/my_first_map.json &#8211; retrieve the map data as JSON</li>
<li>GET http://www.mymaps.com/maps/my_first_map.xml &#8211; retrieve the map data as XML</li>
<li>GET http://www.mymaps.com/maps/my_first_map.map &#8211; retrieve the map data as plain text mapfile</li>
<li>PUT http://www.mymaps.com/maps/my_first_map.json &#8211; alter the map with JSON data</li>
<li>PUT http://www.mymaps.com/maps/my_first_map.xml &#8211; alter the map with XML data</li>
<li>GET http://www.mymaps.com/maps/my_first_map.xml/layers &#8211; retrieve the map layers as XML</li>
<li>GET http://www.mymaps.com/maps/my_first_map.xml/layers/my_first_layer &#8211; retrieve the map layer data as XML</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/10/05/a-restful-service-for-mapfile-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MapServer 5.0 released!</title>
		<link>http://www.itopen.it/2007/09/19/mapserver-5-0-release/</link>
		<comments>http://www.itopen.it/2007/09/19/mapserver-5-0-release/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 09:34:51 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/2007/09/19/mapserver-5-0-release/</guid>
		<description><![CDATA[MapServer 5.0 was released yesterday. This new release brings a lot of enhancements and bug fixes and some back compatibility breaks. One of the most remarkable news is a rendering engine based on AGG library, this renderer significantly improves map output quality with a very good antialiasing and transparency processing.

]]></description>
			<content:encoded><![CDATA[<h2>An amazing rendering quality</h2>
<p>The MapServer development team has done a great job with this release.</p>
<p>The new AGG rendering engine allows an incredible high quality antialisaed output: the following two images are taken with MapServer 5 and MapServer 4 respectively.</p>
<div style="text-align:center">
<img src='http://www.itopen.it/wp-content/uploads/2007/09/mapserver_antialias.png' alt='MapServer 5 antialias' /><br />
<img src='http://www.itopen.it/wp-content/uploads/2007/09/mapserver_no_antialias.png' alt='MapServer 4 no antialias' />
</div>
<p>See the <a href="http://trac.osgeo.org/mapserver/browser/tags/rel-5-0-0/mapserver/HISTORY.TXT">change log</a>.</p>
<p>For a complete guide to the new features and about migrating from previous versions, take a look at the <a href="http://mapserver.gis.umn.edu/download/current/MIGRATION_GUIDE.TXT/view">MapServer 5.0 migration guide</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/09/19/mapserver-5-0-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to MapStorer</title>
		<link>http://www.itopen.it/2007/08/19/back-to-mapstorer/</link>
		<comments>http://www.itopen.it/2007/08/19/back-to-mapstorer/#comments</comments>
		<pubDate>Sun, 19 Aug 2007 17:15:56 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/2007/08/19/back-to-mapstorer/</guid>
		<description><![CDATA[Recently, after exactly one year from the beginning of my flirt with this nice mapping application, I started to code on MapStorer again.
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.itopen.it/wp-content/uploads/2007/08/logo_neu_klein.jpg" alt="MapStorer" align="right" />This time, I&#8217;ve been asked by the original authors to implement the long awaited mapfile import function. Because of me being the mind and the arm behind the new plugin system, I was the natural choice for the import plugin writing.</p>
<p>Talking about this import plugin, it is now almost complete in its first  step, mapfile parsing, while I&#8217;m in the process of writing the persistance layer. After a few unsuccessfull tests, I decided not ot use php_mapscript for mapfile parsing, both direct import into a map object and the tokenizer had too many drawbacks, so I went for writing another regular expression parser again.</p>
<p>We discussed several times about how to make MapStorer code more maintainable, the actual code is a real mess, no structure, no patterns (not even a simple front controller), no functions!!! A maintainance nightmare. Finally, after the MDB2 DB abstraction layer I introduced a few months ago, we decided to implement an ORM (Object Relational Mapping). We decided to use PEAR&#8217;s DB_DataObject since it plays well with  other PEAR packages and it&#8217;s very well documented and maintained. After a few troubles with the differences between MySQL and PostgreSQL versions, I&#8217;ve managed to implement this ORM almost completely, as usual I wrote several unit tests for the new code: I felt in love with test-driven programming long ago and never turned back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/08/19/back-to-mapstorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A mapserver KML bridge</title>
		<link>http://www.itopen.it/2007/07/09/un-ponte-tra-kml-e-mapserver-kml-bridge/</link>
		<comments>http://www.itopen.it/2007/07/09/un-ponte-tra-kml-e-mapserver-kml-bridge/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 16:41:47 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/2007/07/09/lang_itun-ponte-tra-kml-e-mapserverlang_itlang_ena-mapserver-kml-bridgelang_en/</guid>
		<description><![CDATA[


We are going to finish the writing of a kml server that reads a MapServer mapfile and with minimal or zero configuration can serve vector and raster data in kml format.

At the moment, there is limited support for line and polygon classes and styles, while icons symbols for point layers are fully functioning.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.itopen.it/wp-content/uploads/2007/07/google_earth_kml_raster.png" title="Serving Raster from MapServer WMS in Google Earth"><img src="http://www.itopen.it/wp-content/uploads/2007/07/google_earth_kml_raster.thumbnail.png" alt="Serving Raster from MapServer WMS in Google Earth" align="right" /></a></p>
<p>A simple caching mechanism is also available, since for big vector layers, processing time can be an issue.<br />
Raster layers are supported as network links to WFS MapServer.<br />
Though more testing is required, the server is basically finished and fully functional.</p>
<p><a href="http://www.itopen.it/soluzioni/kml-map-server/">See all the details &gt;&gt;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/07/09/un-ponte-tra-kml-e-mapserver-kml-bridge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A script to build the latest mapserver webgis from sources</title>
		<link>http://www.itopen.it/2007/04/24/a-script-to-build-the-latest-mapserver-webgis-from-sources/</link>
		<comments>http://www.itopen.it/2007/04/24/a-script-to-build-the-latest-mapserver-webgis-from-sources/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 07:48:31 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/?p=92</guid>
		<description><![CDATA[This is just a small script to download, configure and build mapserver and its main dependencies from sources under Linux. This HowTo assumes a basic knowledge of bash commands and the ability to edit the scripts itself and change a few configuration parameters.]]></description>
			<content:encoded><![CDATA[<p>The goal is to have latest versions of mapserver and its main dependencies.</p>
<p>The script will build:</p>
<ul>
<li>GDAL</li>
<li>PROJ</li>
<li>GEOS</li>
<li>MAPSERVER</li>
<postgis> </postgis></ul>
<h2>How it works</h2>
<p>First, all the libraries and mapserver will be downloaded from their official websites, then tey will be uncompressed and extracted on your disk, then they will be configured, built and installed one by one.</p>
<p><strong>Important note: after copying and pasting the script from this page to your PC, you will have to change “ and ″ in &#8221; in the script.</strong></p>
<p>Note that you don&#8217;t have to run the script as root, run it as a normal user, you will be prompted for a password when needed. If your distribution doesn&#8217;t use the &#8220;sudo&#8221; system, just change all &#8220;sudo&#8221; commands in the script into &#8220;su -c &#8220;.</p>
<h2>Prerequisites</h2>
<p>Building from sources means you already have installed the compiler, its tools and the header files of all the main shared libraries (zlib etc.) and have a working toolchain for compilation from sources.</p>
<p>This was tested on Linux KUbuntu, Ubuntu server and Debian.</p>
<h2>Configuration</h2>
<p>After copying the script on the disk and making it executable, you should open it with an editor and change some configuration variables.</p>
<p>More detailed instructions are in the script comments.</p>
<h2>If something goes wrong</h2>
<p>First uncomment WGET in the code if you don&#8217;t want to download all files again, then check your paths and those configured or hardcoded in the script.</p>
<p>Chek also the parameters passed to the &#8220;configure&#8221; commands in the script, maybe you don&#8217;t need all those options.</p>
<h2>Code</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Where to install: usually /usr or /usr/local</span>
<span style="color: #007800;">PREFIX</span>=<span style="color: #000000; font-weight: bold;">/</span>usr
&nbsp;
<span style="color: #666666; font-style: italic;"># Directory of PHP binary libs, in my case, was /usr/lib/php5/20051025/</span>
<span style="color: #007800;">PHPLIBDIR</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">20051025</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Uncomment for a debug build of gdal library</span>
<span style="color: #666666; font-style: italic;">#DEBUG_GDAL=1</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Activate download (deactivate if you have still downloaded)</span>
<span style="color: #007800;">WGET</span>=<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Libraries to fetch, configure, build and install</span>
<span style="color: #666666; font-style: italic;"># Adjust versions according to your needs</span>
<span style="color: #007800;">GEOS</span>=<span style="color: #ff0000;">&quot;geos-3.0.0rc4&quot;</span>
<span style="color: #007800;">GDAL</span>=<span style="color: #ff0000;">&quot;gdal-1.4.1&quot;</span>
<span style="color: #007800;">PROJ</span>=<span style="color: #ff0000;">&quot;proj-4.5.0&quot;</span>
<span style="color: #007800;">MAPSERVER</span>=<span style="color: #ff0000;">&quot;mapserver-4.10.1&quot;</span>
<span style="color: #666666; font-style: italic;"># Uncomment if you still have postgresql installed and want</span>
<span style="color: #666666; font-style: italic;"># to build postgis, adjust paths in the last code block of this file</span>
<span style="color: #666666; font-style: italic;">#POSTGIS=&quot;postgis-1.2.1&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$GEOS</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$WGET</span> = <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$GEOS</span>.tar.bz2&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>geos.refractions.net<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$GEOS</span>.tar.bz2
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xjf</span> <span style="color: #007800;">$GEOS</span>.tar.bz2
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$GEOS</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$PREFIX</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> clean
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$GDAL</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$WGET</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>download.osgeo.org<span style="color: #000000; font-weight: bold;">/</span>gdal<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$GDAL</span>.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> <span style="color: #007800;">$GDAL</span>.tar.gz
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$GDAL</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$DEBUG_GDAL</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CFG</span>=debug
<span style="color: #000000; font-weight: bold;">fi</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$PREFIX</span> <span style="color: #660033;">--with-mysql</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> clean
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$PROJ</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$WGET</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.remotesensing.org<span style="color: #000000; font-weight: bold;">/</span>proj<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$PROJ</span>.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> <span style="color: #007800;">$PROJ</span>.tar.gz
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$PROJ</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$PREFIX</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> clean
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #007800;">$PREFIX</span><span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>proj_api.h <span style="color: #007800;">$PREFIX</span><span style="color: #000000; font-weight: bold;">/</span>lib
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$MAPSERVER</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$WGET</span> = <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>cvs.gis.umn.edu<span style="color: #000000; font-weight: bold;">/</span>dist<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$MAPSERVER</span>.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> <span style="color: #007800;">$MAPSERVER</span>.tar.gz
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$MAPSERVER</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure \
<span style="color: #660033;">--with-wfs</span> \
<span style="color: #660033;">--with-wfsclient</span> \
<span style="color: #660033;">--with-wmsclient</span> \
<span style="color: #660033;">--with-proj</span>=<span style="color: #007800;">$PREFIX</span><span style="color: #000000; font-weight: bold;">/</span>lib \
<span style="color: #660033;">--with-geos</span>=<span style="color: #007800;">$PREFIX</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>geos-config \
<span style="color: #660033;">--with-gdal</span>=<span style="color: #007800;">$PREFIX</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gdal-config \
<span style="color: #660033;">--with-ogr</span>=<span style="color: #007800;">$PREFIX</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gdal-config \
<span style="color: #660033;">--with-php</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>php5 \
<span style="color: #660033;">--with-mygis</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span> \
<span style="color: #660033;">--with-postgis</span> \
<span style="color: #660033;">--with-httpd</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2 \
<span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$PREFIX</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> clean
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> mapserv <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> shp2img <span style="color: #007800;">$PREFIX</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> shptree <span style="color: #007800;">$PREFIX</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> tile4ms <span style="color: #007800;">$PREFIX</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> mapscript<span style="color: #000000; font-weight: bold;">/</span>php3<span style="color: #000000; font-weight: bold;">/</span>php_mapscript.so <span style="color: #007800;">$PHPLIBDIR</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$POSTGIS</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$WGET</span> = <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$POSTGIS</span>.tar.gz&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.postgis.org<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$POSTGIS</span>.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> <span style="color: #007800;">$POSTGIS</span>.tar.gz
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$POSTGIS</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$PREFIX</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>postgresql<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8.1</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> clean
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/04/24/a-script-to-build-the-latest-mapserver-webgis-from-sources/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Il nuovo WEBGis dei sentieri del Verbano Cusio Ossola</title>
		<link>http://www.itopen.it/2007/04/20/il-nuovo-webgis-dei-sentieri-del-verbano-cusio-ossola/</link>
		<comments>http://www.itopen.it/2007/04/20/il-nuovo-webgis-dei-sentieri-del-verbano-cusio-ossola/#comments</comments>
		<pubDate>Fri, 20 Apr 2007 08:46:30 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/2007/04/20/il-nuovo-webgis-dei-sentieri-del-verbano-cusio-ossola/</guid>
		<description><![CDATA[Dopo parecchi mesi di gestazione è on line il nuovo sito dei sentieri del Verbano Cusio Ossola. Abbiamo realizzato l'applicazione usando solo prodotti open source integrando la cartografia con un potente CMS.]]></description>
			<content:encoded><![CDATA[<h2>Il progetto</h2>
<p><img align="right" src='http://www.itopen.it/wp-content/thumb-vco_webgis.png' alt='VCO WebGIS' /></p>
<p>Il progetto, finanziato tramite un programma INTERREG dell&#8217;Unione Europea comprende partner Italiani e Svizzeri per quanto riguarda il cantone Ticino e Vallese.</p>
<p>La cartografia si basa sul rilievo della rete sentieristica tramite GPS e sul catasto sentieri del Club Alpino Italiano.</p>
<p>Il database contiene diverse centinaia di itinerari, escursionistici e alpinistici, centinaia di punti di interesse con le relative schede di dettaglio e un gran numero di strutture ricettive escursionistiche (rifugi e bivacchi) e non.</p>
<h2>Le tecnologie utilizzate</h2>
</p>
<p>Abbiamo realizzato il portale utilizzando il top dei prodotti open source disponibili per la pubblicazione su web della cartografia digitale:</p>
<ul>
<li>Mapserver</li>
<li>POSTGIS</li>
<li>p.mapper</li>
<li>PHP5</li>
</ul>
<h2>Il sito web</h2>
</p>
<p>Il sito è raggiungibile all&#8217;indirizzo <a href="http://www.vcoapiedi.net">www.vcoapiedi.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/04/20/il-nuovo-webgis-dei-sentieri-del-verbano-cusio-ossola/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Producing tiles from a GEOTIFF Raster with PHP and gdal</title>
		<link>http://www.itopen.it/2007/03/19/producing-tiles-from-a-geotiff-raster-with-php-and-gdal/</link>
		<comments>http://www.itopen.it/2007/03/19/producing-tiles-from-a-geotiff-raster-with-php-and-gdal/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 13:32:15 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>

		<guid isPermaLink="false">http://www.itopen.it/?p=84</guid>
		<description><![CDATA[How to slice a big GEOTIFF raster into smaller tiles using gdal and PHP]]></description>
			<content:encoded><![CDATA[<p>
This short script convert a single GEOTIFF raster file in smaller tiles, suitable for tileindex in MapServer.
</p>
<h2>Prerequisites</h2>
<p>
The script calls external programs such as gdalinfo and gdal_translate, hence you will need a working installation of gdal library and all the utilities that come with the library.</p>
<h2>Overviews</h2>
<p>If you also want to produce overviews at a given scale, comment out the exit line and add you desired scales to the &#8220;scales&#8221; array.</p>
<p><code lang="php"><br />
if($argc != 3){<br />
    die("Usage: {$argv[0]} filename desired_square_dimension_in_map_units\n");<br />
}</p>
<p>$file_name = $argv[1];<br />
$square    = $argv[2];</p>
<p>$info = `gdalinfo $file_name`;</p>
<p>foreach(split("\n", $info) as $i){<br />
    if(strpos($i, 'Lower Left') !== false){<br />
        preg_match_all('/\d+\.\d+/', $i, $res);<br />
        $ll_x = $res[0][0];<br />
        $ll_y = $res[0][1];<br />
    }<br />
    if(strpos($i, 'Upper Right') !== false){<br />
        preg_match_all('/\d+\.\d+/', $i, $res);<br />
        $ur_x = $res[0][0];<br />
        $ur_y = $res[0][1];<br />
    }<br />
}</p>
<p>// Extent<br />
$x_ext = $ur_x - $ll_x;<br />
$y_ext = $ur_y - $ll_y;</p>
<p>// Fit square<br />
$iter_x = floor($x_ext / $square);<br />
$iter_y = floor($y_ext / $square);</p>
<p>$square_x = floor($x_ext / $iter_x);<br />
$square_y = floor($y_ext / $iter_y);</p>
<p>// Iter<br />
$iter_x = floor($x_ext / $square_x);<br />
$iter_y = floor($y_ext / $square_y);</p>
<p>$tiles_number = $iter_x * $iter_y;</p>
<p>print "Coords ($ll_x, $ll_y) - ($ur_x, $ur_y)\n";<br />
print "Ext  ($x_ext) - ($y_ext)\n";<br />
print "Producing $iter_x x $iter_y = $tiles_number tiles for $square_x x $square_y\n";</p>
<p>for($ix = 0 ; $ix < $iter_x; $ix++){<br />
    $tile_llx = $ix * $square_x + $ll_x;<br />
    $tile_urx = $tile_llx + $square_x;<br />
    for($iy = 0 ; $iy < $iter_y; $iy++){<br />
        $tile_lly = $iy * $square_y + $ll_y;<br />
        $tile_ury = $tile_lly + $square_y;<br />
        print "Tiling \t($ix, $iy)\t($tile_llx, $tile_lly) - ($tile_urx, $tile_ury) \n";<br />
        // Tile filename<br />
        //$tilename = "$tile_llx-$tile_lly-$tile_urx-$tile_ury.tif"<br />
        // Proj wants UL LR<br />
        $tilename = "$tile_llx-$tile_ury-$tile_urx-$tile_lly.tif";<br />
        `gdal_translate -of GTiff -projwin $tile_llx $tile_ury $tile_urx $tile_lly $file_name $tilename`;<br />
    }<br />
}</p>
<p>// Remove exit and define scales if you want to produce overviews at defined scales<br />
exit();</p>
<p>// Build overviews<br />
$scales = array(1000000, 500000);</p>
<p>// Conversion<br />
$dpi = 72;<br />
// Screen resolution in meters: pixel/meter of screen<br />
$dpm = 0.0254 / $dpi;</p>
<p>$scale_pix = array();<br />
foreach($scales as $s){<br />
    $scale_pix[] = $s * $dpm;<br />
}</p>
<p>//var_dump($scale_pix);<br />
$i = 0;<br />
foreach($scale_pix as $sp){<br />
    $ovfile = 'OVV-' . $scales[$i++] . '-' . floor($sp) .'.tif';<br />
    `gdalwarp -of GTiff -rc -tr  $sp $sp $file_name $ovfile`;<br />
}</p>
<p></code></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/03/19/producing-tiles-from-a-geotiff-raster-with-php-and-gdal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Masptorer &#8211; P.mapper webgis plugin released</title>
		<link>http://www.itopen.it/2007/03/07/masptorer-pmapper-webgis-plugin-released/</link>
		<comments>http://www.itopen.it/2007/03/07/masptorer-pmapper-webgis-plugin-released/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 09:05:28 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/?p=82</guid>
		<description><![CDATA[I've commited into mapstorer svn a new plugin that allows automatic 
configuration of p.mapper webgis 2.1.1 from mapstorer maps (an independent 
installation of p.mapper 2.1.1 is required).]]></description>
			<content:encoded><![CDATA[<p>
Although the current version of .pmapper use different configuration files, it<br />
should not be too difficult to update the plugin for the current p.mapper<br />
version.</p>
<h2>Features</h2>
</p>
<p>
This plugin adds the following features:</p>
<ul>
<li>Pmapper configuration</li>
<li>Automatic reference map</li>
</ul>
<p>
This plugin handles p.mapper 2.1.1 .ini configuration file. It also adds a<br />
trigger on mapstorer export mapfile function that will keep p.mapper .ini<br />
file and mapfile in sync.
</p>
<p>
Do not forget to export the mapfile and restart p.mapper to activate the new<br />
configuration.
</p>
<p>
Configuration files for p.mapper are saved on a mapfile base: the mapfile name<br />
({MAPFILE_NAME}) is used as a base for creating configuration directory<br />
(called &#8220;project&#8221; in p.mapper slang).
</p>
<p>
The p.mapper .ini file will be saved as config_{MAPFILE_NAME}.ini and the<br />
custom js and php files are saved in config/{MAPFILE_NAME}/ directory. These<br />
directories must be writeable by the web server user.</p>
<h2>Warnings</h2>
</p>
<p>
Warning: switching off layer queryability could provoke loss of data in case<br />
you have set up a &#8220;real&#8221; template file path for the layer, in such case, the<br />
content of the TEMPLATE field will be cancelled.
</p>
<p>
Warning: enabling automatic reference map creation, will overwrite existing<br />
reference maps whenever you update map object record.
</p>
<p>
Warning: this plugin is ALPHA quality code (works for me), and is not<br />
supported.
</p>
<h2>Download</h2>
<p>Find it in the latest MapStorer SVN: <a href="http://www.mapstorer.org/">www.mapstorer.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2007/03/07/masptorer-pmapper-webgis-plugin-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>itOpen  joins MapStorer development team</title>
		<link>http://www.itopen.it/2006/10/25/itopen-joins-mapstorer-development-teamitopen-entra-nel-team-di-sviluppo-di-mapstorer/</link>
		<comments>http://www.itopen.it/2006/10/25/itopen-joins-mapstorer-development-teamitopen-entra-nel-team-di-sviluppo-di-mapstorer/#comments</comments>
		<pubDate>Wed, 25 Oct 2006 07:02:27 +0000</pubDate>
		<dc:creator>Alessandro Pasotti</dc:creator>
				<category><![CDATA[Mapserver e mapscript]]></category>
		<category><![CDATA[WebGis]]></category>

		<guid isPermaLink="false">http://www.itopen.it/?p=71</guid>
		<description><![CDATA[With a contribution of more than 4000 code lines, ItOpen enters in the development team of MapStorer, a Web front-end for mapserver mapfiles creation]]></description>
			<content:encoded><![CDATA[<p><img align="right" src='http://www.itopen.it/wp-content/mapstorere.jpg' alt='mapstorer logo' /></p>
<div>The foss4g meeting in Lausanne was a unique opportunity to meet other <a href="http://www.mapstorer.org">MapStorer</a> developers and to discuss the new code contributions and the poject roadmap.
</div>
<p>It the last few months, ItOpen contributed to MapStorer project in the following areas:</p>
<ul>
<li>new PEAR::MDB2 database abstracion layer and PostgreSQL port</li>
<li>complete rewrite of the configuration system</li>
<li>implementation of the authentication system</li>
<li>new AJAX based plugin system that allows to add new functionality without altering the core</li>
<li>DB backup plugin</li>
<li>PostGIS plugin</li>
<li>many bug fix</li>
</ul>
<p>
After this big code contribution, ItOpen is now in the development team and a proud member of the steering comitee of MapStorer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itopen.it/2006/10/25/itopen-joins-mapstorer-development-teamitopen-entra-nel-team-di-sviluppo-di-mapstorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

