[mapguide-users] Adding a new Coord Sys
Bruce Dechant
bruce.dechant at autodesk.com
Fri May 9 16:33:09 EDT 2008
You are correct as Studio uses a different coordinate system library - ie: Mentor.
This is one of the reasons why open sourcing Mentor will benefit MGOS because MGOS could use Mentor which Studio uses. :)
Bruce
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of BenoitBegin
Sent: Friday, May 09, 2008 8:38 AM
To: mapguide-users at lists.osgeo.org
Subject: Re: [mapguide-users] Adding a new Coord Sys
Thanks! That worked great. I should've thought about it, but I figured the
server was the only thing that needed that information.
Now my second tricky question is about then using that coordinate system in
a map. I'm guessing the answer already, but you will have to use that
coordinate system manually and not set it through Autodesk Mapguide Studio
2008/2009? The Studio, I presume, is using the coordinate systems defined in
Mentor and not a list retrieved from the server? If so, my best bet would
just to use the SetResource agent call to modify the resource to use the
right coordinate system?
BenoitBegin wrote:
>
> 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-tp17129098p17149433.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