[gdal-dev] Recommended strategy to handle MIF file with a few big multipolygons

Jorge Arevalo jorgearevalo at libregis.org
Sun Mar 16 12:55:22 PDT 2014


Hello,

On Tue, Mar 11, 2014 at 12:05 AM, Even Rouault
<even.rouault at mines-paris.org> wrote:
> Well, attach a debugger to the ogr2ogr process and see where the time is
> spent.
>
> your SQL clause could be replaced by "-fid 1", but I'm not sure that the reason
> for the slowness.
>

Don't know. I could handle to load it in PostGIS using ogr2ogr and
changing some Postgres parameters. Thanks anyway!


>> Hello,
>>
>> I'm working with a MIF file, contaning just 5 multipolygons (in form
>> of "regions", in MapInfo terms). But the file weights 700MB. So, the
>> multipolygons are really big. I'd like to transform my file to SHP or
>> PostGIS using ogr2ogr, but any operation takes forever.
>>
>> My current approach is to use -sql flag this way:
>>
>> ogr2ogr -sql "select * from my_layer where fid = 1" my_layer.shp
>> my_layer.mif
>>
>> But after 2 hours, it still continues working. I've activated debug,
>> and last text I've seen is: "Shape: Treating as encoding
>> 'ISO-8859-1'."
>>
>> All the clip operations I've tried with ogr2ogr have the same
>> problems: I have to wait hours, and after that, I just get a SHP of
>> 100 Bytes. So, I kill the process.
>>
>> Should I be more patient? Or is there any smarter approach to handle
>> this kind of file?
>>
>> Best regards,
>
> --
> Geospatial professional services
> http://even.rouault.free.fr/services.html



-- 
Jorge Arevalo
Freelance developer

http://about.me/jorgeas80


More information about the gdal-dev mailing list