Opened 13 years ago
Last modified 12 years ago
#1835 new defect
CCoordinateSystemCategory::AddCoordinateSystem cuts off CoordinateSystems if the targeted category contains duplicate entries
Reported by: | baertelchen | Owned by: | baertelchen |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | General | Version: | 2.2.0 |
Severity: | minor | Keywords: | Coordinate system API invalid category dictionary CSD ASC |
Cc: | External ID: |
Description
The current Category.CSD (CSMAP coordinate system category dictionary file) file MapGuide is using, contains duplicate entries for the LL category (see also CSMAP ticket 113 http://trac.osgeo.org/csmap/ticket/113).
When trying to add a new system to that category, the code in [CCoordinateSystemCategoryDictionary::Modify] will use all CS names up to the 1st duplicate entry found.
If a duplicate is encountered, the code throws an exception but still(!) writes the modified (and truncated...) list of CS to the file. After the code has effectively truncated the category in the dictionary file on disk, it still reports the "InvalidArgument" exception to the caller.
As the code did always modify (and somehow "fixed") the dictionary no matter what type of exception had been caught in between, the fix is to be less strict in ::CopyFrom() when used from within Modify() and simply skip duplicate entries. Appropriate assertions have to be added though to point to the problem.
Change History (2)
comment:1 by , 12 years ago
Milestone: | → 2.5 |
---|
comment:2 by , 12 years ago
Milestone: | 2.5 |
---|