BookmarkSubscribeRSS Feed
NewsGuy
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 

 

Thanks. 

Dan Keating

Washington Post

dan.keating@washpost.com

1 REPLY 1
FriedEgg
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.

 

https://github.com/FriedEgg/Papers/blob/master/Random/Alternative%20to%20PROC%20GINSIDE%20for%20non-...

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 747 views
  • 0 likes
  • 2 in conversation