[mapguide-users] Adding a new Coord Sys

Bruce Dechant bruce.dechant at autodesk.com
Thu May 8 15:42:41 EDT 2008


You are 1/2 way to having this setup. :)

The changes you have done below have updated the server to understand the coordinate system you have added, but you still need to update the web tier.

Make the exact same changes to the same files in the "C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\www" folder.

This is not obvious from the web tier test pages that you are using as the coordinate system APIs only hit the web tier API and don't actually round trip to the server.

After updating both locations with your changes I ran the test and it works as expected.

Coordinate System API: ConvertEpsgCodeToWkt

EPSG Code:
900913

OGC WKT:
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"]]

Status:
Pass

Thanks,
Bruce


-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of BenoitBegin
Sent: Thursday, May 08, 2008 10:48 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Adding a new Coord Sys


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.

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list