Skip to main content
Question

test coordinate system between 2 feature class


Forum|alt.badge.img
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 . 

 

 

 

8 replies

Forum|alt.badge.img
  • July 17, 2014
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.

david_r
Celebrity
  • July 18, 2014
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

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 18, 2014
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.

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 18, 2014
..that way yu dont have to link them as Vikram said. You are not testing for attirubtes basicaly, you are testing traits.

david_r
Celebrity
  • July 18, 2014
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

david_r
Celebrity
  • July 18, 2014
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

Forum|alt.badge.img
  • Author
  • July 18, 2014
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 :) 

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 21, 2014
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.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings