Skip to main content
Solved

Join spatial and non spatial data

  • October 28, 2013
  • 7 replies
  • 116 views

I have a shape file imported into Postgis database, and another sets of non-spatial data in Postgresql. I wish to join both of them on a common attribute Country_name.

 

Can someone please explain to me the steps to doing that in FME (screenshots if possible) ?

 

Thanks

 

Best answer by david_r

Here's a screenshot:

 

 

 

 

David
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

david_r
Celebrity
  • October 28, 2013
Hi,

 

 

there are several ways to do this in FME, but the easiest is probably to use a FeatureMerger.

 

 

Route the spatial data into the REQUESTOR port and the non-spatial data into the SUPPLIER port. In the properties of the FeatureMerger, set the join attribute (Country_name in your example) for both the requestor and the supplier.

 

 

The features exiting the MERGED port should be what you're after.

 

 

David

david_r
Celebrity
  • Best Answer
  • October 28, 2013
Here's a screenshot:

 

 

 

 

David

  • Author
  • October 28, 2013
thanks David.

 

One more thing, please how can I write the results from MERGED into postgis with attributes from both non spatial and spatial. ?

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • October 28, 2013
Hi,

 

When creating a new table after inserting the writer feature type you can simply right click on the writer feature type and select copy from feature type.

 

Repeat that for both your input feature types. Mind you that in case of equal attribute names some kind of remanig and mapping will be necessary.

 

 

Hope this helps,

 

 

Itay

  • Author
  • October 28, 2013
thanks Itay, but when I copied from feature type, it gives me the option to copy from one of the sources, not both sources

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • October 28, 2013
So copy first from one and then do it agai. For the second input, it's as simple as that :)

juanmahere
Supporter
Forum|alt.badge.img+11
  • Supporter
  • June 5, 2015
Hi all,

 

 

I have a question related with this topic, more from the final part:

 

- I have a spatial and non-spatial features from a Shapefile. Then, I need to return the same features (non-spatial and spatial) once modified using FME. But the problem is FME doesn`t write to SHP those non-spatial ones.

 

Any suggestion?

 

 

Thanks!!

 

JuanM.

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