I'm trying to work with a MIF file containing 5 really big multipolygons, but every operation I try takes hours, or just crash because of memory issues. Mainly using ogr2ogr, to transform MIF file to other format, like SHP or PostGIS. Unsuccessful, so far.
The file weights 700MB. I could load it into PostGIS using ogr2ogr. I just left the command running all night and it finished silently. The size of the table in disk is about 160MB. So, I suspect something went wrong (looks too small)
UPDATE
This is the header of MIF file
Version 300
Charset "Neutral"
Delimiter ","
CoordSys Earth Projection 8, 28, "m", -3, 0, 0.9996, 500000, 0
Columns 2
Float Float
String Char(32)
Data
After that, 5 regions with:
- 124222 polygons
- 462270 polygons
- 798815 polygons
- 1124915 polygons
- 1706436 polygons
About the PostGIS table, I'm trying to check it. It contains 5 rows, like the original MIF file, but every single operation I try to execute over this table using the geometry column also takes hours. I tried to add a new integer field, and after 4 hours is still running. With ps, the process says "ALTER TABLE waiting".
This is the schema of the table
Column | Type | Modifiers
--------------+------------------+----------------------------------------------
ogc_fid | integer | not null default nextval('my_table_ogc_fid_seq'::regclass)
wkb_geometry | geometry |
float | double precision |
string | character(32) |
Indexes:
"my_table_pk" PRIMARY KEY, btree (ogc_fid)
"my_table_geom_idx" gist (wkb_geometry)
Check constraints:
"enforce_dims_wkb_geometry" CHECK (st_ndims(wkb_geometry) = 2)
"enforce_srid_wkb_geometry" CHECK (st_srid(wkb_geometry) = 23030)
So, how could I handle this big MIF file? I can't do anything with it, neither with the result PostGIS table.