how to make it hardware accelerate

Oct 6, 2010 at 9:13 AM
Edited Oct 6, 2010 at 9:20 AM

Hi. I have notice whenever I add layers of a country from a shapefile, the map will be so laggy to an extend that it looks like it had crash. Seems like it is consuming more of the CPU processes than the GPU.

Shapefile shapefile = new Shapefile("C:/Users/xe/Desktop/ShapeFile/USA_adm/USA_adm0.shp");

foreach (Shape shape in shapefile)
    if (shape.GetMetadata("name_iso").Equals("UNITED STATES"))
        if (shape.Type == ShapeType.Polygon)
            ShapePolygon shapePolygon = shape as ShapePolygon;
            List<PointD[]> partList = shapePolygon.Parts;

            for (int i = 0; i < partList.Count; i++)
                PointD[] points = partList[i];

                LatLonAlt[] latLonPoints = new LatLonAlt[points.Length];
                for (int n = 0; n < points.Length; n++)
                    latLonPoints[n] = LatLonAlt.CreateUsingDegrees(points[n].Y, points[n].X, 0);
                map.GlobeControl.Host.Geometry.RemoveGeometry("UNITED STATES", i.ToString());
                PolyInfo polylineStyle = PolyInfo.DefaultPolygon;
                polylineStyle.FillColor = System.Drawing.Color.FromArgb(125, System.Drawing.Color.FromKnownColor(KnownColor.Cyan));
                polylineStyle.LineColor = System.Drawing.Color.Transparent;
                polylineStyle.AltitudeMode = AltitudeMode.FromGround;
                map.GlobeControl.Host.Geometry.AddGeometry(new PolygonGeometry("UNITED STATES", i.ToString(), this, latLonPoints, PolygonGeometry.PolygonFormat.Polygon2D, polylineStyle));

For this case, I am having 7000+ parts where each part have their own points. Therefore the total number of layers added on the map will be equal to the total number of parts. Does anyone know how to solve this?

Oct 7, 2010 at 12:37 PM

Hi again. I notice this might be the overloading of the points in map. And I had actually read up on some solution from 

Under the Reduction of polygon / polyline accuracy. Was wondering whether this Infostrat.VEmap supports this feature?