<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>It&#039;s Khayer, Bangladesh</title>
	<atom:link href="http://khayer.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://khayer.wordpress.com</link>
	<description>There are many GIS and General programming solution and some other aimless writing</description>
	<lastBuildDate>Fri, 27 Jan 2012 03:15:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='khayer.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>It&#039;s Khayer, Bangladesh</title>
		<link>http://khayer.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://khayer.wordpress.com/osd.xml" title="It&#039;s Khayer, Bangladesh" />
	<atom:link rel='hub' href='http://khayer.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Open Layer with GeoSever</title>
		<link>http://khayer.wordpress.com/2010/07/14/open-layer-with-geosever/</link>
		<comments>http://khayer.wordpress.com/2010/07/14/open-layer-with-geosever/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 07:50:42 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Openlayer]]></category>
		<category><![CDATA[geoserver with openlayer]]></category>
		<category><![CDATA[openlayer geoserver]]></category>
		<category><![CDATA[openlayer with geosever]]></category>
		<category><![CDATA[openlayer WMSGetFeatureInfo]]></category>
		<category><![CDATA[WMSGetFeatureInfo]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=196</guid>
		<description><![CDATA[GeoSever is very good map repository. It supports most of the request including WMS. Open layer work well with Geoserver. Here I try to give a sample to use openlayer with Geoserver especially for beginner. Add MapSever WMS Layer: The main goal is that we will add geoserver layer as wms in the open layer. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=196&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>GeoSever is very good map repository.  It supports most of the request including WMS. Open layer work well with Geoserver. Here I try to give a sample to use openlayer with Geoserver especially for beginner.</p>
<p>Add MapSever WMS Layer:<br />
The main goal is that we will add geoserver layer as wms in the open layer. So the layer definition should be,</p>
<p><pre class="brush: xml;">
var dist = new OpenLayers.Layer.WMS(
	&quot;dist_GEO - Tiled&quot;, &quot;http://localhost:8088/geoserver/wms&quot;,
	{
		srs: 'EPSG:4326',
		width: '395',
		styles: '',
		height: '512',
		layers: 'bdadmin:dist_GEO',
		format: format,
		tiled: 'true',
		tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,
		isBaseLayer: true,
		visibility: true
	},
	{
		buffer: 0,
		displayOutsideMaxExtent: true
		}
	);
</pre></p>
<p>This will include Bangladesh district boundary as base wms layer. Note that we set the srs value wgs84 projection of our data. The example geoserver is running on 8088 port.</p>
<p><a href="http://khayer.files.wordpress.com/2010/07/screeen.jpg"><img class="alignnone size-full wp-image-197" title="screeen" src="http://khayer.files.wordpress.com/2010/07/screeen.jpg?w=420&#038;h=305" alt="" width="420" height="305" /></a></p>
<p>Now we add the road layer from wms as openlayer overlay layer.</p>
<p><pre class="brush: xml;">
var bdhw = new OpenLayers.Layer.WMS(
	&quot;Bangladesh Highway&quot;,
	&quot;http://localhost:8088/geoserver/wms&quot;,
	{
		transparent: 'TRUE',
		srs: 'EPSG:4326',
		layers: 'bdadmin:rds_nr_geo',
		format: format,
		isBaseLayer: false,
		visibility: true
	}
);
 </pre></p>
<p>Now for implantation of identity feature, we need to apply some ticks. We need call a java script ajax request in click/hover event for WMSGetFeatureInfo request to Geserver.  In this point, most of the develop have to face problem in cross domain. If hosting apache and geo server(tomcat) listening in sampe pc but different host, there have to take special care for cross domain ajax call. I wrote a post regarding this issue here. Please read this article first to proceed to the next steps.</p>
<p><pre class="brush: xml;">
infoControls = {
            click: new OpenLayers.Control.WMSGetFeatureInfo({
             url: 'http://localhost:8088/geoserver/wms',
             title: 'Identify features by clicking',
             layers: [bdhq,bdhw,dist],
             queryVisible: true,
	infoFormat:'application/vnd.ogc.gml'
           	})
};
</pre></p>
<p>Here we set request url to http://localhost:8088/geoserver/wms . but it cannot directly call the request. We have to go via proxy request. So, write a proxy script and bypass the request.<br />
File: geoproxy.php</p>
<p><pre class="brush: php;">
&lt;?php
$url=$_GET[&quot;url&quot;];
$res = file_get_contents($url);
echo $res;
?&gt;
</pre></p>
<p>Now we define proxy in openlayer at top,<br />
OpenLayers.ProxyHost = &#8220;geoproxy.php?url=&#8221;;</p>
<p><a href="http://khayer.files.wordpress.com/2010/07/screeen2.jpg"><img class="alignnone size-full wp-image-198" title="screeen2" src="http://khayer.files.wordpress.com/2010/07/screeen2.jpg?w=420&#038;h=305" alt="" width="420" height="305" /></a></p>
<p>Below the full source code is available,</p>
<p><pre class="brush: xml;">

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
    &lt;title&gt;MapServer Layer&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;theme/default/style.css&quot; type=&quot;text/css&quot; /&gt;
    &lt;style&gt;
		.opmap
		{
			height:500px;
			width:550px;
		}
		/* The map and the location bar */
		#map {
			clear: both;
			position: relative;
			width: 400px;
			height: 450px;
			border: 1px solid black;
		}
		.mypopuphtml{
			 padding-left:5px;
			 padding-top:0px;
			 padding-bottom:0px;
			 padding-right:5px;
			 font-family:Arial;
			 font-size:8pt;
			 background-color:white;
		}

    &lt;/style&gt;
    &lt;script src=&quot;OpenLayers.js&quot;&gt;&lt;/script&gt;

    &lt;script defer=&quot;defer&quot; type=&quot;text/javascript&quot;&gt;

        var zoom = 5;
        var map;
		var infoControls;
		var highlightlayer;
		var aktLayer=-1;
		// pink tile avoidance
		OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
		// make OL compute scale according to WMS spec
		OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

		OpenLayers.ProxyHost = &quot;geoproxy.php?url=&quot;;

        function init(){

			format = 'image/png';

			var bounds = new OpenLayers.Bounds(
				88.011, 20.59,
				92.683, 26.634
			);

			var options = {
				controls: [],
				maxExtent: bounds,
				maxResolution: 0.023609375,
				projection: &quot;EPSG:4326&quot;,
				units: 'degrees'
			};

			map = new OpenLayers.Map('map', options);

			// setup tiled layer
			var dist = new OpenLayers.Layer.WMS(
				&quot;dist_GEO - Tiled&quot;, &quot;http://localhost:8088/geoserver/wms&quot;,
				{
					srs: 'EPSG:4326',
					width: '395',
					styles: '',
					height: '512',
					layers: 'bdadmin:dist_GEO',
					format: format,
					tiled: 'true',
					tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,
					isBaseLayer: true,
					visibility: true
				},
				{
					buffer: 0,
					displayOutsideMaxExtent: true
				}
			);

			var bdhw = new OpenLayers.Layer.WMS(
				&quot;Bangladesh Highway&quot;,
				&quot;http://localhost:8088/geoserver/wms&quot;,
				{
					transparent: 'TRUE',
					srs: 'EPSG:4326',
					layers: 'bdadmin:rds_nr_geo',
					format: format,
					isBaseLayer: false,
					visibility: true
				}
			);

            var bdhq = new OpenLayers.Layer.WMS(
                &quot;Bangladesh Dist HQ&quot;,
                &quot;http://localhost:8088/geoserver/wms&quot;,
                {
                    transparent: 'TRUE',
                    srs: 'EPSG:4326',
					layers: 'bdadmin:dist_hq_geo',
					format: format,
					isBaseLayer: false,
					visibility: true
                }
            );

			highlightLayer = new OpenLayers.Layer.Vector(&quot;Highlighted Features&quot;, {
				displayInLayerSwitcher: false,
				isBaseLayer: false
				}
			);

		   //map.addLayers([gphy, gmap, ghyb, gsat]);
           map.addLayers([dist,bdhw,bdhq,highlightLayer]);

			// build up all controls
			map.addControl(new OpenLayers.Control.PanZoomBar({
				position: new OpenLayers.Pixel(2, 15)
			}));

			map.addControl(new OpenLayers.Control.Navigation());
			map.addControl(new OpenLayers.Control.Scale($('scale')));
			map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));
            map.addControl( new OpenLayers.Control.LayerSwitcher() );
			map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));
			map.zoomToExtent(bounds);
			map.updateSize();

			infoControls = {
            click: new OpenLayers.Control.WMSGetFeatureInfo({
                url: 'http://localhost:8088/geoserver/wms',
                title: 'Identify features by clicking',
                layers: [bdhq,bdhw,dist],
                queryVisible: true,
				infoFormat:'application/vnd.ogc.gml',
				eventListeners: {
					getfeatureinfo: function(event) {
						map.addPopup(new OpenLayers.Popup.FramedCloud(
							&quot;chicken&quot;,
							map.getLonLatFromPixel(event.xy),
							null,
							GenPopText(event),
							null,
							true
						));
                }}
           	}),
            hover: new OpenLayers.Control.WMSGetFeatureInfo({
                url: 'http://localhost:8088/geoserver/wms',
                title: 'Identify features by clicking',
                layers: [bdhq],
                hover: true,
                // defining a custom format options here
                formatOptions: {
                    typeName: 'water_bodies',
                    featureNS: 'http://www.openplans.org/topp'
                },
                queryVisible: true,
				infoFormat:'text/html'
            	})

			};

			for (var i in infoControls) {
				infoControls[i].events.register(&quot;getfeatureinfo&quot;, this, showInfo);
				map.addControl(infoControls[i]);
			}

			infoControls.click.activate();
			//infoControls.hover.activate();

			// Active layer combo
			populateLayer(0);
        }

		// sets the HTML provided into the nodelist element
		function setHTML(response){
			document.getElementById('nodelist').innerHTML = response.responseText;
		};

		function errorHTML(response)
		{
			alert(&quot;req erro:&quot; + response.responseText);
		}

    	function showInfo(evt) {
			if (evt.features &amp;&amp; evt.features.length) {

				 highlightLayer.destroyFeatures();
				 highlightLayer.addFeatures(evt.features);
				 highlightLayer.redraw();

				 $('nodelist').innerHTML = GenPopText(evt);

			} else {
				$('nodelist').innerHTML = evt.text;
			}
        }

		function GenPopText(evt){
				 var temstr=&quot;&lt;b&gt;&lt;i&gt;&quot; + evt.features[0].gml.featureType + &quot;&lt;/i&gt;&lt;/b&gt;&lt;br/&gt;&quot;;
				 for(var key in evt.features[0].attributes)
				 {
					temstr += &quot;&lt;b&gt;&quot; + key + &quot;&lt;/b&gt;:&quot; + evt.features[0].attributes[key] + &quot;&lt;br/&gt;&quot;;
				 }
				 return temstr
		}

    &lt;/script&gt;
  &lt;/head&gt;

  &lt;body onLoad=&quot;init()&quot;&gt;
    &lt;div id=&quot;title&quot;&gt;Geosever Layer&lt;/div&gt;
    &lt;div id=&quot;layerswitcher&quot; class=&quot;olControlLayerSwitcher&quot;&gt;&lt;/div&gt;
    &lt;div id=&quot;map&quot;&gt;&lt;/div&gt;

    &lt;div id=&quot;wrapper&quot;&gt;
        &lt;div id=&quot;location&quot; style=&quot;float:left&quot;&gt;location&lt;/div&gt;
        &lt;div id=&quot;scale&quot; style=&quot;float:left&quot;&gt;&lt;/div&gt;
        &lt;div id=&quot;scale&quot; style=&quot;clear:both&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div id=&quot;nodelist&quot;&gt;
        &lt;em&gt;Click on the map to get feature info&lt;/em&gt;
    &lt;/div&gt;

  &lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>………………………………………………<br />
Abul Khayer<br />
GIS Programmer<br />
CEGIS</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=196&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2010/07/14/open-layer-with-geosever/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2010/07/screeen.jpg" medium="image">
			<media:title type="html">screeen</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2010/07/screeen2.jpg" medium="image">
			<media:title type="html">screeen2</media:title>
		</media:content>
	</item>
		<item>
		<title>Open Layer with MapSever</title>
		<link>http://khayer.wordpress.com/2010/07/14/open-layer-with-mapsever/</link>
		<comments>http://khayer.wordpress.com/2010/07/14/open-layer-with-mapsever/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 07:42:19 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Openlayer]]></category>
		<category><![CDATA[mapserver with openlayer]]></category>
		<category><![CDATA[mapserver wms]]></category>
		<category><![CDATA[openlayer with mapserver]]></category>
		<category><![CDATA[osgeo mapserver wms]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=191</guid>
		<description><![CDATA[Openlayer can add mapserver wms layer. In this writing, I discuss how work with mapserver wms layer using openlayer. I also wrote an article on how to create mapserver wms repository in my another writing here. So let assume that we have a well configure mapserver repository and now want to view this maps using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=191&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Openlayer can add mapserver wms layer. In this writing, I discuss how work with mapserver wms layer using openlayer. I also wrote an article on how to create mapserver wms repository in my another writing <a href="http://khayer.wordpress.com/2010/07/07/mapserver-wms" target="_blank">here</a>.</p>
<p>So let assume that we have a well configure mapserver repository and now want to view this maps using openlayer.</p>
<p>Add MapSever WMS Layer:</p>
<p><pre class="brush: xml;">
var dist = new OpenLayers.Layer.WMS( &quot;Bangladesh Admin Bourndary&quot;,
	 &quot;http://localhost:8080/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map&quot;,
	{layers: 'dist_geo',
		srs: 'EPSG:4326',
		format: format,
		isBaseLayer: true,
		visibility: true
	}

);
 </pre></p>
<p>This will include Bangladesh district boundary as base wms layer. Note that we set the srs value wgs84 projection of our data.</p>
<p><a href="http://khayer.files.wordpress.com/2010/07/mapserver_wms_bd.jpg"><img class="alignnone size-full wp-image-192" title="mapserver_wms_bd" src="http://khayer.files.wordpress.com/2010/07/mapserver_wms_bd.jpg?w=420&#038;h=305" alt="" width="420" height="305" /></a></p>
<p><a href="http://khayer.files.wordpress.com/2010/07/mapserver_wms_gmap.jpg"><img class="alignnone size-full wp-image-193" title="mapserver_wms_gmap" src="http://khayer.files.wordpress.com/2010/07/mapserver_wms_gmap.jpg?w=420&#038;h=305" alt="" width="420" height="305" /></a></p>
<p>Now we add the road layer from wms as openlayer overlay layer.</p>
<p><pre class="brush: xml;">
 // add road layer as overlay layer
	var bdhw = new OpenLayers.Layer.WMS(
                &quot;Bangladesh Highway&quot;,
                &quot;http://localhost:8080/cgi-bin/mapserv.exe&quot;,
                {
                    map: 'C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map',
                    transparent: 'TRUE',
                    layers: 'road_geo',
	    srs: 'EPSG:4326',
	   format: format
                },
                {'reproject': true}
            );
</pre></p>
<p>Now we implement identity features. When user click on map, we make WMSGetFeatureInfo request to mapserver.</p>
<p><pre class="brush: xml;">

infoControls = {
	click: new OpenLayers.Control.WMSGetFeatureInfo({
	url: 'http://localhost:8080/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map',
	title: 'Identify features by clicking',
	layers: [dist],
	infoFormat:'text/html',
	queryVisible: true
	})
};
</pre></p>
<p>Below the full source code is available,</p>
<p><pre class="brush: xml;">
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
    &lt;title&gt;MapServer Layer&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;theme/default/style.css&quot; type=&quot;text/css&quot; /&gt;
    &lt;style&gt;
		.opmap
		{
			height:450px;
			width:550px;
		}
    &lt;/style&gt;
    &lt;script src=&quot;OpenLayers.js&quot;&gt;&lt;/script&gt;
    &lt;script src='http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;

		/*######################
		Author: Md Abul Khayer
		Year: 2010
		khayer.wordpress.com
		#######################*/

        var map, layer;
		var infoControls;

        function init(){

			format = 'image/png';

			var bounds = new OpenLayers.Bounds(
				88.011, 20.59,
				92.683, 26.634
			);

			var options = {
				controls: [],
				maxExtent: bounds,
				maxResolution: 0.023609375,
				projection: &quot;EPSG:4326&quot;,
			};

			map = new OpenLayers.Map('map', options);

			// Add Google Layer as baselayer
			var gphy = new OpenLayers.Layer.Google(
			&quot;Google Physical&quot;,
			{type: G_PHYSICAL_MAP}
            );

			var gmap = new OpenLayers.Layer.Google(
                &quot;Google Streets&quot;, // the default
                {numZoomLevels: 20}
            );

			var ghyb = new OpenLayers.Layer.Google(
                &quot;Google Hybrid&quot;,
                {type: G_HYBRID_MAP, numZoomLevels: 20}
            );

			var gsat = new OpenLayers.Layer.Google(
                &quot;Google Satellite&quot;,
                {type: G_SATELLITE_MAP, numZoomLevels: 22}
            );

            map.addLayers([gphy, gmap, ghyb, gsat]);

			// Add Custom base layer. Bangladesh District boundary.
			var dist = new OpenLayers.Layer.WMS( &quot;Bangladesh Admin Bourndary&quot;,
                    &quot;http://localhost:8080/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map&quot;,
					{layers: 'dist_geo',
						srs: 'EPSG:4326',
						format: format,
						isBaseLayer: true,
						visibility: true
					}

			);

            // add road layer as overlay layer
			var bdhw = new OpenLayers.Layer.WMS(
                &quot;Bangladesh Highway&quot;,
                &quot;http://localhost:8080/cgi-bin/mapserv.exe&quot;,
                {
                    map: 'C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map',
                    transparent: 'TRUE',
                    layers: 'road_geo',
					srs: 'EPSG:4326',
					format: format
                },
                {'reproject': true}
            );

            // Bangladesh distric head queater as overlay layer.
			var bdhq = new OpenLayers.Layer.WMS(
                &quot;Bangladesh Dist HQ&quot;,
                &quot;http://localhost:8080/cgi-bin/mapserv.exe&quot;,
                {
                    map: 'C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map',
                    transparent: 'TRUE',
                    layers: 'dist_hq_geo',
					srs: 'EPSG:4326',
					format: format
                },
                {'reproject': true}
            );

			// Get identities of the map. Can be either click or hover is activated.
			infoControls = {
				click: new OpenLayers.Control.WMSGetFeatureInfo({
					url: 'http://localhost:8080/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map',
					title: 'Identify features by clicking',
					layers: [dist],
					infoFormat:'text/html',
					queryVisible: true
				}),
            	hover: new OpenLayers.Control.WMSGetFeatureInfo({
                url: 'http://localhost:8080/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/distwms.map',
                title: 'Identify features by clicking',
                layers: [dist],
                hover: true,
				infoFormat: 'text/html',
                queryVisible: true
            	})
			}

            map.addLayers([dist, bdhw, bdhq]);
			map.zoomToMaxExtent();
            map.addControl( new OpenLayers.Control.LayerSwitcher() );
			map.addControl(new OpenLayers.Control.Navigation());
			map.addControl(new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}));

			map.addControl(new OpenLayers.Control.Scale($('scale')));
			map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));

			for (var i in infoControls) {
				infoControls[i].events.register(&quot;getfeatureinfo&quot;, this, showInfo);
				map.addControl(infoControls[i]);
			}

        	infoControls.click.activate();

        }

		function showInfo(evt) {
			if (evt.features &amp;&amp; evt.features.length) {
				 //highlightLayer.destroyFeatures();
				 //highlightLayer.addFeatures(evt.features);
				 //highlightLayer.redraw();

				 $('nodelist').innerHTML=evt.text;
			} else {
				$('nodelist').innerHTML=evt.text;
			}
    	}

    &lt;/script&gt;
  &lt;/head&gt;

  &lt;body onLoad=&quot;init()&quot;&gt;
    &lt;div id=&quot;title&quot;&gt;MapServer WMS Layer with Google map.&lt;/div&gt;
    &lt;div id=&quot;layerswitcher&quot; class=&quot;olControlLayerSwitcher&quot;&gt;&lt;/div&gt;
    &lt;div id=&quot;map&quot; class=&quot;opmap&quot;&gt;&lt;/div&gt;

    &lt;div id=&quot;wrapper&quot;&gt;
        &lt;div id=&quot;location&quot; style=&quot;float:left&quot;&gt;location&lt;/div&gt;
        &lt;div id=&quot;scale&quot; style=&quot;float:left&quot;&gt;&lt;/div&gt;
        &lt;div id=&quot;scale&quot; style=&quot;clear:both&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div id=&quot;nodelist&quot;&gt;
        &lt;em&gt;Click on the map to get feature info&lt;/em&gt;
    &lt;/div&gt;

  &lt;/body&gt;
