[mapguide][MG419][New] Calling MgRing->GetArea generates assertion
Walt Welton-Lair
walt.welton-lair at autodesk.com
Mon Oct 9 08:42:20 EDT 2006
You can view the artifact detail at the following URL:
https://mapguide.osgeo.org/servlets/Scarab/id/MG419
Type
Defect
Artifact ID
MG419 (Calling MgRing->GetArea generates assertion)
Reported by
Walt Welton-Lair
waltweltonlair (walt.welton-lair at autodesk.com)
New artifact details:
---------------------------------------------------------
- Version set to new value
1.0.1
- Subcomponent set to new value
Core
- Target milestone set to new value
1.1.0
- Platform set to new value
All
- Artifact Status set to new value
New
- Artifact created
- Summary set to new value
Calling MgRing->GetArea generates assertion
- Steps to Reproduce set to new value
Create an MgLinearRing and call GetArea on it.
- Description set to new value
GetArea is published API, and it doesn't work correctly for linear and curve rings.
- Operating system set to new value
All
- Defect Severity set to new value
High
- Developer Notes set to new value
The problem is that the strings returned by MgLinearRing::ToAWkt and MgCurveRing::ToAwkt are not valid in the context of GEOS, which is what's used to compute the area. Linear ring, for example, is missing "LINEARRING" at the beginning of the string.
Fixing this is not as simple as updating the two ToAWkt methods. That's because these are called from other methods which expect them to work as they do now. For example, MgPolygon::ToAwkt calls ToAwkt on its outer ring and (via MgLinearRingCollection) on its inner rings.
Since GEOS expects a WKT string, maybe we should add a new MgGeometricEntity::ToWkt method...
- Priority set to new value
P2
---------------------------------------------------------
This message was automatically generated by Project Tracker.
More information about the Mapguide_issues
mailing list