Use of OgrForSharpMap

Topics: Algorithms, SharpMap v2.0
Apr 4, 2016 at 12:33 PM
Hi Team,
will you please share a simple example of using OgrForSharpMap Project under the Extensions for Loading MapinfoTabFile.

Apr 4, 2016 at 12:49 PM
You can't use it directly for SharpMap. It has been developed for discontinued SharpMap v2
Which feature are you interested in?
Apr 4, 2016 at 1:25 PM
Edited Apr 4, 2016 at 1:48 PM
I am interested in MapinfoTab files to open on map using OgrForSharpMap.
Basically i want to build same functionality as in QGIS open attribute table. for this i need to read all features and if i use existing code for large MapinfoTab file it will take 2-3 minutes that will issue for me.

Apr 5, 2016 at 7:39 AM
So your concern is plainly performance?
Do you have a chance to profile your code while reading the MapInfo Tab file?
Apr 5, 2016 at 9:01 AM
Yes My mainly concern is Performance.
Basically there are two cases for me:-
Case 1:- If only load MapinfoTabFile to Map with Code:-
Ogr ObjOgrProvider = new Ogr(mpLayer.strFilePath);
VectorLayer.DataSource = ObjOgrProvider;
MapLayer Load on map easily with in 10 secs.

Case2 :- But i need attribute table of that particular MapinfoTab file so i have used following code:-
    while ((ogrFeature = _ogrLayer.GetNextFeature()) != null)
                LoadOgrFeatureToFeatureDataRow(myDt, ogrFeature, Factory);
The above code is used in the OgrProvider in the ExecuteIntersection Query.
It will take approximate 2-3 minutes for my 100MB file means for 3-4 Lacs Rows. But i need to build a code for appx 1-2 million rows.
and one more thing i need this attribute table at the time of Creation of Vector Layer .
Please help me regarding this.

Apr 5, 2016 at 10:22 AM
I think you will have to rethink your approach.
I doubt that you can speed up MapInfo Tab File reading and setting up a FeatureDataTable with 1-2 million rows.
For example you could use DataGridView in virtual mode.