BookmarkSubscribeRSS Feed
Fluorite | Level 6

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 



Dan Keating

Washington Post

SAS Employee

Using the polygon package for IML in place of PROC GINSIDE for calculating point intersection with multiple overlapping polygons


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.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation