Hi all,
I'm trying to create the following map:
First layer: SAS map.germany via proc gmap.
Second layer: imported shapefile (german lakes) - it can be displayed on top of the map by using the annotate poly & polycont function.
But the problem is: the coordinates don't match. I've tried two ways to solve this:
1) The SAS map has projected (Albers) coordinates in meter. If I use gproject to project the imported shapefile in the same projection, I'll get the coordinates in radians, not in meter.
2) If I project the shapefile in ArcMap before importing it into SAS, I get different meter values. (SAS map: 3xxxxxx,6xxxxxx. Imported Shapefile: -1xxxxx, 2xxxxxx) Tried Albers, Lambert and Equal Conic - all with the same result.
How can I get these two datasets in the same coordinate system, so that they can be mapped together?
Any help would be appreciated.
Not really an area where I can be of much help, but does the following SAS sample and SUGI paper provide any direction?:
http://support.sas.com/rnd/datavisualization/mapsonline/html/ginside_germany.html
http://www.sascommunity.org/sugi/SUGI87/Sugi-12-89%20Chojnacky%20Tymcio.pdf
Thanks Arthur, but unfortunately that's not what I need in this case.
I don't know if this will help but when I was using two different map sources it worked better to combine the data with the coordinates (latitude and longitude) before projection and then separate the parts out after.
Hhmm nice thought, but the problem is the SAS germany map is already projected - unfortunately SAS doesn't provide a map dataset for germany containing lat/long values as far as I know...
The first link I included contained the following comment in the code:
* THIS PROGRAM USES MAPS.GERMANY SAS RELEASE 9.2 *
* Given a dataset containing city names and latitude longitude *
* it can easily be annotated onto a map whose coordinates are *
* also in latitude and longitude. *
* However, if the desire is to include, in the dataset, the *
* region or province within which a city falls, one can *
* accomplish this with GINSIDE...as this sample shows *
Interesting. When I look at the MAPS library supplied in my version of SAS 9.2 the Germany data set has LAT and LONG with the unit in radians. X and Y are the Lambert projected longitude and latitude from the variable labels.
Maybe time to visit the SAS tech support downloads and see if other versions of the files are available.
The online example program GPJANNOT for GPROJECT shows conversion from degrees to radians.
You are right! I seemed to have lost these lat/long values somewhere on the way... Ok, now I can try the combined projection - thanks a lot!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.