Opened 13 years ago

Closed 13 years ago

#1576 closed defect (fixed)

Values set via MgCoordinateSystem::SetLonLatBounds() are not written back to CsMap's dictionary for user defined systems

Reported by: baertelchen Owned by: baertelchen
Priority: low Milestone: 2.3
Component: General Version: 2.1.0
Severity: minor Keywords: Coordinate System API SetLonLatBounds MgCoordinateSystem
Cc: External ID:

Description

The MgCoordinateSystem class has an API "SetLonLatBounds". This allows for dynamically setting a range in which coordinates are valid for the respective system. If switched on (i.e. by calling this method with a set of valid parameters), CsMap will fail or at least set a warning, when a coordinate transformation is done with input values that do not fall within the range specified.

Currently, values set via this method will not be saved to CsMap's dictionaries when saving a user-created system. For built-in systems, however, CsMap stores such values in the coordsys.asc dictionary in the MIN_LNG, MIN_LAT, MAX_LNG, MAX_LAT fields.

If the values are not set, CsMap calculates mathematically valid values on the fly, if a coordinate system definition is read from the dictionaries. This might result in values like 197.9998272522.

This ticket is to fix the API as follows:

  • changes only apply to user-defined systems
  • Fix the implementation in coordsys.cpp so that MinMaxLatLon

values are written back to the dictionaries when set before via the API

  • document the methods

Specifically, this ticket is *NOT* about doing any changes to the other existing API [SetXYBounds()].

Change History (1)

comment:1 by baertelchen, 13 years ago

Resolution: fixed
Status: newclosed

Has been fixed in revision 5478 on December, 19th 2010. See log for http://svn.osgeo.org/mapguide/trunk/MgDev/Common.

There's only 1 code change in [CCoordinateSystem::SetLonLatBounds()]: The min/max lat/long values are now also set on the [m_csprm.csdef.ll_*] struct so that this information also gets written to disk when the (custom) coordinate system definition is stored. I've also added a documentation for the methods in [MgCoordinateSystem] that deal with the min/max lat/long stuff.

Note: See TracTickets for help on using tickets.