Skip to content

Instantly share code, notes, and snippets.

@cwebber314
Last active February 24, 2021 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwebber314/8153a14e6f1f58c8a7d13fa045eb7b81 to your computer and use it in GitHub Desktop.
Save cwebber314/8153a14e6f1f58c8a7d13fa045eb7b81 to your computer and use it in GitHub Desktop.
Convert MapInfo (.TAB) file to ESRI shapefile

Converting a MapInfo File

Open a cmd.exe windows and setup the python env for ArcGIS:

"c:\Program Files\ArcGIS\Pro\bin\Python\Scripts\activate.bat"
activate arcgispro-py3

Then modify this command to convert from a MapInfo file to shapefile:

SET OGR2OGR="C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\osgeo\samples\ogr2ogr.py"
python %OGR2OGR% -f "ESRI Shapefile" "c:\path\to\NewShapefile.shp" "U:\projects\path\to\OrigTabfile.TAB"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment