[mapserver-users] Problems with Google 900913 Projection and WMS Layers

Daniel Morissette dmorissette at mapgears.com
Wed Mar 18 13:26:21 EDT 2009


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

-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-users mailing list