Opened 14 years ago

Closed 14 years ago

#1468 closed enhancement (fixed)

Unset the EPSG code when cloning a Coordinate System entity

Reported by: baertelchen Owned by: brucedechant
Priority: low Milestone: 2.3
Component: General Version: 2.1.0
Severity: minor Keywords:
Cc: External ID:

Description (last modified by brucedechant)

Currently, when calling one of the various CreateClone() methods in the Mg Coordinate System (CS) API, all of the entity's data is copied - incl. the EPSG code. This opens the door for inconsistencies, because the cloned entity becomes editable and can be saved to the dictionaries. Keeping the EPSG code creates a mess, because the underlying CsMap NameMapper component doesn't even consider the EPSG field in the dictionaries but does the mapping on its own.

When assuming that a caller clones a CS entity to modify it, it's safe to unset the EPSG code because the underlying definition is about to change anyway and will thus no longer match the definition as defined by the EPSG.

Attachments (1)

UnsetEpsgCodeOnCloning.patch (3.6 KB ) - added by baertelchen 14 years ago.
Patch that modifies the CreateClone() implementation for Ellipsoids, Datums, Cs, GeodeticPaths, GeodeticTransformations to unset the EPSG code (set to 0))

Download all attachments as: .zip

Change History (4)

by baertelchen, 14 years ago

Patch that modifies the CreateClone() implementation for Ellipsoids, Datums, Cs, GeodeticPaths, GeodeticTransformations to unset the EPSG code (set to 0))

comment:1 by brucedechant, 14 years ago

Description: modified (diff)

comment:2 by brucedechant, 14 years ago

Milestone: 2.3
Owner: set to brucedechant

comment:3 by brucedechant, 14 years ago

Resolution: fixed
Status: newclosed

Submitted r5296

Note: See TracTickets for help on using tickets.