<div dir="ltr">I am not sure this will help or not.... <br><br>I found two epsg files in my /usr/local/share/proj directory: <br><br>epsg <br>EPSG (in caps)<br><br>I modify the values in both the files for my use. You can also try the same <br>
<br>Regards,<br>Ritesh Ambastha<br><br>/usr/local/share/proj/epsg<br><br><div class="gmail_quote">On Thu, Aug 21, 2008 at 5:41 PM, Subha Ramakrishnan <span dir="ltr">&lt;<a href="mailto:subha@gslab.com">subha@gslab.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
Could you also check the map file and tell me if i am making a mistake there?<br>
This is the map file i am using.<div><div></div><div class="Wj3C7c"><br>
MAP<br>
NAME MAP_POINTS<br>
SIZE 725 800<br>
IMAGETYPE PNG<br>
EXTENT 6679169.446666667 -7.081154550627918 11131949.077777777 4865942.278825832<br>
WEB<br>
METADATA<br>
 &nbsp;wms_srs &quot;EPSG:4326 EPSG:900913&quot;<br>
END<br>
END<br>
PROJECTION<br>
&quot;init=epsg:900913&quot;<br>
END<br>
LAYER<br>
CONNECTIONTYPE postgis<br>
NAME indiastates<br>
CONNECTION &quot;user=postgres dbname=test host=localhost&quot;<br>
TYPE POINT<br>
STATUS DEFAULT<br>
#DATA &quot;topology from states&quot;<br>
DATA &quot;topology from india_states using unique id using SRID -1&quot;<br>
CLASS<br>
 &nbsp;COLOR 255 0 0<br>
END<br>
END<br>
END<br>
<br></div></div>
Is it possible for you to share your map file if you have any?<br>
<br>
Regards,<div class="Ih2E3d"><br>
Subha<br>
<br>
Rafael Almeida Fernandez Soto wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
Subha..<br>
<br>
You need to insert a EPSG:900913 description code in PROJ4 config files and a row in spatial_ref_sys table in postgis DB. By default PROJ4 has not a 900013 projection reference.<br>
<br>
Try it!<br>
<br>
Best regards<br>
<br>
Rafael Soto<br>
<br></div>
2008/8/20 Subha Ramakrishnan &lt;<a href="mailto:subha@gslab.com" target="_blank">subha@gslab.com</a> &lt;mailto:<a href="mailto:subha@gslab.com" target="_blank">subha@gslab.com</a>&gt;&gt;<div><div></div><div class="Wj3C7c">
<br>
<br>
 &nbsp; &nbsp;Hi :<br>
 &nbsp; &nbsp;We are building a map based web portal using openlayers ,UMN<br>
 &nbsp; &nbsp;mapserver[5.0.2] and postgis DB.We use google as the base map<br>
 &nbsp; &nbsp;through openlayers.We need to overlay our custom layers from the<br>
 &nbsp; &nbsp;db on top of this base map, for that we are using Mapserver (is<br>
 &nbsp; &nbsp;run on a FC7 linux machine). It is observed that by default<br>
 &nbsp; &nbsp;openlayers converts google projection [900913] to EPSG:4326 when<br>
 &nbsp; &nbsp;the base map is fetched.<br>
<br>
 &nbsp; &nbsp;Now when we try to overlay an image that the mapserver generates,<br>
 &nbsp; &nbsp;there is a mismatch on the base map, though mapserver uses<br>
 &nbsp; &nbsp;epsg::4326. After searching over the internet theere seems to be<br>
 &nbsp; &nbsp;only one solution which is displaying the base map itself in<br>
 &nbsp; &nbsp;epsg:900913 and emit the mapserver image also in the same<br>
 &nbsp; &nbsp;projection. The problem is we are not able to generate an image<br>
 &nbsp; &nbsp;through mapserver in epsg::900913.<br>
<br>
 &nbsp; &nbsp;We have taken following measures untill now :<br>
