Discussion:
[mapguide-users] New coordinate system definition
Posta Fabio GEOnWeb
2018-03-23 16:12:26 UTC
Permalink
Dear all,

We have a trouble with a new coordinate system definition which is now mandatory by law and is missing on mapguide.

Here in Italy we have a new coordinate system used in some Departments whose territory falls in both UTM zones 32N and 33N (i.e. crosses the meridian of 12°E).

EPSG code is 6876 and you can find its definition on http://www.epsg-registry.org



How can I add this new coordinate system to the mapguide library in order to find it when I want to assign it to a new map?

I already have all the parameters of the new system but I don’t know physically which files to modify and which procedure to follow.

Do you have any advice?

Thank you so much,

Fabio Rizzato
Jackie Ng
2018-04-05 17:07:37 UTC
Permalink
Un-tested pseudo code pattern:

1. Create a MgCoordinateSystemFactory()
2. Get its MgCoordinateSystemCatalog ( .GetCatalog() )
3. Get one or more of the required dictionaries:
a. The coordinate system dictionary ( .GetCoordinateSystemDictionary() )
b. The datum dictionary ( .GetCoordinateSystemDatumDictionary() )
c. The geodetic path dictionary ( .GetGeodeticPathDictionary() )
d. The geodetic transform def dictionary (
.GetGeodeticTransformDefDictionary() )
4. For any of the dictionaries, you can create a new instance of said item
with NewXXX(). For example, wiht MgCoordinateSystemDictionary, you'd call
NewCoordinateSystem() on it to create a new MgCoordinateSystem instance.
5. Set various properties in this item with the respective SetXXX() methods.
6. Call Add() on the respective dictionary passing in the new item. This
will create the definition in the underlying dictionary file.

The unknowns are whether the SetXXX() methods in MgCoordinateSystem cover
all the settings/parameters of your new coordinate system. I guess the
easiest way to find out is to get a MgCoordinateSystem that exists and is
similar to the one you want to add and just fully inspect all of its
settings and parameters so you know what needs to be set.

The other unknown is that I'm certain this pseudo-code pattern will try to
write to the system-installed dictionaries by default, which will be
write-protected so some exception will probably be thrown. There is a notion
of user dictionaries (as stated here:
https://trac.osgeo.org/mapguide/wiki/MapGuideRfc127), but actual
documentation on how to know whether you're accessing system or user
installed dictionaries is not available. You're gonna have to really trial
and error the various MgCoordinateSystem* APIs available.

Failing this, I suppose you could always file a bug on the CS-Map repo
(https://trac.osgeo.org/csmap) to request this coordinate system be added.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Loading...