&lt;/html&gt;
</pre></p>
<p>………………………………………………<br />
Abul Khayer<br />
GIS Programmer<br />
CEGIS</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=191&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2010/07/14/open-layer-with-mapsever/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2010/07/mapserver_wms_bd.jpg" medium="image">
			<media:title type="html">mapserver_wms_bd</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2010/07/mapserver_wms_gmap.jpg" medium="image">
			<media:title type="html">mapserver_wms_gmap</media:title>
		</media:content>
	</item>
		<item>
		<title>Mapserver WMS</title>
		<link>http://khayer.wordpress.com/2010/07/07/mapserver-wms/</link>
		<comments>http://khayer.wordpress.com/2010/07/07/mapserver-wms/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 08:15:48 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Mapserver]]></category>
		<category><![CDATA[mapserver wms]]></category>
		<category><![CDATA[mapserver wms server]]></category>
		<category><![CDATA[openlayer wms]]></category>
		<category><![CDATA[osgeo mapserver wms]]></category>
		<category><![CDATA[umn mapserver wms]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=185</guid>
		<description><![CDATA[While I have been working with Google map api, a lots tutorial over the web can be found. But unfortunately, Map server developer are only working but not willing to anything for new developer. May be they think it is very simple, why you need more than the mapserver documentation? But true is that it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=185&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While I have been working with Google map api, a lots tutorial over the web can be found. But unfortunately, Map server developer are only working but not willing to anything for new developer. May be they think it is very simple, why you need more than the mapserver documentation? But true is that it is very difficult to new developer to run their first hello world program. So, very first time in my blog I have started to write tutorial on map server related issue.</p>
<p>The main objective of this writing is that a simple wms map repository will be created using Osgeo Mapserver and view the map with openlayer. In this example I have used three layers Bangladesh district boundary, Main Road and District head quarter location. The first two layer map source is ESRI Shape file and third one is postgis. For all the layer I have used wgs84(EPSG:4326) projection system. In my another post I  wrote on mapserver projection system, click <a title="mapserver projection" href="http://khayer.wordpress.com/2010/07/07/mapserver-projection" target="_blank">here</a> to check article.</p>
<p><strong>Map file Creation with WMS support:</strong><br />
I am using osgeo mapserver in windows OS. Below definition have been added  for top level in mapfile,</p>
<p><pre class="brush: xml;">
NAME BdDistMap
STATUS ON
SIZE 500 550

# Extent based on full extent of QGIS view
EXTENT 86.7316 20.5896 93.9623 26.6341
UNITS dd
IMAGECOLOR 225 225 255
IMAGETYPE png
FONTSET &quot;fontlist.txt&quot;
</pre></p>
<p>Now the web section is very important for wms. It requires to add meta data information to give WMS support. This example I have added minimum wms definition which are all most mandatory.</p>
<p><pre class="brush: xml;">
WEB
 IMAGEPATH &quot;/OSGeo4W/tmp/tmp_img/&quot;
 IMAGEURL &quot;/tmp/tmp_img/&quot;
 HEADER &quot;query_header.html&quot;
 FOOTER &quot;query_footer.html&quot;
 METADATA
    &quot;wms_title&quot; &quot;WMS Demo Server&quot;
    &quot;wms_onlineresource&quot; &quot;http://localhost:8080/cgi-bin/mapserv.exe?map=C:\OSGeo4W\apache\htdocs\openlayer\sampleapps\distGeo.map&quot;
 &quot;wms_srs&quot; &quot;EPSG:4326&quot;
&quot;wms_feature_info_mime_type&quot; &quot;text/html&quot;
 END
END
</pre></p>
<p>In metadata section, wms_title, wms_srs are mendatory.  Wms_srs is the projection system definition.  wms_feature_info_mime_type is used to GetFeatureInfo request output format.</p>
<p>I have used map lavel projection system for all layers. Below is definition,</p>
<p>
PROJECTION
  &quot;init=epsg:4326&quot;
END
</p>
<p>Now in layer definition, I have added meta info tag again. Below is the definition,</p>
<p><pre class="brush: xml;">
LAYER
  NAME dist_geo
  PROJECTION
  	&quot;init=epsg:4326&quot;
  END
  HEADER &quot;hq_query_header.html&quot;
  TEMPLATE &quot;hq_query_body.html&quot;

  METADATA
    &quot;wms_title&quot; &quot;distwms&quot;
  END
  TYPE POLYGON
  STATUS OFF
  DATA &quot;C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/shp/dist_GEO.shp&quot;
    CLASS
      NAME &quot;State Boundary&quot;
      STYLE
        COLOR  150 123 90
        OUTLINECOLOR 229 210 191
      END
    END
END
</pre></p>
<p>Here I add projection parameter again. If you want use map level projection, this section can be removing. This include Bangladesh administrator boundary with wms support. The data source is shape file in wgs84 projection.</p>
<p>Below the complete working mapfile is given which is able response wms request.</p>
<p><pre class="brush: xml;">
MAP
NAME BdDistMap
STATUS ON
SIZE 500 550

# Extent based on full extent of QGIS view
EXTENT 86.7316 20.5896 93.9623 26.6341
UNITS dd
IMAGECOLOR 225 225 255
IMAGETYPE png
FONTSET &quot;fontlist.txt&quot;

WEB
 IMAGEPATH &quot;/OSGeo4W/tmp/tmp_img/&quot;
 IMAGEURL &quot;/tmp/tmp_img/&quot;
 HEADER &quot;query_header.html&quot;
 FOOTER &quot;query_footer.html&quot;
 METADATA
    &quot;wms_title&quot; &quot;WMS Demo Server&quot;
    &quot;wms_onlineresource&quot; &quot;http://localhost:8080/cgi-bin/mapserv.exe?map=C:\OSGeo4W\apache\htdocs\openlayer\sampleapps\distGeo.map&quot;    &quot;wms_srs&quot; &quot;EPSG:4326&quot;
	&quot;wms_feature_info_mime_type&quot; &quot;text/html&quot;
 END
END

QUERYMAP
  STATUS ON
  SIZE 500 550
  STYLE HILITE
  COLOR 255 255 0
END

SYMBOL
   NAME &quot;Circle&quot;
   FILLED true
   TYPE ellipse
   POINTS 5 5 END
END

PROJECTION
  &quot;init=epsg:4326&quot;
END

LAYER
  NAME dist_geo
  PROJECTION
  	&quot;init=epsg:4326&quot;
  END
  HEADER &quot;hq_query_header.html&quot;
  TEMPLATE &quot;hq_query_body.html&quot;

  METADATA
    &quot;wms_title&quot; &quot;distwms&quot;
  END
  TYPE POLYGON
  STATUS OFF
  DATA &quot;C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/shp/dist_GEO.shp&quot;
    CLASS
      NAME &quot;State Boundary&quot;
      STYLE
        COLOR  150 123 90
        OUTLINECOLOR 229 210 191
      END
    END
END

LAYER
  NAME road_geo
  HEADER &quot;hq_query_header.html&quot;
  TEMPLATE &quot;hq_query_body.html&quot;
  PROJECTION
  	&quot;init=epsg:4326&quot;
  END
  METADATA
    &quot;wms_title&quot;	&quot;Cities&quot;
  END
  TYPE LINE
  STATUS OFF
  DATA &quot;C:/OSGeo4W/apache/htdocs/openlayer/sampleapps/shp/rds_nr_geo.shp&quot;
    CLASS
      NAME &quot;State Road&quot;
      STYLE
        COLOR 32 32 32
      END
    END
END

LAYER
  NAME dist_hq_geo
  # for HTML queries
  HEADER &quot;hq_query_header.html&quot;
  TEMPLATE &quot;hq_query_body.html&quot;

  PROJECTION
  	&quot;init=epsg:4326&quot;
  END

  METADATA
    &quot;wms_title&quot; &quot;DistHQ&quot;
  END
  TYPE POINT
  STATUS OFF
  CONNECTION &quot;user=postgres password=cegis dbname=postgis host=localhost port=5432&quot;
  CONNECTIONTYPE postgis
  DATA &quot;the_geom from dist_hq_geo USING UNIQUE gid&quot;
  LABELITEM &quot;distname&quot;
  CLASS
	NAME &quot;dist_hq_geo&quot;
	COLOR 200 255 0
	SYMBOL &quot;Circle&quot;
	  LABEL
		COLOR 132 31 31
		SHADOWCOLOR 218 218 218
		SHADOWSIZE 2 2
		TYPE TRUETYPE
		FONT arial
		SIZE 11
		ANTIALIAS TRUE
		POSITION CL
		PARTIALS FALSE
		MINDISTANCE 300
		BUFFER 4
	  END # end of label
	  STYLE
		OPACITY 100
	  END
  END
END

END # Map File
</pre></p>
<p><strong>Call mapserver WMS Layer:</strong><br />
Now the important part, how we can test this repository? Write below address in your web browser,</p>
<p>http://localhost:8080/cgi-bin/mapserv.exe?SERVICE=WMS&#038;VERSION=1.1.1&#038;REQUEST=GetCapabilities&#038;map=C:\OSGeo4W\apache\htdocs\openlayer\sampleapps\distGeo.map</p>
<p>This will return respose wms request if everything is okay.  And also write below address for testing map image generation of mapserver,</p>
<p>http://localhost:8080/cgi-bin/mapserv.exe?mode=map&#038;layer=dist_geo&#038;layer=road_geo&#038;map=C:\OSGeo4W\apache\htdocs\openlayer\sampleapps\distGeo.map</p>
<p>In another article, I wrote how to add mapserver wms layer using openlayer.<br />
Click here</p>
<p>For more information about wms layer, please check below links,<br />
<a href="http://mapserver.org/ogc/wms_server.html" target="_blank">here</a><br />
<a href="http://www.sogis1.so.ch/sogis/ms4w/apps/ms_ogc_workshop" target="_blank">here</a></p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
Abul Khayer<br />
GIS programmer<br />
CEGIS<br />
Bangladesh</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=185&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2010/07/07/mapserver-wms/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>
	</item>
		<item>
		<title>Mapserver Projection</title>
		<link>http://khayer.wordpress.com/2010/07/07/mapserver-projection/</link>
		<comments>http://khayer.wordpress.com/2010/07/07/mapserver-projection/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 06:47:19 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Mapserver]]></category>
		<category><![CDATA[BTM]]></category>
		<category><![CDATA[btm projection]]></category>
		<category><![CDATA[BUTM]]></category>
		<category><![CDATA[EPSG:3106]]></category>
		<category><![CDATA[mapserver bangladesh]]></category>
		<category><![CDATA[mapserver porjection]]></category>
		<category><![CDATA[osgeo mapserver projection]]></category>
		<category><![CDATA[umn mapserver projection]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=182</guid>
		<description><![CDATA[I am not a projection expert. So, who know projection very well, this article does not come to any help. Here I give some reference information for new mapserver developer. We can add projection parameter in map file by two ways, 1. Inline projection It use detail projection parameter. If you use shape file, using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=182&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am not a projection expert. So, who know projection very well, this article does not come to any help. Here I give some reference information for new mapserver developer.</p>
<p>We can add projection parameter in map file by two ways,</p>
<p><strong>1.  Inline projection</strong><br />
It use detail projection parameter. If you use shape file, using arcgis parameter can be found. And also there .prj file where contains this parameters. Below I give the projection parameter of wgs84,</p>
<p>PROJECTION<br />
&#8220;proj=longlat&#8221;<br />
&#8220;ellps=WGS84&#8243;<br />
&#8220;datum=WGS84&#8243;<br />
&#8220;no_defs&#8221;<br />
END</p>
<p><strong>2.  EPSG Projection reference</strong><br />
For simplicity, some reference number is introducing to identify a set of projection parameter, known as ESPG. We can find epsg from below site,<br />
<a href="http://spatialreference.org" target="_blank">http://spatialreference.org</a></p>
<p>In all list reference tab, require reference number can be search. For example, if we search Bangladesh then we get <strong>EPSG:3106</strong> code for Bangladesh(BUTM).</p>
<p>EPSG list can be found also in local pc in “OSGeo4W\share\proj\epsg” file.</p>
<p>Now for WGS84 projection, we have add below projection code in map file in EPSG,</p>
<p>PROJECTION<br />
&#8220;init=epsg:4326&#8243;<br />
END</p>
<p>The projection can be add in layer level in map file. But if the entire layers are in same projection, then no need to add projection in layer level. It is better at in map level.</p>
<p>If we use WMS layer, wms_srs is a mandatory parameter. So the for wgs84 parameter value should be,</p>
<p>METADATA<br />
&#8220;wms_srs&#8221; &#8220;EPSG:4326&#8243;<br />
END</p>
<p>Fow more mapserver project documentation, click <a href="http://mapserver.org/mapfile/projection.html" target="_blank">here</a>.</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<br />
Abul Khayer<br />
GIS programmer<br />
CEGIS</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=182&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2010/07/07/mapserver-projection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>
	</item>
		<item>
		<title>Solution of Cross domain Ajax Call problem</title>
		<link>http://khayer.wordpress.com/2010/07/04/solution-of-cross-domain-ajax-call-problem/</link>
		<comments>http://khayer.wordpress.com/2010/07/04/solution-of-cross-domain-ajax-call-problem/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 09:12:20 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[ajax call to different port]]></category>
		<category><![CDATA[Cross domain Ajax Call]]></category>
		<category><![CDATA[openlayer proxy]]></category>
		<category><![CDATA[openlayer with Osgeo]]></category>
		<category><![CDATA[ProxyPass]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=173</guid>
		<description><![CDATA[This problem was first identified when I worked with open layer and Geoserver. My Geo server used apache tomcat and have been listening on 8088 port. And my web application uses apache which is listening on 8080 port. Now, when I made Asynchronous call using openlayer for a map layer of geoserver, my browser (firefox [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=173&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This problem was first identified when I worked with open layer and Geoserver. My Geo server used apache tomcat and have been listening on 8088 port. And my web application uses apache which is listening on 8080 port. Now, when I made Asynchronous call using openlayer for a map layer of geoserver, my browser (firefox 3.5) had been blocking the request due to security issue. Interestingly, internet explorer (6) can do the request successfully.  As a result I was stacked for couple hours and was searching for the solution.</p>
<p>This problem can be bypass in several ways,</p>
<p><strong>Solution 1</strong><br />
We can create a proxy files which will bypass the cross domain request. The proxy page will receive a request, and then make a server side requested and response the output. Below I give a PHP solution of the proxy files,<br />
 File name: geoproxy.php<br />
<pre class="brush: php;">
&lt;?php
$url=$_GET[&quot;url&quot;];
$res = file_get_contents($url);
echo $res; 
?&gt;
</pre></p>
<p>This page receives the request and echoes the response. So, now we do not make ajax call the different port service directly, instead call the proxy page by “geoproxy.php?url=http://somedomain:port/ geoserver/wms?service=WMS&amp;request=GetFeatureInfo”.</p>
<p>This solution has some security risk, because external user can use your bandwith for bypass their route. So, restrict the requester server by checking page referrer. To do that there needs small modification of existing code.</p>
<p><strong>Solution 2</strong><br />
Requests can be bypass using apache mod_proxy.so module. It needs some configuration change in httpd.conf file. Uncomment below module in apache httpd.conf file,<br />
LoadModule proxy_module modules/mod_proxy.so<br />
LoadModule proxy_http_module modules/mod_proxy_http.so</p>
<p>Now add proxy bypass code below of the file,<br />
ProxyPass /geotest http://localhost:8080/page.html<br />
 ProxyPassReverse /geotest http://localhost:8080/ page.html</p>
<p>Restart the apache. Now /geotest requeste are redirected.</p>
<p><strong>Solution 3</strong><br />
We can use virtual host feature of apache. </p>
<p>I have used the solution 1 in my project because it does not need any server side configuration change.</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
Khayer<br />
GIS Programmer<br />
CEGIS</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=173&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2010/07/04/solution-of-cross-domain-ajax-call-problem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>
	</item>
		<item>
		<title>Crystal report Crosstab percentage Rounding Problem Fix</title>
		<link>http://khayer.wordpress.com/2010/03/29/crystal-report-crosstab-percentace-rounding-problem-fix/</link>
		<comments>http://khayer.wordpress.com/2010/03/29/crystal-report-crosstab-percentace-rounding-problem-fix/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 04:38:25 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Crystal Report]]></category>
		<category><![CDATA[Crosstab Percentage]]></category>
		<category><![CDATA[Crystal report percentage]]></category>
		<category><![CDATA[Crystal Report rounding problem]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=156</guid>
		<description><![CDATA[When we use Integrated Cystal report of VS 2008 for report generation, it works fine except some special place. In my previous post in this blog some of those problem  were identified and i tried to give solution. Now i discuss another new point that was discovered and fix recently. In crosstab report, if we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=156&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When we use Integrated Cystal report of VS 2008 for report generation, it works fine except some special place. In my previous post in this blog some of those problem  were identified and i tried to give solution. Now i discuss another new point that was discovered and fix recently.</p>
<p>In crosstab report, if we use percentage based on count, there is rounding problem. Total sum of a row is not equal to 100. The Crystal report truncate the value after floating point automatically. I have searched in the net to find the reason of this behavior, unfortunately can&#8217;t get acceptable answer(may be i am not good googler !). So to save my self from client bullet, i have to think alternative.</p>
<p>A new custom field is created(Right click formula Field&gt;new) which only count the record using blow formula,<br />
&#8212;&#8212;&#8212;&#8212;<br />
WhileReadingRecords;<br />
1<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<a href="http://khayer.files.wordpress.com/2010/03/crosstabrounding_1.jpg"><img class="aligncenter size-full wp-image-157" title="CrossTabRounding_1" src="http://khayer.files.wordpress.com/2010/03/crosstabrounding_1.jpg?w=420&#038;h=185" alt="" width="420" height="185" /></a></p>
<p>Now this custom filed is used in cross tab. In this time, at first the sum is made of the custom field and then the show as percentage option of crosstab expert is checked.</p>
<p><a href="http://khayer.files.wordpress.com/2010/03/crosstabrounding_2.jpg"><img class="aligncenter size-full wp-image-158" title="CrossTabRounding_2" src="http://khayer.files.wordpress.com/2010/03/crosstabrounding_2.jpg?w=420&#038;h=351" alt="" width="420" height="351" /></a></p>
<p>This problem only occur only in the integrated Cystal report of VS 2008. So i was able to duck the client bullet .</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
Khayer<br />
GIS Programmer,<br />
CEGIS</p>
<p>Notes: Special thank to Kamal Pasha my college to help me to resolve the problem.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=156&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2010/03/29/crystal-report-crosstab-percentace-rounding-problem-fix/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2010/03/crosstabrounding_1.jpg" medium="image">
			<media:title type="html">CrossTabRounding_1</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2010/03/crosstabrounding_2.jpg" medium="image">
			<media:title type="html">CrossTabRounding_2</media:title>
		</media:content>
	</item>
		<item>
		<title>POI Finding using Google map and PostGIS</title>
		<link>http://khayer.wordpress.com/2009/11/02/poi-finding-using-googmap-and-postgis/</link>
		<comments>http://khayer.wordpress.com/2009/11/02/poi-finding-using-googmap-and-postgis/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 10:33:52 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Google Map]]></category>
		<category><![CDATA[buffer in google map]]></category>
		<category><![CDATA[Find Buffer Point in Google map]]></category>
		<category><![CDATA[find POI in google map]]></category>
		<category><![CDATA[google map and postgis]]></category>
		<category><![CDATA[intersection in google map]]></category>
		<category><![CDATA[postgis googlemap]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=140</guid>
		<description><![CDATA[Google map and PostGis both are very nice tools for GIS application development. PostGis is an Open Source spatial database which supports almost every spatial operation. We can develop unique features for web application by combining Google Map and PostGis. I want to developed an web page where user input an lat/lon of a location [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=140&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Google map and PostGis both are very nice tools for GIS application development. PostGis is an Open Source spatial database which supports almost every spatial operation. We can develop unique features for web application by combining Google Map and PostGis.<br />
<img class="aligncenter size-full wp-image-141" title="GmapPostGis" src="http://khayer.files.wordpress.com/2009/11/gmappostgis.jpg?w=420&#038;h=220" alt="GmapPostGis" width="420" height="220" /><br />
I want to developed an web page where user input an lat/lon of a location and distance. Then the application search all the POI(points) within this buffer an display them in Google map.</p>
<p>In above scenario, the solution can be given very easily using google map and PostGis. To do that, first we need to import shape file to PostGis. Secondly, have to make a PostGis query based on point and buffer area.Finally customize google map for display query result. Check the below link for live demo,</p>
<p><a href="http://123.49.36.82:8080/googlemap/gmapmagic/loc_qry_pg/pg_map.htm" target="_blank">Click Here</a></p>
<p>Another post in this blog i have described how to import shape file to postgis. Please check this,</p>
<p><a href="http://khayer.wordpress.com/2009/10/29/creating-database-and-importing-shape-file-in-postgis/" target="_blank">Click Here</a></p>
<p>PostGis have a set of GIS functions. All are very usefull and very compatible for web development. we can use ST_Buffe and ST_INTERSECTION to implement our requirement. Using ST_BUFFER We can create a max extend box by giving the distance parameter. Then the box will be intersected with our point map in the database. Below is the SQL,</p>
<p>SELECT gid, landmark_n, groupcode, lat, lon, the_geom<br />
FROM landmark<br />
WHERE the_geom &amp;&amp; ST_Buffer(ST_GeomFromText(&#8216;POINT(90.4142 23.7948)&#8217;), .01)</p>
<p>Here the landmark is our PostGis geo table. Using &amp;&amp; we make intersection with buffer box. Our sample input location lng/lat is 90.4142,23.7948(Gulshan-1, Dhaka).We use .01 unit buffer area.</p>
<p>This SQL will return landmarks information with Lat/Lng. Now we need to display this points using Google Map which is quite simple task. There are many simple example available in the web to that. Check the below links,<br />
<a href="http://code.google.com/apis/maps/articles/phpsqlajax.html" target="_blank">Click Here</a></p>
<p>If this article do any help to you, please make comments.</p>
<p>Thanks,<br />
Khayer<br />
GIS Programmer, CEGIS<br />
Bangladesh.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=140&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2009/11/02/poi-finding-using-googmap-and-postgis/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2009/11/gmappostgis.jpg" medium="image">
			<media:title type="html">GmapPostGis</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating Database and Importing Shape file  in PostGis</title>
		<link>http://khayer.wordpress.com/2009/10/29/creating-database-and-importing-shape-file-in-postgis/</link>
		<comments>http://khayer.wordpress.com/2009/10/29/creating-database-and-importing-shape-file-in-postgis/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 03:47:54 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Postgis]]></category>
		<category><![CDATA[esri shape to postgis]]></category>
		<category><![CDATA[import shape file in database]]></category>
		<category><![CDATA[import shape file in postgis]]></category>
		<category><![CDATA[postgis shape file]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=134</guid>
		<description><![CDATA[Postgis is the next generation database. The popularity increase rate of postgis is very sharp. I first used the postgis when it is an university project. Now it become very stable. In this article i will describe the procedure of importing ESRI Shape file into the PostGIS. At first we need to create an database [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=134&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Postgis is the next generation database. The popularity increase rate of postgis is very sharp. I first used the postgis when it is an university project. Now it become very stable. In this article i will describe the procedure of importing ESRI Shape file into the PostGIS.</p>
<p>At first we need to create an database with spatial support. To do than, open pgAdmin III and login the PostGreSql. Now right click in the Database and select new database. Create a new database name testgis with postgis templete.<br />
<img class="aligncenter size-full wp-image-135" title="postgisDBCrete" src="http://khayer.files.wordpress.com/2009/10/postgisdbcrete.jpg?w=420" alt="postgisDBCrete"   /></p>
<p>Then create new schema(table) named roads in public domain.</p>
<p>Now we import the shape file into the testgis. PostGreSql have an utility known as shp2pgsql. we need to convert shape file to spitial sql using that tools.</p>
<p>Follow below step to do that,<br />
1. open command promt<br />
2. # cd C:\Program Files\PostgreSQL\8.4\bin<br />
3. # shp2pgsql c:\roads.shp public.roads &gt; roads.sql</p>
<p>Finally import the dump to postgis database,<br />
# psql -d testgis -U postgres -f roads.sql</p>
<p>Now shape file in imported. We can test the map using qgis.<br />
Khayer<br />
GIS Programmer, CEGIS<br />
Bangladesh<br />
khayer.wordpress.com</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=134&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2009/10/29/creating-database-and-importing-shape-file-in-postgis/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2009/10/postgisdbcrete.jpg" medium="image">
			<media:title type="html">postgisDBCrete</media:title>
		</media:content>
	</item>
		<item>
		<title>My Sony Ericsson s312 internet setting</title>
		<link>http://khayer.wordpress.com/2009/08/05/my-sony-ericsson-s312-internet-setting/</link>
		<comments>http://khayer.wordpress.com/2009/08/05/my-sony-ericsson-s312-internet-setting/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 10:09:35 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Connect PC to Internet with Sony Ericsson s312]]></category>
		<category><![CDATA[Sony Ericsson s312 internet setting]]></category>
		<category><![CDATA[Sony Ericsson s312 modem]]></category>
		<category><![CDATA[Sony Ericsson s312 use as modem]]></category>
		<category><![CDATA[Sony Ericsson W302 modem]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=122</guid>
		<description><![CDATA[I am great fan of Sony Ericsson. Mainly I use mobile for internet access. After losing my k550 in sea in last cox&#8217;s Bazar tour, i decided to buy new SE phone. Then i brought SE S312 for its nice design and low price. But it confused me a lots when i found that there [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=122&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-127" title="se-s312" src="http://khayer.files.wordpress.com/2009/08/se-s312.jpg?w=420" alt="se-s312"   /></p>
<p>I am great fan of Sony Ericsson. Mainly I use mobile for internet access. After losing my k550 in sea in last cox&#8217;s Bazar tour, i decided to buy new SE phone. Then i brought SE S312 for its nice design and low price. But it confused me a lots when i found that there was no CD and data cable with the mobile. I downloaded latest PC suite from SE site but the PC suite can not recognize my S312 mobile. I called GP and SE service center for help. Unfortunately they can not do so much for me.  How can i use this phone as modem?</p>
<p>At last, i have got the solution with the help of my colleague. I follows below steps,</p>
<p>1. Call mobile service provider for internet setting(Wap &amp; internet setting is  not same) of the phone.</p>
<p>2. Download USB driver for s312 from <a href="http://www.sonyericsson.com/cws/support/softwaredownloads/detailed/usbdrivers/s312?lc=en&amp;cc=mena" target="_blank">here</a>.</p>
<p>3.Install the Driver. Follow the instruction. Do not connect mobile with cable until prompt by installer.</p>
<p>4. After successfully installing the driver, check the phone modem.<br />
Right Click My Computer&gt;Hardware&gt;Device Manager&gt;Modems<br />
If your day is not bad, You will get <em>Sony Erricsson Mobile Device modem.<br />
</em><br />
Note that your phone is connected with data cable properly</p>
<p>5. Right click Sony Erricsson Mobile Device, click Diagnostics Tab, then click query Modem<br />
Modem will response it status.</p>
<p>6. Then click Advance. Write belows Extra Setting to Connect,<br />
For Grameen Phone(Bangladeshi Mobile Operator):<br />
AT+cgdcont=1,&#8221;ip&#8221;,&#8221;gpinternet&#8221;<br />
Here &#8220;gpinternet&#8221; is the APN name of the Grameen phone. </p>
<p>For Airtel (Indian Mobile Operator):<br />
AT+cgdcont=1,”ip”,”airtelgprs.com”<br />
Here, “airtelgprs.com” is the APN name of the airtel phone. For other operator, you have to know the APN name of the mobile operator.</p>
<p>For other operator, you have to know the APN name of the mobile operator.</p>
<p>7. Click Okay.</p>
<p>8. Go Control Pannel&gt;Network Setting &gt;Create New Connection</p>
<p>9. Create a new connection with *99***1# or *99# dialing number(For Grameen phone). This number can be different depending on mobile operators. It&#8217;s is better if you take help from corresponding mobile operator&#8217;s customer care to create a new connection.</p>
<p>10. Then connect the PC to the internet.</p>
<p>11. Thanks  good, it save my phone from dumping.<br />
This setting is also helpful for w302(No CD &amp; Cable Package). For w302, you need to download USB-Modem driver form SE Service Center.</p>
<p>For more information about GPRS internet Setting click <a href="http://www.velki.com/forum/topic.asp?TOPIC_ID=56" target="_blank">here</a>.</p>
<p>Please write comment below if this post do any help for you.</p>
<p>Thanks<br />
Abul Khayer<br />
GIS Programmer,<br />
CEGIS,<br />
Bangladesh.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=122&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2009/08/05/my-sony-ericsson-s312-internet-setting/feed/</wfw:commentRss>
		<slash:comments>79</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2009/08/se-s312.jpg" medium="image">
			<media:title type="html">se-s312</media:title>
		</media:content>
	</item>
		<item>
		<title>BDMapper for OSGEO Mapserver</title>
		<link>http://khayer.wordpress.com/2009/06/22/bdmapper-for-osgeo-mapserver/</link>
		<comments>http://khayer.wordpress.com/2009/06/22/bdmapper-for-osgeo-mapserver/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 09:38:23 +0000</pubDate>
		<dc:creator>khayer</dc:creator>
				<category><![CDATA[Mapserver]]></category>
		<category><![CDATA[mapserver]]></category>
		<category><![CDATA[mapserver bangladesh]]></category>
		<category><![CDATA[mapserver framework]]></category>
		<category><![CDATA[Mapserver using PHP]]></category>
		<category><![CDATA[mapserver viewer]]></category>
		<category><![CDATA[OSGeo Mapserver]]></category>

		<guid isPermaLink="false">http://khayer.wordpress.com/?p=106</guid>
		<description><![CDATA[OSGeo Mapserver (Previous UNM Mapserver) is a very strong opensource tools for web based GIS mapping. It is support all of the server side language like PHP, Perl and JSP. It can render map from ESRI Shape file, Wms, Spitial Database, Raster and others popular format. For a begainer, it is very easy to display [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=106&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://mapserver.org/" target="_blank">OSGeo Mapserver</a> (Previous UNM Mapserver) is a very strong opensource tools for web based GIS mapping. It is support all of the server side language like PHP, Perl and JSP. It can render map from ESRI Shape file, Wms, Spitial Database, Raster and others popular <a href="http://mapserver.org/about.html#about" target="_blank">format</a>.</p>
<p>For a begainer, it is very easy to display a hello world map. But for industry use, programmers need to use framework like GMap, Kmap, Openlayer and so on. The Gmap map is a nice tool which is written in PHP. Unfortunately, there is no regular update for GMAP. Besides, OpenLayer is a javaScript API for using Mapser server. But all of available framework are little bit complex to work. They require major changes for minor modification.</p>
<p>I have got chances to work with .NET component of mapping like <a href="http://www.vdstech.com/index.htm" target="_blank">ASP Map</a>, Map Object (Desktop Application), <a href="http://sharpmap.codeplex.com/" target="_blank">SharpMap</a> (Opensource) and <a href="http://www.mapwindow.org/download.php" target="_blank">MapWindowGIS</a> (Opensource). They need small number of line code for creating mapping tool. All the time I am waiting for a Mapserver framework to work like .NET component. Unfortunately most of the Mapserver developer are very high skill, so they can not realize my simple requirement. At last I decided to write a viewer using phpMapscript only for use myself. I gave the viewer name <a href="http://123.49.36.82:8080/bdmapper" target="_blank">BDMapper</a>.</p>
<p><img class="alignleft size-full wp-image-107" title="BdMapper_Home2" src="http://khayer.files.wordpress.com/2009/06/bdmapper_home2.jpg?w=420&#038;h=304" alt="BdMapper_Home2" width="420" height="304" /></p>
<p>-Live Demo of <a href="http://123.49.36.82:8080/bdmapper" target="_blank">BDMapper</a><br />
-<a href="http://www.mediafire.com/?2hiymuwgine" target="_blank">Source Code of BDMapper</a></p>
<p>BDMapper has developed using PHPMapscript, Mysql and Java Script. Some functions of GMAP are exteded here. User can create a mapping tool with writing some lines of code. But the main objective of BDMapper development is to easy enhancement with other application and easy modification.</p>
<p><img class="alignleft size-full wp-image-108" title="BdMapper_Zoom" src="http://khayer.files.wordpress.com/2009/06/bdmapper_zoom.jpg?w=420&#038;h=304" alt="BdMapper_Zoom" width="420" height="304" /></p>
<p><img class="alignleft size-full wp-image-109" title="BdMapper_Ident" src="http://khayer.files.wordpress.com/2009/06/bdmapper_ident.jpg?w=420&#038;h=304" alt="BdMapper_Ident" width="420" height="304" /></p>
<p>If you want to use BDMapper, the first thing you need to install the BDMapper demo in your local machine. You should follow below steps to run the demo in your local machine,</p>
<p><strong>Installing Mapserver</strong><br />
Download mapserver form mapserver.org. To install the OSGeo mapserver, follow the installation guide. For BD mapper some extra configuration is recommended.</p>
<p>Apache Configuration (httpd.conf):<br />
-	Add temp director alias. Here is my local machine setting for temp directory</p>
<p>## Alias for MapServer tmp directory<br />
##<br />
Alias /ms_tmp/ &#8220;c:\OSGeo4w/tmp/ms_tmp/&#8221;</p>
<p>- Create a folder named ms_tmp in &#8220;c:\OSGeo4w/tmp/” directory.<br />
####</p>
<p>** PHP Configuration (php.ini):<br />
-	Load PHP MapScript Extension<br />
extension=php_mapscript.dll<br />
-	Load PHP_dbase Extension<br />
extension=php_dbase.dll</p>
<p>Restart Apache service.</p>
<p><strong>BD Mapper Demo Installation</strong><br />
-	Download Source from <a href="http://www.mediafire.com/?2hiymuwgine" target="_blank">here</a><br />
-	Unzip Source and copy in Apache hottdocs root directory<br />
-	Dirrctory Descrioption</p>
<p>/classes	Main              Class Modules<br />
/data_files                    Map Shape Files<br />
/Documentation      	Help and Documentation<br />
/images                         Default Images<br />
/JS                                 			JS API</p>
<p>-  Change tha MySQL Connection Paramere in Class/clsUmnMapDB.php<br />
if(!($dbCon=mysql_connect(&#8220;localhost&#8221;,&#8221;root&#8221;,&#8221;cegis&#8221;)))<br />
-	Check the default map file (testMap.map) parameters. Extends parameter set a dummy value. Please keep extends value unchanged.</p>
<p><strong>Mysql Database Creation</strong><br />
-	Install Mysql 5 or higher<br />
-	Restore mysql dump using Mysql GUI Administration tools from Doccumentation\bdmapper 20090616 1619.sql file.</p>
<p>-	Make sure that  the Connection paramert in class/clsUmnMapDB.php is updated.</p>
<p><strong>Description of the Main pages:</strong></p>
<p>bdmapper.php:<br />
This the main page of the viewer. There the MapID is hard coded to 102. Currently two map date created as example in Mysql database. You should assign this value dynamically. Program use a default map testMap.map. In every post back program store its view state crating temporary (tmp123.map) map in current directory.</p>
<p>testMap.map:<br />
Default Map for the BDMapper.</p>
<p>clsUmnMap.php:<br />
Main Mapping module.</p>
<p>clsUmnMapDB.php:<br />
Data Access Layer of the program</p>
<p>clsGenFunc.php:<br />
Collection of general use functions.</p>
<p>Please read the Doccumentation/Doccumentation.pdf carefully before any modification of the code.</p>
<p>I have published this script without any restriction. You are free to use this script in your product. You just need to acknowledge me.</p>
<p>Sample GIS Data (/data_files) are not available with the source code. You can mail me for the sample data.</p>
<p>Please give your feedback if this post is helpful.</p>
<p>Thanks,<br />
Md. Abul Khayer<br />
GIS Programmer,<br />
CEGIS, Bangladesh.<br />
<a href="http://Khayer.wordpress.com" target="_blank">Khayer.wordpress.com</a><br />
Khayer117@yahoo.com</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khayer.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khayer.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khayer.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khayer.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khayer.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khayer.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khayer.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khayer.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khayer.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khayer.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khayer.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khayer.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khayer.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khayer.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=khayer.wordpress.com&amp;blog=4375788&amp;post=106&amp;subd=khayer&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://khayer.wordpress.com/2009/06/22/bdmapper-for-osgeo-mapserver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a9c0f9c6fbd9af56e19fdeb4d4dadb66?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">khayer</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2009/06/bdmapper_home2.jpg" medium="image">
			<media:title type="html">BdMapper_Home2</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2009/06/bdmapper_zoom.jpg" medium="image">
			<media:title type="html">BdMapper_Zoom</media:title>
		</media:content>

		<media:content url="http://khayer.files.wordpress.com/2009/06/bdmapper_ident.jpg" medium="image">
			<media:title type="html">BdMapper_Ident</media:title>
		</media:content>
	</item>
	</channel>
</rss>
