Hi Gis Team,
GridFeaturelayer load the file size is 200M above map shows the effect will be very slow, it takes about 4-6 minutes, what a good solution?
Thinks .
Map Loading GridFeatureLayer effect slow
Hi Li,
I guess it might be there are so many cells generated from the grid file that results to the memory and CPU resource are use up. Would you please do a calculation to find out how many cells in this grid file? Please following the below codes:
GridFeatureLayer featurelayer = new GridFeatureLayer("…");
GridCell[,] allCells = featurelayer.GenerateGridMatrix();
Or get all the features:
featurelayer.FeatureSource.Open();
Collection<Feature> allFeatures = featurelayer.FeatureSource.GetAllFeatures();
if the count of cells or features are astonishing, I guess we might need to regenerate the grid file to reduce the cells count such as make the cell size larger or reduce the grid extent etc. or we can try to split the grid file into several pieces and then load them based on the current extent.
If any questions, please feel free to let us know.
Thanks,
Johnny
"We can try to split the grid file into several pieces and then load them based on the current extent"
how the grid file into pieces? Can provide examples?
I would be grateful!
"We can try to split the grid file into several pieces and then load them based on the current extent"
how the grid file into pieces? Can provide examples?
I would be grateful!
Hi Li,
The attached file is a method to split a grid file into several pieces. I tested it with the wiki sample from wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Layers_%26_FeatureSources_Samples#Create_GRID_2.
Actually, there is no difference if if we load all the sub grid files at one time. Splitting the grid file is just a way to provide for us to choose the right sub grid file which is in the current extent. I created a grid file which size is about 6m. The grid file matrix is 1000*386 and it will take my 10 seconds to display with classbreakstyle. So, I can image how slow if the grid file is about 200m. I will continue to dig into this and will let you know the progress if there is any updates.
Currently, i am afraid you have to minimize the grid file matrix if possible. Such as make the cell size larger when generate it.
Sorry for any inconvenience.
Johnny
Post11552.txt (2.89 KB)
Hi GIS Team ,
I think the mouse Over Feature display a message similar to Popup in InmemoryFeatureLayer. But Feature is a polygonShape(Sorry to bring you inconvenience!My computer browser is broken, now I can only reply topic but not add topic)
what a good solution?
thinks
lihui
Hi Li,
I guess the HowDoI sample “Getting Started” => “Find the Feature the User Clicked” should be helpful, please check it. In my opinion, as each popup or marker must need a point to locate it, we still need to find out a point from the selected polygon for the popup.
Please do not hesitate to let me know if you have any question
Thanks,
Johnny