Question

Empty Mapinfo TAB or SHAPE file


Hello,

 

I am creating SHAPE or MITAB file from ORACLE Spatial table. I am able to create MITAB or SHPAE from table. But I want to create empty file if there are no records in table.

 

How can I do this?

2 replies

Userlevel 4
Hi,

 

 

It's not really possible (or quite quite complicated): FME is feature based, so when there are no features, nothing happens and nothing gets triggered.

 

 

There is a trick for Shape-files (http://fmepedia.safe.com/articles/How_To/Create-an-empty-Shape-file), but I can't see how you'd do it with Mapinfo-files, since they can contain any geometry.

 

 

The easiest solution might be to write a shutdown script that checks for the number of features written. If there were not features written, you could copy a pre-made, empty Mapinfo-file into the results folder.

 

 

David
I am thinking, as table is created by other application, if there are no rows to put in table insert a single row with null geometry value. I think that should create a empty file.

Reply