span8
span4
span8
span4
I am fairly new to FME,and I am trying to write a custom writer using Java.I went through the sample file in the installer,and I managed to put together a functioning writer.However,I am stuck on how to deal with multiple feature types.For example,if I am using an ESRI-Shape reader,and my dataset has 4 shape files,I want my output to also have the same 4 files.
At the present time,my writer has a directory for the output.So,when I add my writer,I choose the directory for the Dataset option and click OK.Then I get the prompt for "Select Feature Type",and I select all.This creates separate Feature Type records,named for each shape file,as I would expect.However,when I execute my code … it does not seem like I have access to the Feature Type Name parameter.If I create a separate writer for each feature type,I can get the data from the DefLines,but that doesn't seem like the correct way to do it.From using stock writers,such as ESRI-Shape,it seems like the correct way is to create one writer,and use this parameter somehow … but I can't seem to figure out how to access it.
I do have to wonder if writing a custom writer in Java is the best solution for you here.I suppose it depends on what you are trying to achieve and how you are going to deploy this,but it's unusual for a new user to need to do this.
Anyway,perhaps the best thing to do is to sign up to our developer partner program.You can find out more information about ithere.That way you can use the support team as a source of help for problems like this,and they will also be able to explain if there is a better solution for your goal.
I hope this is of use,
Regards
Mark
Product Evangelist
亚搏在线Safe Software
Hi,
If your requirement is
If the input is 1 shape file then the target should have 1 shape file or If the input is 4 shape files then the target should have 4 shape files
then there is no need of any custom writer.If my understanding is different do let me know...
© 2019 亚搏在线Safe Software Inc |Legal