Somebody can explain what is this TAB_LABEL?

Mar 21, 2011 at 7:29 AM

When I open TAB file in Mapinfo. I see the information from field TAB_LABEL. But in structure of the table there is no field TAB_LABEL. What is this field - TAB_LABEL and how to receive the information with help of SharpMap?

Mar 21, 2011 at 7:49 AM

Probably it special OGR column. Can i use the information from this field for labelalyer?

Coordinator
Mar 21, 2011 at 11:46 AM

If it is a special OGR column you should be able to use it from sharpmap.

Maybe it is a label definition made up from multiple columns? In that case I'm not sure if you can access it with sharpmap.

Hth FObermaier

Mar 21, 2011 at 12:19 PM

Somebody please give me example to access special OGR column!!!

Coordinator
Mar 21, 2011 at 1:47 PM

If you want to use it with a LabelLayer, try setting LabelLayer.LabelColumn to "TAB_LABEL", otherwise use OgrProvider's ExecuteIntersectionQuery(...,...) or GetFeatureByOid(...) function to get a FeatureDataTable/-Row that you can index by "TAB_LABEL".

Hth FObermaier

Mar 21, 2011 at 2:29 PM

When i try to set up LabelLayer.LabelColumn to "TAB_LABEL" it cause an exception. Look like a wall, i can't break it. OgrProvider return Row with only one filed - "street". But if i open this tab file with MapInfo or with any free viewer(for example TatukGIS Viewer) i can see field's: street, GIS_UID, GIS_SELECTED, GIS_AREA, GIS_LENGTH and so much needed to me TAB_LABEL. I don't know what to do.

Coordinator
Mar 21, 2011 at 3:07 PM

File an issue and provide a small sample mapinfo tab dataset.

Does your mapinfo file contain different geometry types. If so, you might need to specify a different layer (OGR splits the file into different geometry types internally)

Hth FObermaier

Mar 21, 2011 at 3:41 PM

Please tell me how to specify a different layer?

Coordinator
Mar 21, 2011 at 5:48 PM

you can test with

OgrProvider.NumberOfLayers

if there is more than one layer.

If there is you can

OgrProvider.LayerIndex = indexForLayerofInterest;

or

OgrProvider.LayerName = "whatsThatLayerName";

to change the layer of interest.

Hth FObermaier

Mar 22, 2011 at 7:37 AM
Edited Mar 22, 2011 at 7:38 AM
OgrProvider.NumberOfLayers return 1. One more question. 
I have some files with different extension - doroga.TAB, doroga.IND, doroga.DAT, doroga.ID. I'am use doroga.TAB as datasource. May be it is wrong?
Coordinator
Mar 22, 2011 at 8:47 AM

The tab file is the right one

FObermaier

Mar 22, 2011 at 9:53 AM

More ideas?

Coordinator
Mar 22, 2011 at 11:03 AM
FObermaier wrote:

File an issue and provide a small sample mapinfo tab dataset.