YES!!! You put your finger on the problem. I was fighting with the wrong
epsg file. I did compile the program from source and the correct file
was in /usr/local/share/proj. I've also found out that on unix systems
at least that the 'epsg' in "init=epsg:900913" is case-sensitive and
refers to the actual file. And finally, the mapfile directive CONFIG
"PROJ_LIB" "/usr/share/proj" really needs those quotes. Just a wee
deviation like CONFIG PROJ_LIB "/usr/share/proj" (no quotes around the
PROJ_LIB) and your beer goes flat.
Thanks a million!
- Bill
Daniel Morissette wrote:
Bill Thoen wrote:
However, this doesn't work with my MapServer:
PROJECTION
"init=epsg:900913"
END
and throws the error:
"Projection library error. no options found in 'init' file "
I've put the google projection record in /usr/share/proj/epsg, but
MapServer doesn't seem to find it (although it has no trouble finding
other projections.) Is there some sort of indexing or registering
I've got to do on this file?
The message "no options found in 'init' file" relates to the
"init=epsg:900913" directive. It means that an init file (called
"epsg" in this case) was found in PROJ4's data directory, but the
definition for code 900913 was not found in it. There is no indexing
required for init files. You just need to follow the right syntax when
adding new codes.
If you verified that the code for 900913 is present in your
/usr/share/proj/epsg file then the only explanation I can think of
would be that your MapServer/PROJ installation looks for and finds the
epsg file somewhere else on the system. For instance, if you compiled
PROJ4 yourself without specifying an explicit prefix (--with-prefix),
then by default the local build will look in /usr/local/share/proj and
not /usr/share/proj.
Also, see of the variable PROJ_LIB is set in your web server
environment or in a CONFIG directive in the mapfile. If it is set then
it points to the directory where PRPJ4 will look for the epsg init file.
Finally, you could try renaming the /usr/share/proj/epsg file to
something else and see if the error message changes. If the init file
is not found then the error should turn to "Projection library error.
no system list" ... if you don't get that error after renaming the
epsg file then your mapserver is definitely not using the epsg file
that you thought.
Daniel
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users