Proc ginside is running accurately for me, but I want more detailed results.
I have a shapefile that is made up of many overlapping polygons. Imagine the radio broadcast reach within a metro area. Each station has particular power and broadcast location, so each station has its own signal shadow polygon. One shapefile has all these overlapping polygons. Using ArcGis, if I select a particular point, it will select many records within the shapefile representing all of the stations that can be heard at that point.
I have many points and am using proc ginside to find which stations can be heard at that point, i.e. which polygons that point is in. But proc ginside only tells me whether a point is inside that entire shapefile. I'm using the station call-ID as the proc ginside ID. It seems to pick the call-ID of the first record of a matching polygon. I want to know every polygon it intersected.
Is there a way to get proc ginside to do that? I'm not in a position to post the data.
Otherwise I think I have to
1) make a list of the call-ids
2) write a looping macro to do the proc ginside individually for every station using a where statement so only that one polygon within the shapefile will be used (if proc ginside will let me do that). Otherwise I fear I have to use a macro to create separate polygons.
That sound right?
SAS 9.4
Thanks.
Dan Keating
Washington Post
dan.keating@washpost.com
This notebook utilizes the polygon package for IML created by Rick Wicklin in order determine whether any of a set of points are inside a set of non-simple (intersecting) polygons. In this example we have two overlapping shapes and five points.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.