<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using annotate and proc gproject with European cities in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34704#M1101</link>
    <description>Hello and thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
I have a group of European cities I am trying to set up as an annotate dataset.  I got the longitude and latitude of the cities  from the worldcts sas dataset that I downloaded today.&lt;BR /&gt;
&lt;BR /&gt;
here's how I got the long &amp;amp; lat:&lt;BR /&gt;
create table worldcts as&lt;BR /&gt;
select cname,  city, &lt;BR /&gt;
 (atan(1)/45 * -1 *long) as x, (atan(1)/45 * lat) as y&lt;BR /&gt;
from wct.worldcts&lt;BR /&gt;
&lt;BR /&gt;
then I merged this dataset with my small group of cities.&lt;BR /&gt;
&lt;BR /&gt;
I'm getting an error in my log when I run gproject, can anyone help?&lt;BR /&gt;
&lt;BR /&gt;
1042&lt;BR /&gt;
1043  /*  Project the maps. ASIS permits duplicate observations to */&lt;BR /&gt;
1044  /*  exist in the data and should be used whenever ANNOTATE   */&lt;BR /&gt;
1045  /*  observations are included in a projection.               */&lt;BR /&gt;
1046  proc gproject data=all out=allp asis ;&lt;BR /&gt;
1047     id city;&lt;BR /&gt;
1048  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: PARALLEL1 = -1.195555979.&lt;BR /&gt;
NOTE: PARALLEL2 = 55.350554674.&lt;BR /&gt;
ERROR: Standard parallels lie on opposite sides of the equator.&lt;BR /&gt;
ERROR: Equator is too close to the median latitude of the map data set for&lt;BR /&gt;
       default parallel calculation.  Try specifying PARALLEL1 and PARALLEL2&lt;BR /&gt;
       values explicitly.&lt;BR /&gt;
&lt;BR /&gt;
europemap is made like this:&lt;BR /&gt;
/* Get the europe  map */&lt;BR /&gt;
create table europemap as&lt;BR /&gt;
select long as x, lat as y, cont, id, segment&lt;BR /&gt;
from maps.europe ;&lt;BR /&gt;
&lt;BR /&gt;
My annotate dataset (before I "set" it together with the europe map):&lt;BR /&gt;
&lt;BR /&gt;
City Name	Country Name	x	y	xsys	ysys	hsys	when	anno_flag	text	color	style	size	position&lt;BR /&gt;
													&lt;BR /&gt;
AMSTERDAM	Netherlands	0.08563	0.91426	2	2	3	a	1				.	5&lt;BR /&gt;
AMSTERDAM	South Africa	0.53527	-0.46458	2	2	3	a	1				.	5&lt;BR /&gt;
BIRMINGHAM	United Kingdom	-0.033	0.91591	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
BONN	Germany	0.12337	0.88542	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
BREMEN	Germany	0.15403	0.92634	2	2	3	a	1				.	5&lt;BR /&gt;
BRESCIA	Italy	0.17801	0.79492	2	2	3	a	1				.	5&lt;BR /&gt;
BRUSSEL		.	.	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
CARSHALTON, SURREY		.	.	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
GENOVA	Italy	0.15499	0.77528	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
GRONINGEN	Netherlands	0.11495	0.92865	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
GRONINGEN	Suriname	-0.96808	0.10123	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LEIDEN	Netherlands	0.07818	0.91049	2	2	3	a	1				.	5&lt;BR /&gt;
LEUVEN	Belgium	0.08234	0.88813	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LONDON	Canada	-1.41786	0.75031	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LONDON	Kiribati	-2.74882	0.03491	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LONDON	United Kingdom	-0.00113	0.89906	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
MÜNCHEN		.	.	2	2	3	a	1				.	5&lt;BR /&gt;
NIJMEGEN	Netherlands	0.10206	0.9049	2	2	3	a	1				.	5&lt;BR /&gt;
PARIS	France	0.04091	0.85273	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
PARIS	France	0.04091	0.85273	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
PARMA	Italy	0.18032	0.78203	2	2	3	a	1				.	5&lt;BR /&gt;
ROMA	Australia	2.59701	-0.46389	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
ROMA	Lesotho	0.48418	-0.51432	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
ROTTERDAM	Netherlands	0.07864	0.90604	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
UTRECHT	Netherlands	0.08914	0.90941	2	2	3	a	1				.	5&lt;BR /&gt;
UTRECHT	South Africa	0.52925	-0.4829	2	2	3	a	1				.	5</description>
    <pubDate>Fri, 11 Jun 2010 18:40:05 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-06-11T18:40:05Z</dc:date>
    <item>
      <title>Using annotate and proc gproject with European cities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34704#M1101</link>
      <description>Hello and thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
