Hello,<br><br>Sorry  a small mistake, replace  <a href="http://spatialreference.org/ref/epsg/2154/proj4js/" target="_blank">http://spatialreference.org/ref/epsg/2154/proj4js/</a> by  <a href="http://spatialreference.org/">http://spatialreference.org/</a><span id="goog_1070290665"></span><span id="goog_1070290666"></span><a href="http://spatialreference.org/ref/epsg/4326/proj4js/">ref/epsg/4326/proj4js/</a> for comparing with other adress<br>
<br>So the original message corrected below<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>You can make think easier using spatial_ref_sys table of a posgresql database with postgis enabled.<br>
If you look, there&#39;s a column call proj4text in this table.<br><br>If you compare <a href="http://spatialreference.org/">http://spatialreference.org/</a><span id="goog_1070290665"></span><span id="goog_1070290666"></span><a href="http://spatialreference.org/ref/epsg/4326/proj4js/">ref/epsg/4326/proj4js/</a> , <a href="http://spatialreference.org/ref/epsg/4326/proj4/" target="_blank">http://spatialreference.org/ref/epsg/4326/proj4/</a> and &quot;+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs&quot; from spatial_ref_sys table, you see proj4 value = proj4text spatial_ref_sys table and<br>

that proj4 and proj4js are near the same, except some differences.<br><br>You can make all proj4js code using the PHP code below. I suppose you have a Postgis database ready on your computer and you know how to execute php code.<br>

<br>-------------------------------------------------------------------------------------------------------------------------------------------------------<br>&lt;?php<br><br>$conn_string = &quot;host=localhost port=5432 dbname=mydatabase_with_postgis_activated user=my_user password=my_password&quot;;<br>

$link = pg_connect($conn_string) or die(&quot;Could not connect&quot;);<br><br><br>$start_epsg = &#39;Proj4js.defs[&quot;EPSG:&#39;;<br>$end_epsg_start_proj4js = &#39;&quot;] = &quot;&#39;;<br>$end_proj4js =&#39;&quot;;&#39;;<br>

<br>$select_epsg = pg_query(&quot;SELECT srid,trim(proj4text) as proj4text from spatial_ref_sys&quot;);<br><br>/*<br>//Uncomment if you want to make a particular file for proj4js file depending on defined epsgvalues<br>$epsgvalues = &quot;4326,2154&quot;;<br>

$select_epsg = pg_query(&quot;SELECT srid,trim(proj4text) as proj4text from spatial_ref_sys WHERE srid IN(&quot;.$epsgvalues.&quot;)&quot;);<br>*/<br><br>$stringData=&quot;&quot;;<br>while($proj4_code = pg_fetch_array($select_epsg)) {<br>

//To view result<br>echo $start_epsg.$proj4_code[&quot;srid&quot;].$end_epsg_start_proj4js.$proj4_code[&quot;proj4text&quot;].$end_proj4js.&#39;&lt;br/&gt;&#39;;<br>//To prepare content for writing result<br>$stringData.=$start_epsg.$proj4_code[&quot;srid&quot;].$end_epsg_start_proj4js.$proj4_code[&quot;proj4text&quot;].$end_proj4js.&quot;\r\n&quot;;<br>

}<br><br>$myFile = &quot;epsg.js&quot;;<br>$fh = fopen($myFile, &#39;w&#39;) or die(&quot;can&#39;t open file&quot;);<br>fwrite($fh, $stringData);<br>fclose($fh);<br><br>?&gt;<br><br>-------------------------------------------------------------------------------------------------------------------------------------------------------<br>

<br>Regards<br><br>ThomasG<br>GIS specialist<br>
</blockquote><br></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>