Skip to main content
Hello, 

 

 

I am trying to compare corrdinate system between 2 feature class . If corrdinate system is different then I want to terminate the process 

 

 

In this below workflow my tester always gets failed even when both feature class are in same coordinate system . 

 

 

Can anyoone point out what am I doing wrong . 

 

 

 

Hi Vikram,

 

 

You are testing a feature at a time by itself and it has no reference to the coordinatesytem of the other feature. One feature comes from the first featuretype and there is nothing to link it to the second featuretype.

 

 

Also, in this workspace you would test ever feature. I would suggest you test one feature from each rather than every single feature.
Hi,

 

 

before the Tester, route all features into an AttributeCreator setup like this:

 

 

 

 

You can now check if _prev_coordsys = _coordsys and route accordingly.

 

 

David
Hi,

 

 

 

Best to combine both answers.

 

First use only one feature per featuretype by using a sampler. (nu need to test all features within the same featuretype)

 

Then feed them to the workspace you posted but insert Davids suggestion before the tester.

 

 


..that way yu dont have to link them as Vikram said. You are not testing for attirubtes basicaly, you are testing traits.
Well, if we're splitting hairs, I'd recommend not using the Sampler at all, since it will still read all the features in both datasets, which often is much slower than the comparison itself ;-)

 

 

For a case like this, I'd rather set the "Max features to read = 1" and skip the Sampler... :-)

 

 

David
But I see now that Vikram is using a dynamic reader, so it might well read many feature types with one or many different projections... Caveat emptor...

 

 

David
Thanks David and Gio for the insight . I found a way to detect cooordinate system . 

 

 

I kept my reader as Schema any format and exposed the attribute fme_coordinate_system .

 

 

And then I could compare my coordinate system . 

 

 

I will definitely try both your methods too :) 
Did'nt realise Sampler would read all features..

 

I read the discription that it will "discard the rest"...so i should have known.

 

Then of course Max-features to read is more logical.

 

 

It was not to split hairs, wich if one asks ones wive is a biological self emergent event anyway.... 😉.

 

It was ment, as u obviously did realise, to reduce procestime.

 

 

Then again, Vikram's own solution in combination with max-feature to read, seems most efficient.

Reply