I have a group of European cities I am trying to set up as an annotate dataset.  I got the longitude and latitude of the cities  from the worldcts sas dataset that I downloaded today.&lt;BR /&gt;
&lt;BR /&gt;
here's how I got the long &amp;amp; lat:&lt;BR /&gt;
create table worldcts as&lt;BR /&gt;
select cname,  city, &lt;BR /&gt;
 (atan(1)/45 * -1 *long) as x, (atan(1)/45 * lat) as y&lt;BR /&gt;
from wct.worldcts&lt;BR /&gt;
&lt;BR /&gt;
then I merged this dataset with my small group of cities.&lt;BR /&gt;
&lt;BR /&gt;
I'm getting an error in my log when I run gproject, can anyone help?&lt;BR /&gt;
&lt;BR /&gt;
1042&lt;BR /&gt;
1043  /*  Project the maps. ASIS permits duplicate observations to */&lt;BR /&gt;
1044  /*  exist in the data and should be used whenever ANNOTATE   */&lt;BR /&gt;
1045  /*  observations are included in a projection.               */&lt;BR /&gt;
1046  proc gproject data=all out=allp asis ;&lt;BR /&gt;
1047     id city;&lt;BR /&gt;
1048  run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: PARALLEL1 = -1.195555979.&lt;BR /&gt;
NOTE: PARALLEL2 = 55.350554674.&lt;BR /&gt;
ERROR: Standard parallels lie on opposite sides of the equator.&lt;BR /&gt;
ERROR: Equator is too close to the median latitude of the map data set for&lt;BR /&gt;
       default parallel calculation.  Try specifying PARALLEL1 and PARALLEL2&lt;BR /&gt;
       values explicitly.&lt;BR /&gt;
&lt;BR /&gt;
europemap is made like this:&lt;BR /&gt;
/* Get the europe  map */&lt;BR /&gt;
create table europemap as&lt;BR /&gt;
select long as x, lat as y, cont, id, segment&lt;BR /&gt;
from maps.europe ;&lt;BR /&gt;
&lt;BR /&gt;
My annotate dataset (before I "set" it together with the europe map):&lt;BR /&gt;
&lt;BR /&gt;
City Name	Country Name	x	y	xsys	ysys	hsys	when	anno_flag	text	color	style	size	position&lt;BR /&gt;
													&lt;BR /&gt;
AMSTERDAM	Netherlands	0.08563	0.91426	2	2	3	a	1				.	5&lt;BR /&gt;
AMSTERDAM	South Africa	0.53527	-0.46458	2	2	3	a	1				.	5&lt;BR /&gt;
BIRMINGHAM	United Kingdom	-0.033	0.91591	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
BONN	Germany	0.12337	0.88542	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
BREMEN	Germany	0.15403	0.92634	2	2	3	a	1				.	5&lt;BR /&gt;
BRESCIA	Italy	0.17801	0.79492	2	2	3	a	1				.	5&lt;BR /&gt;
BRUSSEL		.	.	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
CARSHALTON, SURREY		.	.	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
GENOVA	Italy	0.15499	0.77528	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
GRONINGEN	Netherlands	0.11495	0.92865	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
GRONINGEN	Suriname	-0.96808	0.10123	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LEIDEN	Netherlands	0.07818	0.91049	2	2	3	a	1				.	5&lt;BR /&gt;
LEUVEN	Belgium	0.08234	0.88813	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LONDON	Canada	-1.41786	0.75031	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LONDON	Kiribati	-2.74882	0.03491	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
LONDON	United Kingdom	-0.00113	0.89906	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
MÜNCHEN		.	.	2	2	3	a	1				.	5&lt;BR /&gt;
NIJMEGEN	Netherlands	0.10206	0.9049	2	2	3	a	1				.	5&lt;BR /&gt;
PARIS	France	0.04091	0.85273	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
PARIS	France	0.04091	0.85273	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
PARMA	Italy	0.18032	0.78203	2	2	3	a	1				.	5&lt;BR /&gt;
ROMA	Australia	2.59701	-0.46389	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
ROMA	Lesotho	0.48418	-0.51432	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
ROTTERDAM	Netherlands	0.07864	0.90604	2	2	3	a	1	V	DAGB	marker	1	5&lt;BR /&gt;
UTRECHT	Netherlands	0.08914	0.90941	2	2	3	a	1				.	5&lt;BR /&gt;
UTRECHT	South Africa	0.52925	-0.4829	2	2	3	a	1				.	5</description>
      <pubDate>Fri, 11 Jun 2010 18:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34704#M1101</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-11T18:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using annotate and proc gproject with European cities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34705#M1102</link>
      <description>Based on the few pieces of code &amp;amp; data, I'm not sure what you're trying to do makes geographical sense(?) ...&lt;BR /&gt;
