2

I have two data sets, one is a polygon data set (Norwegian counties) and the other is points (roadkill incidence data). I want to do a spatial join where the points dataset inherits attributes (name/number etc) from the county they are within.

I am setting up a batch job which will be supplied with regularly updated data. The tool is FME 2015.0.

enter image description here

I have tried using the SpatialFilter transformer to do this using my point data as candidate data and the county data set as filter data. I have tried Contains and within filters with no luck. I only the county polygons from the passed output. Swithching around does not help much either. Still polygons.

Is there an other way to do this using FME?

6
  • 1
    Just to clarify, you are getting a polygon output even when the candidate is points data?
    – HishivS
    Commented Apr 23, 2015 at 14:27
  • Yes. I can check it once more, but it surprised me somewhat based on what I read in the transformer description.
    – ragnvald
    Commented Apr 23, 2015 at 14:52
  • That's not the behaviour I'm getting in FME 2014. Perhaps it's a bug in your version. Check with Safe support.
    – HishivS
    Commented Apr 23, 2015 at 14:56
  • Ok. Will do. Just checked and I can confirm the "anomaly".
    – ragnvald
    Commented Apr 23, 2015 at 15:09
  • Do you have "Use Bounding Box" set to "Yes"? Also, I've had mixed results with the SpatialFilter. Setting your test to "Intersects" should be fine with your filter as your polygon and your candidate as the points.
    – Fezter
    Commented Apr 23, 2015 at 23:30

2 Answers 2

3

Try putting a Deaggregator transformer before the SpatialFilter. Technically the SpatialFilter is using OGC spatial relationship tests. However, these spatial relations are not defined for aggregate geometries.

So if your data is a set of aggregate features, it won't be OGC compliant, but deaggregating would solve the problem.

Alternatively use a different method like the PointOnAreaOverlayer mentioned by someone else.

For the full list of supported relationships see this page in the documentation.

Other geometries that aren't OGC valid for the purposes of this transformer:

  • surfaces
  • solids
  • point clouds
  • rasters
2

PointOnAreaOverlayer should achieve the same task if you can't get the SpatialFilter working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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