Monday 2 September 2013

MapGuide tidbits: Coordinate System support in mg-desktop

Here's a quick tidbit about Coordinate Systems in mg-desktop.

Whether you're using the zip distribution of mg-desktop or you installed the cs-map-dictionaries NuGet package, your mg-desktop application will not be supporting the full set of several-thousand-odd coordinate systems that any other application using CS-Map does.

The reason for this is simply: size.

NuGet has a 30mb limit on its package files, so the decision was made to have a stripped-down set of coordinate system dictionary files to support the NuGet user story. Similarly, the zip distribution of mg-desktop contains a stripped-down subset for the same reason: If you're building an mg-desktop application, you probably don't need to support all 4000+ coordinate systems and chances are the coordinate system you're working with will be in this stripped-down subset.

So what coordinate system files did we strip out for mg-desktop? All the country-specific grid files have been stripped out.



So now the question becomes: How can I use a coordinate system that's in one of these country grid files in my mg-desktop application?

The answer is to simply take a copy of the grid file(s) from an equivalent installation of MapGuide Open Source (ie. A MapGuide with the same major.minor version number as your version of mg-desktop). If you don't have MGOS installed, you can take a copy of the grid file(s) from the equivalent MapGuide InstantSetup bundle.

Drop one or more of these folders into your mg-desktop application's Dictionaries folder and your mg-desktop application should now support the coordinate systems defined in this grid files as well.

No comments: