Skip to main content
Question

Attribute Filter

  • December 13, 2012
  • 6 replies
  • 109 views

Something silly, I know, but has me stumped ...

 

 

I have a dataset with fishing activities, which I want to filter according to the FishingType, and Species caught

 

 

I'm going to run two sequential Attribute Filters

 

e.g. FishingType = 1 and Species = scallops

 

 

I import the possible attribute values for each of the attributes, I have 10 FishingTypes and 20 species ....

 

 

But I'm getting no attributes being filtered on the FishingType - they all go through the UnFiltered port

 

 

Species works no problem ....

 

 

Can you filter by a "decimal" Attribute Type or does it have to be a character$   ?

 

 

Thanks,

 

 

Bruce

6 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • December 13, 2012
Hi Bruce,

 

 

Testing on numeric attributes should not be a problem, what is your input data format? can it be that the FishingType is actually a string?

 

If that is the case then I would try '1' and not 1.

 

Hope this helps,

 

Itay

  • Author
  • December 13, 2012
@Itay

 

 

Hi, I've checked the input data format and it's a decimal, not a string .....

 

So I'm perplexed...  

 

At least you've reassured me what I'm doing is correct, but will have to go back and analyse the data more closely  !

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • December 13, 2012
@Bruce,

 

Did you cahnge the test mode? did that help?

davideagle
Contributor
Forum|alt.badge.img+21
  • Contributor
  • December 14, 2012
Bruce - as part of your debugging to trace the problem, check that your imported values (assuming you are using FME to import the values mid flow) are actually joining to the correct features? A Logger or Inspector will help you there. Also instead of the AttributeFilter try using a TestFilter and add a couple of tests instead to test for the required values and see if that picks up the features you need? Certainly sounds like an odd issue...

  • Author
  • December 17, 2012
@Dave -  Thanks - I've been using Inspectors all the way through to check the outputs.

 

I've now thrown in a couple of TestFilters and set them so that Fishingtyp = 1; Fishingtyp = 10  etc.

 

 

And that passes through the correct features ....

 

 

So I've added in a new Attribute Filter, imported the variables for the Fishingtyp again, and still don't get any data which passes the filter  !

 

I've even manually edited in the permissable variables rather than import them, and that doesn't work either  -

 

 

Most perplexing

  • Author
  • December 17, 2012
OK - curiouser and curiouser .....

 

 

The data was originally in ESRI shp format, and I had converted it to MapInfo Tab, as that's our corporate GIS.....

 

 

Out of sheer perversity I went back to the raw  shp data and applied the AttributeFilter

 

and it worked  !!

 

 

Looking at the differences in the two data formats Shp to Tab

 

the FishingTyp attribute in shp format is a 'Number'

 

and in Tab format it's a 'Decimal'   (both width 9, precision 0)

 

 

Is there something in the MapInfoTab format which might be causing this problem ?

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