[R-sig-Geo] WKT coordinate system string (PRJ) to PROJ.4
Roger Bivand
Roger.Bivand at nhh.no
Tue Jan 5 12:50:25 CET 2016
On Tue, 5 Jan 2016, Michael Sumner wrote:
> On Tue, 5 Jan 2016 at 22:22 Roger Bivand <Roger.Bivand at nhh.no> wrote:
>>
>> On Tue, 5 Jan 2016, Michael Sumner wrote:
>>
>>>> On Tue, 5 Jan 2016 at 21:09 Michael Sumner <mdsumner at gmail.com> wrote:
>>>
>>>> Hello, is there any R-level way to convert a WKT/PRJ *coordinate
> system*
>>> string to
>>>> PROJ.4 used by sp/rgdal?
>>>
>>>
>>>
>>> I see it in ogr_proj.cpp at line 124:
>>>
>>>
>>> if (hSRS->exportToProj4(&pszProj4) != OGRERR_NONE) {
>>>
>>> Roger, Edzer: could we please expose that functionality from rgdal to
> input
>>> WKT from R?
>>
>> That is exposed - the output comes in that of ogrInfo(), but needs the DSN
>> and layer too.
>>
>> I've committed the reverse of showWKT() as showP4() in revision 596 on
>> R-Forge - let me know if you need a Windows binary to test.
>>
>
> Brilliant, thanks for the help.
>
> I could definitely use the Windows binary, this is for a Windows-specific
> task. No huge rush, just whenever that is possible would be great.
On: http://win-builder.r-project.org/w96p7wcx7fi4 for this development
version.
Roger
>
> (I'm sorry about the HTML postings, I can't see how to control Google Inbox
> just how I need - I've reverted to Gmail in the hope it uses real ">"
> characters, and will try to remember to do so for lists).
>
> Cheers, Mike.
>
>>
>> Roger
>>
>>>
>>>
>>> Is that feasible? I'll have a look at doing it myself . . . I know it's
> a
>>> distraction from other goals.
>>>
>>>
>>> Thank you.
>>>
>>>
>>> Cheers, Mike.
>>>
>>>
>>>
>>>> (Previously I've written out to SHP/PRJ, and read back in with rgdal,
> but
>>> that's obviously a
>>>> bit naff.)
>>>
>>>
>>>> (I know you can rgeos::readWKT and wkb::readWKB for *geometry*).
>>>
>>>
>>>
>>>> Cheers, Mike.
>>>
>>>
>>>
>>>
>>
>> --
>> Roger Bivand
>> Department of Economics, Norwegian School of Economics,
>> Helleveien 30, N-5045 Bergen, Norway.
>> voice: +47 55 95 93 55; fax +47 55 95 91 00
>> e-mail: Roger.Bivand at nhh.no
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list