I experienced this same GEOMETRYCOLLECTION() problem today, and this post from years ago was the only relevant reference I could find.
When creating a GEOMETRYCOLLECTION() WKT using numerous POLYGON() strings in a row, the final outcome is a MgMultiGeometry object that does not separate the Polygons into sub-geometries, and instead returns 1 when using $geometry->GetCount(). For example in PHP: This outputs 1. However if I punctuate the Polygons with a redundant POINT() geometry, it separates the Polygons and returns the correct number of sub-geometries: This outputs 5. For my immediate purposes I only need the MultiGeometry temporarily to perform an area calculation, so I can make do with inserting unnecessary POINT() values. However it seems that one of the MgWktReaderWriter, MgMultiGeometry, or abstract MgAggregateGeometry is not working as it should. Based on the previous user's post, it appears that this occurs with consecutive LINESTRING() strings also. Consecutive POINT() strings does not produce this error for me. Thank you, Kyel -- Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users