[mapguide-users] Adding a new Coord Sys

BenoitBegin bbegin at geomapgis.ca
Thu May 8 12:48:10 EDT 2008


I'm trying to add a new coordinate system to MGOS 1.2 (or 2.0, haven't been
able to do it in either one). I tried to do every logical operations I could
think of.

First I go in "C:\Program Files\MapGuideOpenSource\Server\nad" and open the
EPSG file in Wordpad. I add the following 2 lines at the very end:

# Google Maps
<900913> +proj=tmerc +lat_0=0 +lon_0=36 +k=0.999600 +x_0=500000
+y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs  <>

Second, I go in "C:\Program Files\MapGuideOpenSource\Server\data" and open
epsg.wkt in Wordpad. I add the following line at the very end as well:

900913,PROJCS["Google Maps",GEOGCS["unnamed
ellipse",DATUM["unknown",SPHEROID["unnamed",6378137,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],EXTENSION["PROJ4","+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
+nadgrids=@null +wktext  +no_defs"]]


After doing that I restart the service, then I go in the MapAgent test page
(mapguide/mapagent/index.html) and I attempt to see if this new code is
available through the Coordinate System calls. If I try to do the
"ConvertEpsgCodeToWkt" with the code 900913, I get an error message:

The coordinate system conversion failed. Failed to convert EPSG code
"900913" to WKT. EPSG PCS/GCS code 900913 not found in EPSG support files.
Is this a valid EPSG coordinate system?

If I try to list all of the EPSG coordinate systems using
"EnumerateCoordinateSystems", the code I added is not listed. I'm certain
that the WKT is valid, as I tested it using the "IsValid" command and it
returns true. I'm also sure it's not a problem with the PROJ4 definition, as
I have tried to use an existing, working coordinate system and just make my
900913 system be that definition, and it didn't work.

So simply put, is it even doable to add a coordinate system to MGOS?
-- 
View this message in context: http://www.nabble.com/Adding-a-new-Coord-Sys-tp17129098p17129098.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list