Complete MapInfo map

Topics: General Topics
Sep 21, 2006 at 2:50 PM
I bought a complete MapInfo Map from my city.
I'm quite new in SharpMap and apologize my beginner question, but I don't know the following:

My MapInfo map consist of files. How can I use my map with SharpMap? Is it easy to render my map...etc?

How can I load my file into an SQLserver. Or is it better to use my map from those files? (.tab,.map....etcetc)

Thank you for your patient:)

Oliver
Sep 6, 2007 at 8:02 AM
I got the same case ,anyone can tell us how to solve it ,thanks
Coordinator
Sep 6, 2007 at 9:16 PM
You can access MapInfo data by using the OgrProvider. Here's how it might look:

using SharpMap.Layers;
using SharpMap.Data.Providers;
// ...
SharpMap.Map map = new SharpMap.Map(mapImage1.Size);
VectorLayer cityDataLayer = new VectorLayer("CityData");
cityDataLayer.DataSource = new Ogr(@"PATH\TO\CityData.TAB");
 
map.Layers.Add(cityDataLayer);
map.ZoomToExtents();
mapImage1.Map = map;

You could import it into SQL Server using MsSqlSpatial. MsSqlSpatial has a console which you might be able to use to import the data. Check out the MsSqlSpatial project for more information.