Calculating spatial overlaps

Reply
Frequent Contributor
Posts: 129

Calculating spatial overlaps

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?

Grand Advisor
Posts: 10,215

Re: Calculating spatial overlaps

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.

Frequent Contributor
Posts: 129

Re: Calculating spatial overlaps

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 :-) ).

SAS Super FREQ
Posts: 3,413

Re: Calculating spatial overlaps

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.

 

Ask a Question
Discussion stats
  • 3 replies
  • 310 views
  • 3 likes
  • 3 in conversation