2

Given four coordinates in csv file representing a coordinate system like this:

enter image description here

How can I use data from the table to create rectangle dataset using FME. The dataset should have one feature per line in the csv-file.

  • 1
    Can you show your FME workspace as it is now? Which transformers have you tried? Why didn't they work? – Martin Dec 7 '16 at 10:03
  • 1
    It would also be useful to get an example of the CSV structure (eg x,y,x,y is one line?) but I'll make a guess at a solution below anyway. – Mark Ireland Dec 7 '16 at 15:47
6

OK, I'm assuming your source CSV is a format like:

x1,y1,x2,y2
0,0,10,10
15,15,20,25

So, here you'll use the CSV reader to read the data.

The parameters dialog allows you to pick a column to use as an X and Y coordinate. DO NOT DO THAT! It won't use two columns and setting only one is not going to help.

So, once you have the CSV reader added, simply use a 2DBoxReplacer transformer. Select x1,y1 as the minimum coordinates, x2,y2 as the maximum.

The workspace will look like this:

enter image description here

I also put together a short movie demo at: http://screencast.com/t/dKfXTKkJ7Ell

  • Nice! I messed around with VertexCreator trying to sort and sample them before using pointConnector and AreaBuilder - and it failed :-) – ragnvald Dec 7 '16 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.