Hello
I have some questions about the utility in thinkgeo which splits polygons to grids, if you bear with with me
1- if we have a layer for the streets does the split polygon only loads the section of streets within that grid or does it load all the street layer?
2- How does it defer from the pregenerated tile caching?
3- which method is best for web based applications?
thanks in advance
Question regarding about the utility to split polygon based on grid
Hello again
I just wanted to add something
The situation we are facing is that we are working in saudi arabia and for example we want to load a city which we have its admin files along with its streets and poi and we want to create a grid or cache for that city for the admin which is a polygon and the streets which are lines so for example when the map for that city is loaded along with streets and POI; when the user click one grid in that polygon the streets and POI within that gird are only loaded not the entire street for that city for example Riyadh which has a large number of streets and that takes alot of time to load.
Thanks alot and thanks for answering in advance…
Hi Saddam,
I think you could use Layer.GetFeaturesInsideBoundingBox to achieve your require, this method will only get the features within the specified bounding box.
Following are the answers for your questions:
1. It can load a part of streets through GetFeaturesInsideBoundingBox, but cannot load a section of one street. And this method only load the specified features not all layer.
2. Now we can only support saving a cache to an object of Bitmap, the tile cache cannot be generated from the manual splitting.
3. Please call GetFeaturesInsideBoundingBox if it could solve your problem.
For your addition situation you said, I think if your streets data have some columns that stores its belonging city, you could use FeatureSource.QueryTools.GetFeaturesByColumnValue to get the features of streets only in that city. But for now, there isn’t ways to load a section of streets directly I guess you can use the geometric methods from BaseShape to split the shape of streets you want to get or generate the splitting data files by yourself.
Another thing for your information is that our gisEditor could split a shapefile virtually, so it could pre-deal with the data.
Hope it helps
Summer
Summer
Hello
Thanks for the quick replay but we want to better understand the cache generator we dont want to use caching in code we already did it using code
In the attachment are the admin files for al qaseem which is a city in Saudi Arabia can you do the caching for it and provide us with snap shots while you do the generating using cache generator, because when we do the caching it shows most of the world we only need Saudi Arabia can you also tell us what numbers to put in the upper left corner and bottem right corner 180 and 90 is the default
Secondly can we use the cache generator to generate cache for a feature layer "Streets or POI"? I sent the shape files to your forum support email.
Thanks in advance
Saddam
Hi Saddam,
Following sreen vedio should show a basic idea of achieving it: screencast.com/t/eFIo1LEPjej
And the “public static Collection<Layer> GetLayersToCache()” in “LayerProvider Class” needs to be changed with attached code
if you have any more question , please feel free to let us know.
Best Regards
Summer
post11433.txt (1.06 KB)
Hello Summer
I just wanted to ask we’ve generated the tiles using the cache generator its working fine now thanks alot but i have a question the generator generates alot of black images which hold space on the machine can we delete them?
Thanks in advance.
Saddam
Hi Saddam,
Firstly great to hear the “cache generator its working fine now”.
About “black images which hold space on the machine can we delete them”, I don’t suggest to delete them because the reason for these black images is that there is no shapes in these images’ corresponding extent. so, if we delete them, while querying these extent, there will be no existing caches so the map will have to render it again.
Hope it helps
Summer