MapWindow 4 - Desktop Application : MapWindow Discussion Forum
For a while now I've been searching for a way to convert MapInfo files to ESRI shape format so that I can use them in MapWindow GIS and today I came across an open source GIS/RS binary kit called FWTools (created by Frank Warmerdam) which you can find at [
Convert MapInfo files to ESRI Shapefile format
Posted by: richardw ()
Date: February 06, 2011 11:26AM

For a while now I've been searching for a way to convert MapInfo files to ESRI shape format so that I can use them in MapWindow GIS and today I came across an open source GIS/RS binary kit called FWTools (created by Frank Warmerdam) which you can find at [fwtools.maptools.org]

After installing FWTools you should have a new FWTools menu group in Start->All Programs list. From there you can launch a command shell with the environment all setup to run the various commands for GDAL, OGR, PROJ, MapServer, etc.

I've attached a zip file that contains a set of MapInfo files that represents the boundary of Lincolnshire in the UK (where I live) so that those of you who want to try the example below can do so.

In the C:\Program Files\FWTools directory create a new folder named 'Mapinfo2Shp' and unzip the attached file there; you should find four files with extensions .DAT, .ID, .MAP and .TAB

Now double-click the FWTools shortcut on your desktop. This opens a command window. Copy and paste the following command into the window and press the enter key to run it.

ogr2ogr -f "ESRI Shapefile" Mapinfo2Shp\LincsBoundary.shp Mapinfo2Shp\Lincolnshire.tab

NOTE: In the command above the first file is the file format and filename you want to convert to, while the second is the one you're converting from.
You should now see the ESRI shape fileset appear in the folder so run MapWindow and load the LincsBoundary.shp file.

Also, if you want to change the projection at the same time then this is the command:

ogr2ogr -f "ESRI Shapefile" -t_srs "EPSG: 4269" Mapinfo2Shp\LincsBoundary.shp Mapinfo2Shp\Lincolnshire.tab (although I've not tried this).

Now my reason for posting is that I really like MapWindowGIS and I've been looking for a plugin that will allow the application to load and display just about any of the common map file formats. I believe that the 'ogr2ogr' module within the FWTools package can convert to and from many other formats so I was wondering if any of you clever developers out there can use this module to build a plugin for MapWindow that will do just this. Personally, I think it would make MapWindow an even more versatile GIS system than it already is.
Thanks for all the great work.
Regards,
Richard



Edited 4 time(s). Last edit at 02/07/2011 03:26AM by richardw.

Attachments: Mapinfo2Shp.zip (48.6 KB)  
Options: ReplyQuote


Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: