turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Calculating spatial overlaps

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-04-2016 01:49 AM

I have table MAP which is a SAS map file of contiguous regions (ID=RegionID). I also have table POINTS which is a set of latitude and longitude points (ID=PointID).

For each PointID, I wish to define a circle of radius R and calculate the area that the circle overlaps with each of the regions. That is, return a file with one record per RegionID by PointID combination, with a variable indicating the area of overlap. The overlaps will be mostly zero, apart from the regions around the specified points. Are there SAS procedures that will help with the overlap calculation?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-04-2016 12:03 PM

I would suggest finding out if you have access to SAS/GIS. This sound much more suitable to the suite of tools in an actual GIS product.

I suspect I could generate some rough estimate by using the point to create a very large number of points within the area described by point and radius and then use Proc Ginside with the INSIDEONLY option. The percentage of points within the map region should correlate to the percentage of area within the area around your reference point that is inside the map region.

I will make no claims of efficiency, ease of coding or time to run.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-04-2016 07:21 PM

I don't think we have SAS/GIS licenced. In any event, I couldn't find a suitable routine in the SAS/GIS library. I guess I'll look for a suitable R library (or learn how to use ArcGIS - which I've been trying to avoid :-) ).

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-05-2016 03:00 PM

Do you have SAS/IML 14.1? You could use the 'polygon' package to estimate the area by using a Monte Carlo technique and the PolyPtInside function. In the 'programs' directory are two example of using Monte Carlo to estimate area: TestPolyPtInside.sas and TestNonSimplePoly.sas. The Monte Carlo step would need to simulate points uniformly in the disk of radius R.