&lt;BR /&gt;
You're taking maps.europe, and combining it with world cities (many of which aren't in europe), and then gprojecting them together.  You would really only want to project lat/long points with a given map, if those points are in the same geographical area as that map.  It doesn't really make sense to project a map of europe and lat/long points from Africa and Australia at the same time.&lt;BR /&gt;
&lt;BR /&gt;
Per this particular error message, the default projection method for "proc gproject" is "Albers", and SAS' albers projection isn't really up to the task of projecting a map that has coordinates in both the Northern and Southern hemisphere.  You can see the same error by trying to gproject all the coordinates of maps.world at the same time.&lt;BR /&gt;
&lt;BR /&gt;
You can probably work around this error message by specifying another projection technique (such as "project=hammer") ... but you you should really decide whether you want just Europe, or Europe &amp;amp; Africa/Australia/etc first.</description>
      <pubDate>Mon, 14 Jun 2010 19:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34705#M1102</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-06-14T19:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using annotate and proc gproject with European cities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34706#M1103</link>
      <description>Thanks for your help.  I am combining my list of cities with the world cities dataset but I am only keeping my list of cities, so I think they are all in the same general area (Europe).  The dataset I posted is the entirety of the anno dataset I am using.   Here's a code snippet.&lt;BR /&gt;
&lt;BR /&gt;
1023       data anno_cities;&lt;BR /&gt;
1024       	merge site_cities(in=sites) worldcts;&lt;BR /&gt;
1025       	by city;&lt;BR /&gt;
1026       	if sites;&lt;BR /&gt;
...etc.&lt;BR /&gt;
&lt;BR /&gt;
I did manage to make this work using project=robinson and got the following warning message &lt;BR /&gt;
NOTE: The ROBINSON projection is experimental.&lt;BR /&gt;
NOTE: POLELONG = 4.3491667794.&lt;BR /&gt;
&lt;BR /&gt;
Which is fine but I'd like to figure out how to do it "right".  To address the point you raised, I do want just Europe at this time but the only dataset I can use to get city lat/long is the worldcts, as far as I know.  &lt;BR /&gt;
&lt;BR /&gt;
Please let me know if I need to post more code or explanation.  (And thanks for the quick response. i was on vacation last week and today is my first day back.)</description>
      <pubDate>Mon, 21 Jun 2010 17:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34706#M1103</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-21T17:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using annotate and proc gproject with European cities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34707#M1104</link>
      <description>Your list has cities from Australia and South Africa (which are in the southern hemisphere) - and certain SAS projection techniques (such as the default Albers) aren't suited for projecting a map with coordinates in both the northern and southern hemishpheres.&lt;BR /&gt;
&lt;BR /&gt;
The projection techniques which are production (versus experimental) will vary, depending on which version of SAS you're using.  You can check your SAS/Graph doc, or tech support can help you figure out which are "production" in the version of SAS you have.&lt;BR /&gt;
&lt;BR /&gt;
For a graphical peek at what maps resulting from various projection techniques look like, see the following:&lt;BR /&gt;
&lt;BR /&gt;
   &lt;A href="http://robslink.com/SAS/democd34/aaaindex.htm" target="_blank"&gt;http://robslink.com/SAS/democd34/aaaindex.htm&lt;/A&gt;</description>
      <pubDate>Mon, 21 Jun 2010 18:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34707#M1104</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-06-21T18:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using annotate and proc gproject with European cities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34708#M1105</link>
      <description>gotcha. &lt;BR /&gt;
&lt;BR /&gt;
It's a merge problem higher up.  For example, Paris should only have one set of lat/long.  Same for Groningen.  I will work on that.  Thanks very much for your help &amp;amp; the helpful link!</description>
      <pubDate>Mon, 21 Jun 2010 18:19:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-annotate-and-proc-gproject-with-European-cities/m-p/34708#M1105</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-06-21T18:19:26Z</dc:date>
    </item>
  </channel>
</rss>

