Hi,
I've a couple of shape files that can not be displayed with 3.0.313. Same are working with 2.0.
Can you please check ?
Patrick.
780-DATA-VECTEUR.zip (8.35 KB)
Hi,
I've a couple of shape files that can not be displayed with 3.0.313. Same are working with 2.0.
Can you please check ?
Patrick.
780-DATA-VECTEUR.zip (8.35 KB)
Patrick,
Thanks for your post!
I tested your Point data both with Desktop Edition 307 RC vestion and 3.0.313 version, both of them seems can work ok.
Following is my code with 2 things I want to point out:
1) PLEASE build index first.
2) Set the correct MapUnit(you data unit should be not DecimalDegrees).
winformsMap1.MapUnit = GeographyUnit.Meter;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
string shapeFileName = @"..\..\..\..\..\PostsData\Post5873 Data\Arbre.shp";
ShapeFileFeatureLayer.BuildIndexFile(shapeFileName, BuildIndexMode.DoNotRebuild);
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(shapeFileName);
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.City1;
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add("WorldLayer", worldLayer);
winformsMap1.Overlays.Add(staticOverlay);
// winformsMap1.CurrentExtent = new RectangleShape(-143.4, 109.3, 116.7, -76.3);
worldLayer.Open();
winformsMap1.CurrentExtent = worldLayer.GetBoundingBox();
worldLayer.Close();
winformsMap1.Refresh();
Any more questions just let me know.
Thanks.
Yale
Yale,
On my computer the layer is not displayed nor with that code neither with MapExplorer.
Patrick.
Patrick,
That is strange problem. Can you zip up a very simple sample including the data and DLLs you are using for me, I will see my computer how is going on?
What is your Operation system and developing environment?
Any more questions just let me know.
Thanks
Yale
I’ll Yale …
some words about my config…
vista, french, 64 bits
vs 2008
dotnet 3.5
I’m compiling in x86 mode.
Regards
Patrick.
Patrick,
I am sorry to say that I still cannot recreate your problem even though I run my App in Windows Vista 64 bit (France location) operation system.
Can you try the demo attached to see if it works? PLEASE test it with 3.0.307 RC version.
Any more questions just let me know.
Thanks
Yale
784-Post5873_Demo.zip (14.9 KB)
Yale,
It does not work with 3.0.313, it gives me a blue empty layer.
I do not have 3.0.307 installed on my computer and cannot test.
I can upgrapde to a newer version but I cannot downgrade to 3.0.307 as we are depending on bug fixes you’ve done for us.
Patrick.
Patrick,
It seems that you encountered a few problems!
For this one, I am sorry I did not make things clear, I both tested with 3 versions: 3.0.307 RC version, 3.0.313 version and latest version (3.0.331), all of them can work. Attachment is the screenshot we get with the above solution codes(with 3.0.313 version of DLLs).
First, Can you try the following line of code and shows me what vesrion string you get?
string version = WinformsMap.GetVersion();
Second, But if this problem still persists in the 3.0.313 version, I guess it may cause by some other problems, can you try the following codes to see whether it returns back the 242 records as expected:
string shapeFileName = @"..\..\..\..\..\PostsData\Post5873 Data\Arbre.shp";
ShapeFileFeatureLayer.BuildIndexFile(shapeFileName, BuildIndexMode.DoNotRebuild);
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(shapeFileName);
worldLayer.Open();
RectangleShape boundingBox = worldLayer.GetBoundingBox();
Collection<Feature> features = worldLayer.FeatureSource.GetAllFeatures(ReturningColumnsType.AllColumns);
Collection<Feature> insideFeatures = worldLayer.QueryTools.GetFeaturesInsideBoundingBox(boundingBox, ReturningColumnsType.AllColumns);
worldLayer.Close();
For other issues you talked about, we will send you another updated temporary version (3.0.331):
gis.thinkgeo.com/Support/Dis...fault.aspx
Any more questions just let me know.
Thanks.
Yale
It still not display the feature with 3.0.331.
here are the requested infos:
version= MapSuiteCore:3.1.151;DesktopEdition:3.0.331
features.count=242
insidefeature.count=0
it looks like you’re looking in the right direction.
Please help.
Patrick.
Patrick,
That is a very wield problem, can you send us the RTree file you are using (.idx and .ids)?
Attachment contains the data with RTree build in my machine. Can you also try it?
Honestly speaking, I have no idea why the API GetFeaturesInsideBoundingBox return 0 features in you environment?
I am sorry for the inconvenience.
Thanks.
Yale
794-Post5873_Data.zip (10.8 KB)
Yale,
If I manually delete the rtree files, then the layer is displayed correctly.
I'm attaching the files here for your analysis.
So the questions are now:
- why are these files corrupted (it occurs for many of our users) ?
- why is BuildIndexFile not rebuilding them as they are corrupted ?
- finaly can I detect that they are corrupted to force the rebuild ?
Thank you very much.
Patrick.
Patrick,
There are a couple of reasons may caused the wrong RTree files. For example, Rename a wrong idx file, Passing wrong parameters when building index files), some of them cannot be detected to be wrong. So I am sorry to say that there is no such API to detect corrected RTree indexes.
When you build RTree indexes, you can force it to rebuild every time.
Thanks for your valuable suggestions. We will see whether we can add an API to implements such functionality.
Thanks.
Yale