<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Jukka,<br>
<br>
I have added the PROJ_LIB statement in the map file. Unfortunately,
nothing changes... strace still shows that shp2img tries to read
/usr/share/proj/null (and it succeeds).<br>
I have added the line with the google projection to the end of the epsg
(and null) file.<br>
<br>
I still get the same error.<br>
<br>
Is there any way I can call proj + some parameters to ask for a
projection between WGS84 to Google? I'd like to close in on the problem.<br>
<br>
Thanks,<br>
Adrian<br>
<br>
Rahkonen Jukka wrote:
<blockquote
 cite="mid:CC197224AC75CE4DB23F739B16891B8601879629@tikka.haapa.mmm.fi"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2900.3603" name="GENERATOR">
  <div dir="ltr" align="left"><font color="#0000ff" face="Arial"
 size="2"><span class="078092008-13102009">Hi,</span></font></div>
  <div> </div>
  <div>
  <div dir="ltr" align="left"><font color="#0000ff" face="Arial"
 size="2"><span class="078092008-13102009">First, it is possible to
tell Mapserver where to find the projection files in the mapfile, in
MAP section.  Excerpt from <a moz-do-not-send="true"
 href="http://www.mapserver.org/mapfile/map.html">http://www.mapserver.org/mapfile/map.html</a></span></font></div>
  <div dir="ltr" align="left"><font color="#0000ff" face="Arial"
 size="2"><span class="078092008-13102009"></span></font> </div>
  <div dir="ltr" align="left"><span class="078092008-13102009">
  <dt><font color="#0000ff" face="Arial" size="2">PROJ_LIB [path]<br>
The CONFIG parameter can be used to define the location of your EPSG
files for the Proj.4 library. Setting the [key] to PROJ_LIB and the
[value] to the location of your EPSG files will force PROJ.4 to use
this value. Using CONFIG allows you to avoid setting environment
variables to point to your PROJ_LIB directory. Here are some examples:</font></dt>
  <dt><font color="#0000ff" face="Arial" size="2">Unix</font></dt>
  <dt><font color="#0000ff" face="Arial" size="2">CONFIG "PROJ_LIB"
"/usr/local/share/proj/"</font></dt>
  </span></div>
  <div dir="ltr"><span class="078092008-13102009"></span> </div>
  </div>
  <div><span class="078092008-13102009"></span> </div>
  <div><span class="078092008-13102009"><font color="#0000ff"
 face="Arial" size="2">Second, M</font></span><font color="#0000ff"
 face="Arial" size="2"><span class="078092008-13102009">apserver epsg
file ships without Google projection. Without adding the definition it
is impossible to refer to epsg:900913 projection with the code number.
Have you added corresponding line to the epsg file, whitch is usually
in /usr/share/proj/epsg?</span></font></div>
  <div><font color="#0000ff" face="Arial" size="2"><span
 class="078092008-13102009"></span></font> </div>
  <div dir="ltr" align="left"><font color="#0000ff" face="Arial"
 size="2"><span class="078092008-13102009">&lt;900913&gt; +proj=merc
+a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0
+units=m <a moz-do-not-send="true" href="mailto:+nadgrids=@null">+nadgrids=@null</a>
+no_defs</span></font></div>
  <div> </div>
  <div><span class="078092008-13102009"><font color="#0000ff"
 face="Arial" size="2">Put it on the first line so Mapserver finds it
immediately without a need to go through the whole list. </font></span></div>
  <div><span class="078092008-13102009"></span> </div>
  <span class="078092008-13102009">
  <div dir="ltr"><span class="078092008-13102009"><font color="#0000ff"
 face="Arial" size="2">-Jukka Rahkonen-</font></span></div>
  <br>
  <blockquote
 style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
    <div class="OutlookMessageHeader" dir="ltr" align="left" lang="fi">
    <hr tabindex="-1"> <font face="Tahoma" size="2"><b>L�hett�j�:</b>
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>] <b>Puolesta </b>Adrian
Popa<br>
    <b>L�hetetty:</b> 13. lokakuuta 2009 10:55<br>
    <b>Vastaanottaja:</b> Lars Lingner<br>
    <b>Kopio:</b> <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
    <b>Aihe:</b> Re: [mapserver-users] msProcessProjection():
Projection library error.no system list, errno: 13<br>
    </font><br>
    </div>
Update:<br>
    <br>
