[mapguide-users] Combining features

A H hizperion at hotmail.com
Sat Jan 31 04:38:46 EST 2009


this should be easy, but i'm still having trouble figuring out.

i have a system that allow user to draw multiple polygons, and save the
polygon into a spatial database.

i have this code

		MgFeatureQueryOptions queryStr = new MgFeatureQueryOptions();
		queryStr.SetFilter("ID > 0");
		MgFeatureReader featureReader = polyLayer.SelectFeatures(queryStr);
		
		featureReader.ReadNext();
		MgByteReader geom = featureReader.GetGeometry("GEOM");

		MgPropertyCollection properties = new MgPropertyCollection();
		
		properties.Add(new MgInt64Property("AREA_ID", areaID));
		properties.Add(new MgStringProperty("AREA_NAME", areaName));
		properties.Add(new MgGeometryProperty(GEOM_PROPERTY, geom));


but this will only get geometry of 1 of the polygons.
can someone help me to modify this so that it save all the polygons into 1
new area that consist of the polygons in 'geom'?

i'm thinking of something like:

   while(featureReader.ReadNext())
   {
       // store the results into 1 geometry
       // read into MgByteReader
   }


-- 
View this message in context: http://n2.nabble.com/Combining-features-tp2249387p2249387.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list