Mapinfo Tab File with Coordinate Projection Issue

Topics: SharpMap Project, SharpMap v0.9 / v1.x, WinForms Controls
Sep 9, 2015 at 6:35 AM
Edited Sep 9, 2015 at 6:36 AM
Hi Team,
We have a tab File and we open it with a OGR Provider and when we open this shows the location of a Map in ALGERIA instead of INDIA (Hrayana). It might be a problem with projections as we are not that good in Projections. Please Solve the Issue for us , we are stuck in this from very Long.
Please Find TAB_FILE with this Link.
Sep 9, 2015 at 2:16 PM
Quantum GIS claims that the dataset is in EPSG:32643 (WGS84/UTM Zone 43N)
Is that the coordinate system of your other vector data? If not you need to set up a coordinate transformation
Sep 10, 2015 at 7:51 AM
Thanks for reply.
But we are using EPSG:3857 in all Vector Data Layers . Will you please help me to convert EPSG:32643 to EPSG:3857 Coordinates.
Sep 11, 2015 at 7:15 AM
The best way in terms of performance would be to open the tab file with Mapinfo and save the relation in the web mercator projection (EPSG:32643).

On-the-fly reprojection on vector data is doable but you pay a price in terms of performance.
You need to get the WKT for EPSG:32463

Then you can set up a coordinate transformation for your layer:
var csFactory = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
var cs32643 = csFactory.CreateFromWkt(epsg32643Wkt);
var cs3857 = ProjNet.CoordinateSystems.ProjectedCoordinateSystem.WebMercator;
var ctFactory = new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory();
lyr.CoordinateTransformation = ctFactory.CreateFromCoordinateSystems(cs32643, cs3857)
lyr.ReverseCoordinateTransformation = ctFactory.CreateFromCoordinateSystems(cs3857, cs32643)

Sep 11, 2015 at 9:32 AM
Edited Sep 11, 2015 at 9:32 AM
The Layer shown on correct Location .
But one issue is still there when we change the zoom of map the Layer disappers.

Sep 14, 2015 at 12:30 PM
Edited Sep 14, 2015 at 12:30 PM
Sry for the Last Question because the problem is on my end.

My New Question is to find the Coordinate Projection of a Tab File.
Eg:- I have a Tab file and i want to know that the Tab File in which projection.

Sep 14, 2015 at 1:31 PM
Using the command line: get yourself a copy of GDAL. then use ogrinfo.

SharpMap's OgrProvider tries to identify the spatial reference system in EPSG identifier and stores the value to the SRID property.
If you have that, you can query the Well-Known-Text representation of it, create a coordinate system for it and use that for setting up the coordinate transformation.