[mapguide-trac] #1835: CCoordinateSystemCategory::AddCoordinateSystem cuts off CoordinateSystems if the targeted category contains duplicate entries

MapGuide Open Source trac_mapguide at osgeo.org
Mon Oct 17 08:03:48 EDT 2011


#1835: CCoordinateSystemCategory::AddCoordinateSystem cuts off CoordinateSystems
if the targeted category contains duplicate entries
---------------------------+------------------------------------------------
   Reporter:  baertelchen  |       Owner:  baertelchen                                              
       Type:  defect       |      Status:  new                                                      
   Priority:  low          |   Milestone:                                                           
  Component:  General      |     Version:  2.2.0                                                    
   Severity:  minor        |    Keywords:  Coordinate system API invalid category dictionary CSD ASC
External_id:               |  
---------------------------+------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1835>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list