Are there any tool to split Mapinfo MIF file?

273 views
Skip to first unread message

kitex

unread,
Mar 5, 2013, 12:43:56 AM3/5/13
to mapi...@googlegroups.com
I have large mif file showing coverage. I split the mif file manually having Region 63822 into two or more Region with less than Region 32000. Are there any tool which does this?

Mats Elfström

unread,
Mar 5, 2013, 1:30:26 AM3/5/13
to mapi...@googlegroups.com
Hi Kitex!
I would recommend FME from Safe Software. There is a tiling tool that may suit your needs. 
You need to consider of course if you want to split the overlapping regions. 
Else you can create a suitable grid in MapInfo, label each object by grid square and then split the data on grid squares. You will need to import the mif first of course. FME can read the mif file directly. 

Hälsning / Regards
Mats.E

Skickat från min / Sent from my iPhone, Ursäkta att jag är kortfattad / Excuse my brevity. 

5 mar 2013 kl. 06:44 skrev kitex <udhyan...@gmail.com>:

I have large mif file showing coverage. I split the mif file manually having Region 63822 into two or more Region with less than Region 32000. Are there any tool which does this?

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bill Thoen

unread,
Mar 5, 2013, 1:57:31 PM3/5/13
to mapi...@googlegroups.com
On 03/04/2013 10:43 PM, kitex wrote:
> I have large mif file showing coverage. I split the mif file manually
> having Region 63822 into two or more Region with less than Region
> 32000. Are there any tool which does this? --

Probably be faster and easier to just load the file into MapInfo and do
the splitting with any of several tools for splitting polygons. MIF
files are generally used only for data transport, not very often for
direct processing, so I doubt you'll find a lot of tools for them.

kitex

unread,
Mar 11, 2013, 7:38:37 AM3/11/13
to mapi...@googlegroups.com
Dear Bill, The file size is too large to load directly into mapinfo.

Uffe Kousgaard

unread,
Mar 11, 2013, 7:53:26 AM3/11/13
to mapi...@googlegroups.com
Hi,

Writing such a tool is a nice task for any beginner in programming, almost no matter what they try to learn: MapBasic, Delphi, C#, Python etc.

Just find him / her or do it yourself. I doubt it exists in advance.

Regards
Uffe Kousgaard

kitex wrote:
--

kitex

unread,
Mar 11, 2013, 8:00:41 AM3/11/13
to mapi...@googlegroups.com
Hi Uffe,
         Thanks for response. I am going to write one if none exists. Thank you for your kind response.

kitex

unread,
Mar 12, 2013, 3:24:15 AM3/12/13
to mapi...@googlegroups.com
Want some free tool. It's nice to know though.

Kannan Krish

unread,
Mar 14, 2013, 11:38:53 AM3/14/13
to mapi...@googlegroups.com
wow a free tool to split a large mif file, i would be interested too.Pls keep us updated if any tool takes a raise..
--
KTG Infotech
GIS (Mineral Exploration)
Data Integration, Analysis, Capturing and Data Conversion
for Geochemistry,IP and Drill logs
Skypes-ktgcad

Uffe Kousgaard

unread,
Mar 15, 2013, 2:59:25 AM3/15/13
to mapi...@googlegroups.com
What is the background for ending up with these large MIF files?

I assume large = "too big to import into MapInfo".

Tony Pilkington

unread,
Mar 15, 2013, 3:28:14 AM3/15/13
to mapi...@googlegroups.com
I seem to remember from many years ago that a proposed solution for dealing with a monster text file was to use Pearl.
To unsubscribe from this group and stop receiving emails from it, send an email to mailto:mapinfo-l%2Bunsu...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
KTG Infotech
GIS (Mineral Exploration)
Data Integration, Analysis, Capturing and Data Conversion
for Geochemistry,IP and Drill logs
Skypes-ktgcad
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
 
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 2641/6172 - Release Date: 03/13/13

Bill Thoen

unread,
Mar 15, 2013, 4:53:23 AM3/15/13
to mapi...@googlegroups.com
I often have to deal with multiple- million record csv files that have mistakes in them, and I think the best tool for handling those the unix tool sed. Its designed for just that sort of thing (monster text files). Mif files are trickier because they have variable structure and must stay aligned with their mid file. Perl is a scripting language and will be useful for this only if you can program it. The same goes for MapBasic, except that's a slow choice. However, it's an easy one.

Regards,

Bill Thoen
GISnet

Bo Victor Thomsen

