Question

.TAB to GeoJson error

  • 5 November 2013
  • 8 replies
  • 18 views

Hi there,

 

I am doing a conversion from a .TAB file to a .JSON file.

 

When i run the work bench normally it works fine.

 

However, when i try to convert it to a batch file i get an error saying that it is unable to open output file.

 

 

My reader is...

 

G:\\spatial\\Manage\\ParkingBays\\Data\\PAT\\Road_Marking.TAB

 

My writer is....

 

G:\\spatial\\Export\\External\\YellowLineParking\\Data\\Road_Marking.json

 

 

and the error i get is.......

 

Unable to open output file: 'G:\\spatial\\Export\\External\\YellowLineParking\\Data\\Road_Marking.json\\PAT'

 

 

Can anyone explain to me how and why this error is occuring?

 

Where does the "PAT" bit come from?

 

And how can I stop it from happening?

 

 

Many thanks in advance for your help.

 

 

Matt

8 replies

Userlevel 4
Hi,

 

 

can you show us the parameters you send to FME.exe in your batch file?

 

 

 

David
Userlevel 4
Badge +13
Hi,

 

 

The PAT comes form the option to retain source dataset basename in destination path, in the batch deploy wizard.

 

If you uncheck that you should be fine.

 

 

Itay
Userlevel 4
Badge +13
Hi,

 

 

BTW I have noticed that the wizard, despite it automatically picking up your chosen destination, doesnt preform well.

 

To avoid any errors taking place point to the destination folder in the set destination location for - step in the batch deploy wizard.

 

 

Hope this helps,

 

 

Itay

 

Thanks for your responses guys.

 

 

However, I am not ticking to retain the basename.

 

 

David, do you mean the parameters during the Batch file creation?

 

These are below

 

 

Source Data:

 

G:\\spatial\\Manage\\ParkingBays\\Data\\PAT\\Road_Marking.TAB

 

 

Destination Location:

 

G:\\spatial\\Export\\External\\YellowLineParking\\Data\\Road_Marking.json

 

(In here the "Batch deploy this writer" is ticked)

 

("Retain source dataset basename" is NOT ticked)

 

 

I have tried 'Run now' and 'Save Scripts' options with the same result.
I have just reselected the output folder as you suggested David, and the workbench runs through.

 

 

However, what happens now is that it creates a PAT file and does not update the pre-existing Road_Marking.JSON file.

 

 

Now I am even more confused
Userlevel 4
Badge +13
Hi,

 

 

This will onlt recreate the GeoJSON and not update is, for that you will need another approach, possibly including the JSONUpdater, GeometryExtractor and GeometryReplacer.

 

 

Itay
Thanks Itay,

 

That makes sense now.

 

 

Unfortunately I dont have the JSONUpdater transformer for some reason.

 

I will look at some other approach.

 

 

Thanks for your help.

 

 

Matt
Userlevel 4
Badge +13
Hi,

 

 

Glad to be of any help, the JSONUpdater was recently introduced (FME 2013 SP2).

 

 

Itay

Reply