[mapguide-users] How to use Select Aggregates in MapGuide

Traian Stanev traian.stanev at autodesk.com
Wed Dec 31 12:50:39 EST 2008


Hi Kenneth,

The SelectAggregates does both "distinct" and "aggregate" selects. In your case you want to do an aggregate select, so make sure you set IsDistinct to false. Then, add one computed property, with any name, whose computed expression is "SpatialExtents(Geometry)", where you replace "Geometry" by the actual name of the geometry property.

The returned data reader will have one row with a geometry column named by whatever name you gave the computed property. The geometry is a polygon with 5 points (a rectangle).

Traian


> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-
> bounces at lists.osgeo.org] On Behalf Of Kenneth Skovhede, GEOGRAF A/S
> Sent: Sunday, December 28, 2008 6:30 AM
> To: MapGuide Users Mail List
> Subject: [mapguide-users] How to use Select Aggregates in MapGuide
>
> I'm having trouble understanding how the "Select Aggregates" system
> works.
> I expect it to be similar to the "GROUP BY" SQL command.
>
> But, on the test page:
> http://localhost/mapguide/mapagent/selectfeaturesform.html
>
> I have the fields "Properties" and "Computed Properties".
> If I enter nothing in the "Properties" field, or the name of a spatial
> column, I get a "Type error".
> If I enter the name of an existing column, I get all the rows
> containing
> this column.
>
> The "Computed Properties" field seems to accept anything, and has no
> effect on the output.
>
> I would like to calculate the actual extents of the geometry of the
> entire featuresource.
> There seems to exist an FDO command called "SpatialExtents", but I
> don't
> see how I
> can use that function from MapGuide.
>
> Any help is appreciated!
>
> --
> Regards, Kenneth Skovhede, GEOGRAF A/S
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list