<?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 Re: PROC GPROJECT LatLong to a specific Lambert in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GPROJECT-LatLong-to-a-specific-Lambert/m-p/400947#M13684</link>
    <description>&lt;P&gt;It appears there was a bug in version 9.4, and it appears that bug is fixed in the 9.4 maintenance 4 (9.4m4) release.&lt;/P&gt;
&lt;P&gt;Here's the output when I run your program at 9.4m4 ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gproject.png" style="width: 448px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15608i8F6BFF120D6039F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="gproject.png" alt="gproject.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2017 13:15:18 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2017-10-04T13:15:18Z</dc:date>
    <item>
      <title>PROC GPROJECT LatLong to a specific Lambert</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GPROJECT-LatLong-to-a-specific-Lambert/m-p/204495#M7594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I work with SAS 9.4.&lt;/P&gt;&lt;P&gt;Now I am trying to apply proc gproject to covert WGS84-coordinates to a particular Lambert-projection.&lt;/P&gt;&lt;P&gt;And keep getting unsatisfactory results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My test coordinates are:&lt;/P&gt;&lt;P&gt;long=13.84 ; lat=49.77&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct answer should be&lt;/P&gt;&lt;P&gt;XOK=272304.68; YOK =2212578.11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data tmp; long=13.84 ; lat=49.77; XOK=272304.68; YOK =2212578.11; run;&lt;/P&gt;&lt;P&gt;proc gproject data=tmp out=tmp1 degrees latlong from="+proj=longlat +datum=WGS84" &lt;/P&gt;&lt;P&gt;to = "+proj=lcc +lat_1=40 +lat_2=60 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"; id ; run;&lt;/P&gt;&lt;P&gt;proc print data=tmp1; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="21" style="border: 0px solid black;" width="80"&gt;X&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black;" width="80"&gt;Y&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black;" width="80"&gt;long&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black;" width="80"&gt;lat&lt;/TD&gt;&lt;TD class="xl63" style="border: 0px solid black;" width="80"&gt;XOK&lt;/TD&gt;&lt;TD class="xl64" style="border: 0px solid black;" width="80"&gt;YOK&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="21" style="border: 0px solid black;"&gt;316986.13&lt;/TD&gt;&lt;TD class="xl65" style="border: 0px solid black;"&gt;2908828.39&lt;/TD&gt;&lt;TD class="xl65" style="border: 0px solid black;"&gt;13.84&lt;/TD&gt;&lt;TD class="xl65" style="border: 0px solid black;"&gt;49.77&lt;/TD&gt;&lt;TD class="xl65" style="border: 0px solid black;"&gt;272304.68&lt;/TD&gt;&lt;TD class="xl66" style="border: 0px solid black;"&gt;2212578.11&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;which is obviously wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I tried it in R:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;require(rgdal)&lt;/P&gt;&lt;P&gt;require(spatstat)&lt;/P&gt;&lt;P&gt;xy &amp;lt;- c(13.84, 49.77)&lt;/P&gt;&lt;P&gt;sp1 &amp;lt;- SpatialPoints(coord=matrix(xy, ncol=2))&lt;/P&gt;&lt;P&gt;proj4string(sp1) &amp;lt;- CRS("+proj=longlat +datum=WGS84")&lt;/P&gt;&lt;P&gt;spTransform(sp1, CRS=CRS("+proj=lcc +lat_1=40 +lat_2=60 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which gives the correct values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SpatialPoints:&lt;/P&gt;&lt;P&gt;&amp;nbsp; coords.x1&amp;nbsp;&amp;nbsp; coords.x2&lt;/P&gt;&lt;P&gt;[1,] 272304.7&amp;nbsp; 2212578&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does Sas use some kind of a deviant formula for Lambert transformations?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:35:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GPROJECT-LatLong-to-a-specific-Lambert/m-p/204495#M7594</guid>
      <dc:creator>Arbelo</dc:creator>
      <dc:date>2015-03-18T13:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GPROJECT LatLong to a specific Lambert</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GPROJECT-LatLong-to-a-specific-Lambert/m-p/400947#M13684</link>
      <description>&lt;P&gt;It appears there was a bug in version 9.4, and it appears that bug is fixed in the 9.4 maintenance 4 (9.4m4) release.&lt;/P&gt;
&lt;P&gt;Here's the output when I run your program at 9.4m4 ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gproject.png" style="width: 448px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15608i8F6BFF120D6039F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="gproject.png" alt="gproject.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 13:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GPROJECT-LatLong-to-a-specific-Lambert/m-p/400947#M13684</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2017-10-04T13:15:18Z</dc:date>
    </item>
  </channel>
</rss>