unread,
Mar 15, 2013, 5:06:56 AM3/15/13
to mapi...@googlegroups.com
Take a look at ogr2org (http://www.gdal.org)  It's open source.
To download the latest 64 bit windows version: http://gisinternals.com/sdk/PackageList.aspx?file=release-1600-x64-gdal-1-9-2-mapserver-6-2-0.zip

Example:

c:\gisdata\nyedata\afdeling.mif contains appr. 107000 object. Split this in two parts, the first containing 50000 object and the rest in the second part: 


REM Find number of objects
ogrinfo -so c:\gisdata\nyedata\afdeling.mif afdeling

REM Split 1. part
ogr2ogr -f "Mapinfo File" -sql "select * from afdeling where FID <= 50000" c:\gisdata\nyedata\afdeling3.mif c:\gisdata\nyedata\afdeling.mif

REM Split 2. part
ogr2ogr -f "Mapinfo File" -sql "select * from afdeling where FID > 50000" c:\gisdata\nyedata\afdeling4.mif c:\gisdata\nyedata\afdeling.mif

REM Find number of objects, part 1
ogrinfo -so c:\gisdata\nyedata\afdeling2.mif afdeling2

REM Find number of objects, part 2
ogrinfo -so c:\gisdata\nyedata\afdeling3.mif afdeling3

Regards
Bo Victor Thomsen
Aestas-GIS
Denmark

Bo Victor Thomsen

unread,
Mar 15, 2013, 5:15:31 AM3/15/13
to mapi...@googlegroups.com
B*gger, my posting contained an error -

This is the right example:


c:\gisdata\nyedata\afdeling.mif contains appr. 107000 object. Split this in two parts, the first containing 50000 object and the rest in the second part: 


REM Find number of objects
ogrinfo -so c:\gisdata\nyedata\afdeling.mif afdeling

REM Split 1. part (FID is like ROWID inside MapInfo)
ogr2ogr -f "Mapinfo File" -sql "select * from afdeling where FID <= 50000" c:\gisdata\nyedata\afdeling1.mif c:\gisdata\nyedata\afdeling.mif

REM Split 2. part
ogr2ogr -f "Mapinfo File" -sql "select * from afdeling where FID > 50000" c:\gisdata\nyedata\afdeling2.mif c:\gisdata\nyedata\afdeling.mif


REM Find number of objects, part 1
ogrinfo -so c:\gisdata\nyedata\afdeling1.mif afdeling1


REM Find number of objects, part 2
ogrinfo -so c:\gisdata\nyedata\afdeling2.mif afdeling2


Regards
Bo Victor Thomsen
Aestas-GIS
Denmark

Bill Thoen

unread,
Mar 15, 2013, 1:12:21 PM3/15/13
to mapi...@googlegroups.com
Oh yes, of course! Ogr2ogr is the right answer! Also, you can split and load using spatial criteria or use a combination. The Geospatial Data Abstraction Library (GDAL) is on my "must have" list but I always d/l when I need any of those tools because they are often updated. The URL is http://www.gdal.org/index.html an dthe docs for ogr2ogr are at http://www.gdal.org/ogr2ogr.html.

kitex

unread,
Mar 20, 2013, 7:13:18 AM3/20/13
to mapi...@googlegroups.com
Hi Victor,
        Sorry I was working on the tool for a while developing in c#. I made the tool but it needs broken mif file. My requirement is not about splitting a file. but splitting region. 
The senario :
      I have geo coverage map in mif format taken down from Asset(optima tool). When I directly convert this mif to grid there is coverage loss. So I break the region with polygons greater than 32000 to smaller ones.

Version 300
Charset "Neutral"
Delimiter ","
CoordSys Earth Projection  8, 104, 7, 87, 0, 0.9996, 500000, 0
Columns 2
  Float Float
  String Char(200)
Data

Region 33822    This 33822 is broken into 32000 and 1822
Actually I need to tool to do this. Break The region into smaller ones. I did that but there is error in vertical mapper. The thread to this error : https://groups.google.com/forum/#!topic/mapinfo-l/qgLfkbNIsOY.
 
 
 


Uffe Kousgaard

unread,
Mar 20, 2013, 10:17:11 AM3/20/13
to mapi...@googlegroups.com
Hi,
 
I think more recent versions of TAB files then 300 can handle more than 32000 regions in a single object.
 
Try with 800 and import again. Assuming you also have a version 8.00 or later.
 
Regards
Uffe Kousgaard
 

From: kitex
Sent: Wednesday, March 20, 2013 12:13 PM
Subject: Re: [MI-L] Are there any tool to split Mapinfo MIF file?

kitex

unread,
Mar 20, 2013, 11:49:22 PM3/20/13
to mapi...@googlegroups.com
Hi Uffe, Now I get exteded value error 503.  My tab file skeleton :

!table
!version 800
!charset WindowsLatin1
!edit_version 450

Definition Table
  Type NATIVE Charset "WindowsLatin1"
  Fields 2
    Float Float ;
    String Char (200) ;
begin_metadata
"\IsReadOnly" = "FALSE"
"\MapInfo" = ""
"\MapInfo\TableID" = "997e2b6c-de12-4906-939d-6cf907ffdb4f"
end_metadata

 
Reply all
Reply to author
Forward
0 new messages