Skip to main content
Question

Empty Mapinfo TAB or SHAPE file

  • April 8, 2015
  • 2 replies
  • 39 views

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?
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • April 9, 2015
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

  • Author
  • April 9, 2015
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.