I have symlinked the null file to epsg, and now strace shows that the
file is read, but I still get the same error when trying to call WMS
GetMap... :(<br>
    <br>
[root@terra map]# ls -l /usr/share/proj/null<br>
lrwxrwxrwx 1 root root 20 Oct 13 10:50 /usr/share/proj/null -&gt;
/usr/share/proj/epsg<br>
    <br>
    <br>
Adrian Popa wrote:
    <blockquote cite="mid:4AD43115.9050405@romtelecom.ro" type="cite">Thank
you for your reply Lars, my info is inline.<br>
      <br>
Lars Lingner wrote:
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">Adrian Popa schrieb:
  </pre>
        <blockquote type="cite">
          <pre wrap="">Hmm, any idea on this one? How can I find out if proj is trying to read
the epsg file? I'm thinking of using strace to see what files it tries
to open, but I don't know what syntax to use to try to project from 4326
to 900913...

    </pre>
        </blockquote>
        <pre wrap=""><!---->

Just to clarify:

- Your data is in wgs84 (epsg:4326)
  </pre>
      </blockquote>
Yes<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">- you want to serve mercator projection (epsg:900913)
  </pre>
      </blockquote>
Yes (the frontend will be OpenLayers (through TileCache)<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">A few questions:

- are there any errors in the capabilities document?
  </pre>
      </blockquote>
No, it looks ok. I can post it if you want, but it's a bit large. It
outputs an XML which describes the layers, projections and some
settings from the map file. I haven't seen another working
GetCapabilites file, so I can't tell if it's missing something...<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">- did you tried to use mapserver logging (MS_ERRORFILE) and high debug
level (DEBUG 5)
  </pre>
      </blockquote>
Here is the output after enabling MS_ERRORFILE and DEBUG 5 at layer
level and at map level:<br>
[Tue Oct 13 10:36:36 2009].954434 msProcessProjection(): Projection
library error. no system list, errno: 13<br>
      <br>
[Tue Oct 13 10:36:36 2009].954562 mapserv request processing time
(msLoadMap not incl.): 0.000s<br>
[Tue Oct 13 10:36:36 2009].954584 msFreeMap(): freeing map at 0x8496ac8.<br>
[Tue Oct 13 10:36:36 2009].954651 freeLayer(): freeing layer at
0x84a9378.<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">- could you try to use shp2img, maybe this gives you a bit more information?
  </pre>
      </blockquote>
[root@terra map]# shp2img -o /tmp/out.png -m
/var/www/html/map/rtc_base.map -e "20.259999999999998 43.16
29.700000000000003 49.2016" -s "1250 800" -l "GranitaJudete"<br>
This works just fine (however it doesn't use WMS!). The image displayed
is correct (and it is projected in mercator projection!).<br>
      <br>
If I run:<br>
[root@terra map]# strace shp2img -o /tmp/out.png -m
/var/www/html/map/rtc_base.map -e "20.259999999999998 43.16
29.700000000000003 49.2016" -s "1250 800" -l "GranitaJudete"
2&gt;&amp;1 | grep epsg<br>
.. I don't get any matches on the epsg file that is supposed to be used
by proj.<br>
Looking through the output of strace, I can see it tries to open some
proj-related files...<br>
open("/usr/share/proj/proj_def.dat", O_RDONLY) = -1 ENOENT (No such
file or directory)<br>
open("/usr/share/proj/null", O_RDONLY)  = -1 ENOENT (No such file or
directory)<br>
      <br>
I wonder why it tries to open a file called null - maybe an error?<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">- did you compile MapServer and the dependencies by yourself?
  </pre>
      </blockquote>
Yes. These are my configure arguments:<br>
./configure --with-freetype --with-png --with-agg=../agg-2.5
--with-proj --with-ogr --with-gdal --with-xml2 --with-wfs --with-wcs \<br>
--with-wmsclient --with-wfsclient --with-postgis --with-threads
--with-sos --with-mygis --with-geos --with-tiff<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">- what MapServer version do you use?
  </pre>
      </blockquote>
version 5.4.1<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">- do you have Proj4 installed? (OpenLayers doesn't use the same lib, it
uses the javascript lib)
  </pre>
      </blockquote>
[adrianp@terra mapserver]$ rpm -qa | grep proj<br>
proj-devel-4.5.0-1.fc5<br>
proj-4.5.0-1.fc5<br>
      <br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">I hope it does not look like keeping you busy, but without further
information its difficult to help.

  </pre>
      </blockquote>
Your help is very much appreciated. Any idea is a good one because it
might get me out of this predicament. :)<br>
Regards,<br>
Adrian<br>
      <br>
P.S. If I understand how projections work - if I "call" the projection
with it's EPSG code it needs the epsg file to get the details about the
projection. In my layers I'm using the EPSG definition instead the EPSG
code to define my projections. If I switch to codes it won't work (I
have tried a few months ago). So, to me, it seems mapserver (or proj)
can't get the definitions from the epsg file (maybe because it searches
for the wrong file). I will try to create the file and try again. I'll
let you know how it works.<br>
      <blockquote cite="mid:4AD418F5.7030602@lingner.eu" type="cite">
        <pre wrap="">Lars
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated"
 href="mailto:mapserver-users@lists.osgeo.org" moz-do-not-send="true">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
 moz-do-not-send="true">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>

  </pre>
      </blockquote>
      <br>
      <pre wrap=""><hr size="4" width="90%">
_______________________________________________
mapserver-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
  </pre>
    </blockquote>
    <br>
  </blockquote>
  </span></blockquote>
<br>
<br>
</body>
</html>