Question

taking two shape files and adding whats missing from one to the other


Greetings,

 

  I have two shapefiles of roadway networks for a state.  One is just of state maintiained roadways (that I got from one source), and the other has about every road in the state, including the  state roads(from a different source).  Is there a way, or transformer, that will look at the two and create a shapefile using all of the data from the state maintained file, and add the data that is present in the second file, but not in the first?

 

 

Sorry if this sounds confusing, what I am trying to do is a bit odd.  I got these files from two different entities, and I have a feeling that the one that has all the info doesn't have as accurate data as just the state roads file, but they want a file containing what they know is the good state data, and the somewhat good other data.

 

 

Thanks,

 

Mike

4 replies

Userlevel 2
Badge +17
Hi Mike,

 

 

If each road has unique identifier common to the 2 shape files (e.g. ROAD_ID),  you can use the FeatureMerger transformer.

 

1) Send maintained roads (features from 1st shp) to Requestor port.

 

2) Send all roads (features from 2nd shp) to Supplier port.

 

3) Specify ROAD_ID to "Join On" parameter.

 

Then, maintained roads will go to Merged port, and not-maintained roads will go to Unreferenced port. You can write them together into a result dataset.

 

 

Takashi
Userlevel 4
Hi,

 

 

also take a look at the Matcher and the ChangeDetector, especially if there is no common unique identifier between the two datasets.

 

 

David
Thank you for the replies! Takashi, I only wish they had a common identefier, it's a bit of a mess.  I will look at the matcher and change detector.  What I think its gonna hose me up is that the geometry of the State roads only doesn't exactly match up with the geometry from the other file of the roads they share :( I will look into the matche and change detectors
Userlevel 2
Badge +17
If the state road geometries almost (but not exactly) match with geometries in the other file, this workflow might work. That is, create buffers (line-like long and slender polygons) of state roads, and filter out state roads from all roads using the buffered polygon.

 

 

Reply