<br>
 &nbsp; &nbsp;1&gt; For using epsg:900913 projection in mapserver, we have added<br>
 &nbsp; &nbsp;following entry in the /usr/local/share/proj/epsg file.[proj<br>
 &nbsp; &nbsp;version 4.6]<br>
 &nbsp; &nbsp; &quot;&lt;900913&gt; +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0<br>
 &nbsp; &nbsp;+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs &lt;&gt;&quot; &nbsp;2&gt;<br>
 &nbsp; &nbsp;We have added following entry in the &quot;in the spatial_ref_sys table<br>
 &nbsp; &nbsp;in postgis DB.<br>
 &nbsp; &nbsp;&quot;900913 ,&#39;EPSG&#39;,900913,&#39;GEOGCS[&quot;WGS 84&quot;, DATUM[&quot;World Geodetic<br>
 &nbsp; &nbsp;System 1984&quot;, SPHEROID[&quot;WGS 84&quot;, 6378137.0,<br>
 &nbsp; &nbsp;298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],<br>
 &nbsp; &nbsp;AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;, 0.0,<br>
 &nbsp; &nbsp;AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]], UNIT[&quot;degree&quot;,0.017453292519943295],<br>
 &nbsp; &nbsp;AXIS[&quot;Longitude&quot;, EAST], AXIS[&quot;Latitude&quot;,<br>
 &nbsp; &nbsp;NORTH],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],<br>
 &nbsp; &nbsp;PROJECTION[&quot;Mercator_1SP&quot;],PARAMETER[&quot;semi_minor&quot;, 6378137.0],<br>
 &nbsp; &nbsp;PARAMETER[&quot;latitude_of_origin&quot;,0.0], PARAMETER[&quot;central_meridian&quot;,<br>
 &nbsp; &nbsp;0.0], PARAMETER[&quot;scale_factor&quot;,1.0], PARAMETER[&quot;false_easting&quot;,<br>
 &nbsp; &nbsp;0.0], PARAMETER[&quot;false_northing&quot;, 0.0],UNIT[&quot;m&quot;, 1.0], AXIS[&quot;x&quot;,<br>
 &nbsp; &nbsp;EAST], AXIS[&quot;y&quot;, NORTH],AUTHORITY[&quot;EPSG&quot;,&quot;900913&quot;]] |&#39;,&#39;+proj=merc<br>
 &nbsp; &nbsp;+a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0<br>
 &nbsp; &nbsp;+k=1.0 +units=m +nadgrids=@null +no_defs&#39;); &nbsp;The mapfile is as<br>
 &nbsp; &nbsp;follows: (With this, We get a blank image without any exception.)<br>
 &nbsp; &nbsp;MAP<br>
 &nbsp; &nbsp;NAME MAP_POINTS<br>
 &nbsp; &nbsp;SIZE 725 800<br>
 &nbsp; &nbsp;IMAGETYPE PNG<br>
 &nbsp; &nbsp;EXTENT 6679169.446666667 -7.081154550627918 11131949.077777777<br>
 &nbsp; &nbsp;4865942.278825832<br>
 &nbsp; &nbsp;WEB<br>
 &nbsp; &nbsp;METADATA<br>
 &nbsp; &nbsp; &nbsp; wms_srs &quot;EPSG:4326 EPSG:900913&quot;<br>
 &nbsp; &nbsp;END<br>
 &nbsp; &nbsp;END<br>
 &nbsp; &nbsp;PROJECTION<br>
 &nbsp; &nbsp;&quot;init=epsg:900913&quot;<br>
 &nbsp; &nbsp;END<br>
 &nbsp; &nbsp;LAYER<br>
 &nbsp; &nbsp;CONNECTIONTYPE postgis<br>
 &nbsp; &nbsp;NAME indiastates<br>
 &nbsp; &nbsp;CONNECTION &quot;user=postgres dbname=test host=localhost&quot;<br>
 &nbsp; &nbsp;TYPE POINT<br>
 &nbsp; &nbsp;STATUS DEFAULT<br>
 &nbsp; &nbsp;#DATA &quot;topology from states&quot;<br>
 &nbsp; &nbsp;DATA &quot;topology from india_states using unique id using SRID -1&quot;<br>
 &nbsp; &nbsp;CLASS<br>
 &nbsp; &nbsp; &nbsp; COLOR 255 0 0<br>
 &nbsp; &nbsp;END<br>
 &nbsp; &nbsp;END<br>
 &nbsp; &nbsp;END<br>
