The question is pretty self-explanatory, there is a select by location option in ArcMap that allows you to select polygons from a dataset that have their centroid in polygons from ANOTHER DATASET. I think one would need to use the CenterPointReplacer transformer to create centroids of the polygon and select the centroids that are within the other polygon then join (DatabaseJoiner?) the selection back to the original polygon but I would like to know if there is an easier way.
You could try this:
So from the polygons, replace all by its center point.
Load both polygons and center points to a PointOnAreaOverlayer.
Test the points for more than 1 overlap.
You could try this:
So from the polygons, replace all by its center point.
Load both polygons and center points to a PointOnAreaOverlayer.
Test the points for more than 1 overlap.
You could try this:
So from the polygons, replace all by its center point.
Load both polygons and center points to a PointOnAreaOverlayer.
Test the points for more than 1 overlap.
You could try this:
So from the polygons, replace all by its center point.
Load both polygons and center points to a PointOnAreaOverlayer.
Test the points for more than 1 overlap.
Ok, after looking at yours and rethinking a bit, here is what I have constructed:
selectarkypolygons-that-havecentroids-inside-green.png
You can see that there has been ONE more polygon selected when I apply the second PointOnAreaOverlayer to extract the polygons matching the selected centroids. The problem with using the PointOnAreaOverlayer transformer for the polygon re-selection is that it may (I have to check my outputs) be selecting more polygons than necessary because a centroid of one polygon may overlap a polygon that shouldn't be selected(doesn't have centroid in). This is why I would rather create a join between the centroid selection and the original Arky_Polys by a Unique_ID field and then create a polygon output from that selection but I can't find one that can join and select properly. How can I select the Arky_Polys that match the attributes from the centroid selection?
I would use a Counter (ID)-> GeometryExtractor -> CenterPointReplacer -> SpatialRelator (attributes that must differ the ID from the counter) -> GeometryReplacer.
I would use a Counter (ID)-> GeometryExtractor -> CenterPointReplacer -> SpatialRelator (attributes that must differ the ID from the counter) -> GeometryReplacer.
I would use a Counter (ID)-> GeometryExtractor -> CenterPointReplacer -> SpatialRelator (attributes that must differ the ID from the counter) -> GeometryReplacer.
Ok, after looking at yours and rethinking a bit, here is what I have constructed:
selectarkypolygons-that-havecentroids-inside-green.png
You can see that there has been ONE more polygon selected when I apply the second PointOnAreaOverlayer to extract the polygons matching the selected centroids. The problem with using the PointOnAreaOverlayer transformer for the polygon re-selection is that it may (I have to check my outputs) be selecting more polygons than necessary because a centroid of one polygon may overlap a polygon that shouldn't be selected(doesn't have centroid in). This is why I would rather create a join between the centroid selection and the original Arky_Polys by a Unique_ID field and then create a polygon output from that selection but I can't find one that can join and select properly. How can I select the Arky_Polys that match the attributes from the centroid selection?
If there are no identical polygons between the datasets, you can ignore the setting "attributes that must differ"
Thanks for all your help @erik_jan and @jdh. I have since modified my workflow to include the GeometryExtractor and Replacer (this was the key actually) so that I could run my selection of centroids derived from the original polygons and then turn those selected points back into their corresponding polygons. Here is what I did if anyone needs to do something similar.
selectpolygons-that-havecentroids-in-another-polyg.png
Thanks again! :)