views:

149

answers:

4

Hi all,

Is there a way to do spatial analysis (NOT just graphics) in SAS? What I really want is the ability to geographic queries like one can do in PostGIS or SpatialLite in PROC SQL.

I asked this on the SAS-L list and got nothing.

Thanks!

+2  A: 

I'm not sure whether your question is specific enough about what you're wanting to do, for someone to give you a good answer.

If you've got lat/long data, you could do detail and aggregate queries by choosing where clause criteria based on the lat/long values.

Incidentally, you might want to check out http://runsubmit.com for another stackoverflow style site with a more concentrated population of sas users.

Rog
I edited my comment a little, but if you haven't used PostGiS or Spatiallite, I am not sure it would help. I will check runsubmit.
ws
+1  A: 

I'm not familiar with PostGIS or SpatialLite, but SAS has some procedures dedicated to GIS specific tasks. This link says

SAS/GIS software enables you to do more than simply view your data in its spatial context. It also enables you to interact with the data by selecting features and performing actions that are based on your selections.

I don't know if proc sql will be able to easily replicate those features, but once the data is in SAS data sets, I don't see why you couldn't at least do some basic querys.

SAS also has some examples data and code working with spatial data here.

cmjohns
I think the answer is NO. SAS datatypes are super simple, and nobody here or on SAS-L even really knew what I was talking about .... Thanks to everyone who tried to help, though!
ws
A: 

The answer seems to be No, SAS doesn't support spatial datatypes and operators like spatialite or postgis.

(I am answering my own question to close the discussion, but thanks to all!)

ws
A: 

Actually, when you consider that the SQL queries in Spatialite/PostGIS are just being translated into a specific method of calculation. It can actually be done.

So to answer your question, can it be done in SAS in an easy way like spatialite (i.e simple queries?), No

But you could write a function to do what you need using Base SAS, i find SAS to be one of the best languages to use for quick data analysis.

izzy