[Mapserver-users] rojection library error. no system list, errno: 2

Benjamin Thelen benjamin.thelen at ccgis.de
Thu May 8 12:33:59 EDT 2003


Hi Frank,

thanks to you. Sorry for that long mail again, I am still stuck and could
not find any more helpful information in the mailing list archives or at
MapServerWiki.

shp2img responds the same error message!!

----------------------------------------------------------------------------
--------------------
root at qwertzuiop# /usr/home/src/mapserver-3.6.5/shp2img -m
/usr/home/umn/test1.map -o /tmp/test
pj_open_lib(proj_def.dat): call fopen(/usr/local/share/proj/proj_def.dat).
pj_open_lib(EPSG): call fopen(/usr/local/share/proj/EPSG).
msProcessProjection(): Projection library error. no system list, errno: 2
----------------------------------------------------------------------------
--------------------

Is this maybe a hint? Why does proj -v find the epsg file (see below) and
shp2img not?

Why is shp2img not installed in /usr/local/bin/ like "shp2pgsql"? Is that
ok?



I then checked all permissions. Everybody has read permissions on
/usr/local/share/proj/epsg, as you can see below in the directory listing.

benjamin at qwertzuiop> cd /usr/local/share/proj/
benjamin at qwertzuiop> l epsg
-r--r--r--  1 root  wheel  196424 Mar 25 18:24 epsg

Apache runs as user www (or nobody on Linux), so I suppose cgi-processes are
run with the same user...?!


I have my umn data in /usr/home/umn:
data/test/ --> SHAPEPATH
sessions/ --> IMAGEPATH
symbols/
test1.map

I checked permissions within /usr/home/umn. At least everyone has r--. Maybe
that is not enough. But I don't think so, because, why should rwx be
neccessary.
At last I've downloaded the latest epsg-file, changed the owner from root to
an ordinary user and made chmod 777. Changing user and permissions does't
help at all.


Then I found out the following strange thing:

root at qwertzuiop# proj -v +init=epsg:31493
pj_open_lib(epsg): call fopen(/usr/local/share/proj/epsg).
Rel. 4.4.5, 9 January 2002
<proj>:
projection initialization failure
cause: no options found in 'init' file
program abnormally terminated

root at qwertzuiop# proj -v +init=epsg:4326
pj_open_lib(epsg): call fopen(/usr/local/share/proj/epsg).
Rel. 4.4.5, 9 January 2002
<proj>:
+proj=latlong unsuitable for use with proj program.
program abnormally terminated


Then I found out that there are no entries for epsg:3149X in the new
epsg-file!!?? So I took the old epsg-file. There are epsg:3149X entries in
it. proj -v +init=epsg:4326 responds the same.


Do you have an another idea what's that "no system list"-thing is?


Thanks in advance,
Benjamin




Maybe it provides some helpful information, here is my map-file:

----------------------------------------------------------------------------
MAP
  NAME "test1"
  STATUS ON
  #EXTENT 5.88 46.6213 15 55.7187
EXTENT 3230000 5230448 3965190 6130010 #5.88 46.6213 15 55.7187
PROJECTION
"init=EPSG:31493"
END
  SIZE 650 420
  SHAPEPATH "/usr/home/umn/data/test/"
  #SYMBOLSET "/usr/home/umn/symbols/symbols.sym"
  #FONTSET "/usr/home/umn/fonts/fonts.list"
  IMAGECOLOR 255 255 255
  TRANSPARENT ON 		 			#ON|OFF Backgroundcolor fur Karten transparent; def
off
  UNITS METERS 					 #Units mapcoordinates; fur scale/scalebar Berechnungen
  RESOLUTION 72					 #Pixel/inch fur Output (scalecomputation; def 72),
vorher 300
  INTERLACE OFF
  IMAGETYPE PNG							#output imagetype
  WEB
    MINSCALE 1
		MAXSCALE 100000000000000000
    #TEMPLATE "templates/client.html"
    IMAGEPATH "/usr/home/umn/sessions/"
    IMAGEURL "http://qwertzuiop/umn/sessions/"
    TEMPLATE "/usr/home/umn/templates/test3.html"
   # LOG "./umn.log"
    METADATA
      "WMS_ACCESSCONSTRAINTS"    "none"
      "WMS_SRS"   "EPSG:4326"
	#"WMS_SRS"   "EPSG:31493"
      "WMS_ONLINERESOURCE"
"http://qwertzuiop/cgi-bin/mapserv?map=../../../home/umn/test1.map"
      "WMS_TITLE"    "Germany"
      "WMS_FEATURE_INFO_MIME_TYPE"    "text/html"
      "WMS_ABSTRACT"    "Germany"
    END
  END

#------------------------
  LAYER
    NAME "Grenze"
    STATUS ON
    DATA "grenze.shp"
    TYPE POLYGON
	PROJECTION
		"init=EPSG:4326"
	END
    UNITS METERS
    SIZEUNITS PIXELS
    MINSCALE 0
    MAXSCALE 100000000000000000
    METADATA
      "WMS_SRS"    "EPSG:4326"
      "WMS_TITLE"    "Grenze"
      "WMS_FEATURE_INFO_MIME_TYPE"    "text/html"
    END
    CLASS
      SYMBOL 0
      COLOR 255 204 102
    END
  END
END	 #End mapfile
----------------------------------------------------------------------------







> -----Original Message-----
> From: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of Frank
> Warmerdam
> Sent: Monday, May 05, 2003 7:38 PM
> To: Benjamin Thelen
> Cc: UMN MapServer
> Subject: Re: [Mapserver-users] rojection library error. no system list,
> errno: 2
>
>
> Benjamin Thelen wrote:
> > I set the environment variable PROJ_LIB directly in a shell:
> > "set PROJ_LIB=/usr/local/share/proj".
> > But that didn't help as well.
> >
> >
> >
> > I thought it could be something with file permissions, but I
> don't think,
> > proj4 is not allowed to access its own files. I have no more
> ideas at the
> > moment. Anybody another idea?
> > Sorry for my three mails. I was a bit to fast writing to the list.
>
> Benjamin,
>
> I haven't traced through everything you have tried, but permissions can
> certainly be an issue under some circumstances.  Note that PROJ only has
> the permission available to the cgi-bin process it is called from
> when used
> in a web environment.  So if your webserver runs cgi-bin programs
> as "nobody"
> please verify that the nobody user has read permissions on
> /usr/local/share/proj/epsg.
>
> You should also verify that things work fine in your commandline
> environment.
> For instances, does shp2img work on your map?  Does proj?  Try this:
>
> warmerda at gdal2200[90]% setenv PROJ_DEBUG
> warmerda at gdal2200[91]% proj -v +init=epsg:27700
> pj_open_lib(epsg): call fopen(/usr/local/share/proj/epsg) - succeeded
> #Transverse Mercator
> #       Cyl, Sph&Ell
> # +init=epsg:27700 +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000
> # +y_0=-100000 +ellps=airy +units=m +no_defs
>
> Best regards,
>
> --
> ---------------------------------------+--------------------------
> ------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>




More information about the mapserver-users mailing list