<br>
 &nbsp; &nbsp;The client (openlayer) code is as follows :<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;options = {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;displayProjection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;units: &quot;m&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;maxResolution: 156543.0339,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;maxExtent: new OpenLayers.Bounds(-20037508, -20037508,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 20037508, 20037508.34)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;};<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map = new OpenLayers.Map(&#39;map&#39;, options);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var gphy = new OpenLayers.Layer.Google(&quot;Google<br>
 &nbsp; &nbsp;Physical&quot;,{type: G_PHYSICAL_MAP,&#39;sphericalMercator&#39;: true}); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.addLayers(gphy);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var lonLat = new OpenLayers.LonLat(82, 23) ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp;lonLat.transform(map.displayProjection,map.getProjectionObject());<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.setCenter(lonLat,5);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var wms ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wms = new OpenLayers.Layer.WMS( layername,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;<a href="http://localhost/cgi-bin/mapserv" target="_blank">http://localhost/cgi-bin/mapserv</a>?&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ map: &#39;demo.map&#39;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;projection:&quot;EPSG:900913&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;transparent: &#39;true&#39;, layers: &#39;indiastates&#39;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;format: &#39;image/png&#39;},{singleTile: &#39;true&#39;} );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.addLayer(twms1);<br>
<br>
 &nbsp; &nbsp;Can anyone help us in any way?<br>
 &nbsp; &nbsp;Also,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;We have tried overlaying layer fetched from our map server<br>
 &nbsp; &nbsp;on different basemaps from (meta carta and tera pages) and have<br>
 &nbsp; &nbsp;found it overlays perfectly &nbsp;So clearly there is is problem<br>
 &nbsp; &nbsp;overlaying on google map through openlayers in epsg : 4326.<br>
 &nbsp; &nbsp;Thanks and sorry for the long mail.<br>
 &nbsp; &nbsp;Expecting a reply.<br>
<br>
 &nbsp; &nbsp;Subha.<br>
 &nbsp; &nbsp;_______________________________________________<br>
 &nbsp; &nbsp;mapserver-users mailing list<br>
 &nbsp; &nbsp;<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br></div></div>
 &nbsp; &nbsp;&lt;mailto:<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a>&gt;<div class="Ih2E3d"><br>
 &nbsp; &nbsp;<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<br>
<br>
<br>
-- <br></div>
RAFAEL Almeida Fernandez Soto :: <a href="mailto:rafael@opengeo.com.br" target="_blank">rafael@opengeo.com.br</a> &lt;mailto:<a href="mailto:rafael@opengeo.com.br" target="_blank">rafael@opengeo.com.br</a>&gt;<div class="Ih2E3d">
<br>
Consultant in FOSS GIS :: 55 21 2518-6233 :: 55 71 8802-0600<br></div>
OpenGEO :: On-demand training and solutions :: <a href="http://www.opengeo.com.br" target="_blank">www.opengeo.com.br</a> &lt;<a href="http://www.opengeo.com.br" target="_blank">http://www.opengeo.com.br</a>&gt;<br>
GEO Livre community:: Because Geoinformation should be free :: <a href="http://www.geolivre.org.br" target="_blank">www.geolivre.org.br</a> &lt;<a href="http://www.geolivre.org.br" target="_blank">http://www.geolivre.org.br</a>&gt;<div class="Ih2E3d">
<br>
Be free by using Free Software, such as MapServer, PostgreSQL/PostGIS, gvSIG...<br>
<br></div><div class="Ih2E3d">
-- <br>
This message has been scanned for viruses and<br>
dangerous content by *MailScanner* &lt;<a href="http://www.mailscanner.info/" target="_blank">http://www.mailscanner.info/</a>&gt;, and is<br>
believed to be clean. <br>
</div></blockquote>
<br>
_______________________________________________<div><div></div><div class="Wj3C7c"><br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br></div>