[mapguide-users] linux wms problem solved.

larry white larz at neomatix.ca
Fri Jun 29 10:28:52 EDT 2007


not sure if others have been struggling with getting wms to work
properly in linux, but i have been for a while.

any attempts to load wms layers published through mapguide would result
in error messages about 'coordinate system conversion problems' and an
'unsupported coordinate system', even though a standard coordinate
system - epsg:4326 - was being used.

my apologies if this is redundant information, but i was unable to find
a solution anywhere, so i decided to dig into things and eventually got
it figured out.



short story:
a file, 'categories.txt', is in the wrong place.
it should be in the PROJ_LIB dir (.../server/bin/nad), but currently
resides in .../server/bin.


long story:
the problem revolved around proj4 being unable to deal with any
coordinate system category other than 'arbitrary x-y'.

according to the mapagent, the only coordinate system category available
in linux was 'arbitrary x-y', while windows had that category and 2
others: 'epsg' and 'world'.

it took a bit to track down the problem, but finally found something in
the mg coordinate system source code that made me realize that
'arbitrary x-y' are built-in and other categories are found in a file
named 'categories.txt'.

so i went hunting for that file and found it in .../server/bin.
hmmm, that's interesting.... the contents of that file are entries for
'epsg' and 'world'. coincidence? i think not.
eureka... proj4 needs to read this file, but currently isn't.

in the mg startup script, an environment variable, 'PROJ_LIB', is set to
point to the directory where the coordinate system definition files
(eg, epsg) are found. however, 'categories.txt' was not in the
'PROJ_LIB' dir in linux, meaning it was not being read.
(*note: 'categories.txt' is located in .../Server/Bin in windows, not in
PROJ_LIB, yet wms works properly)

once i copied the file into the correct directory in linux -
.../server/bin/nad - and restarted mapguide, wms worked properly.

i verified this via the mapagent and by successfully testing wms layers
in udig.



-- 
larry white
Senior Systems Analyst
Neomatix Corporation
email: larz at neomatix.ca
url: www.neomatix.ca



More information about the mapguide-users mailing list