[GRASS-dev] how to reproject a raster map with absolute numbers without losing data
Moritz Lennert
mlennert at club.worldonline.be
Fri Dec 2 05:38:22 PST 2016
On 02/12/16 11:53, Paulo van Breugel wrote:
>
>
> On 02-12-16 11:19, Moritz Lennert wrote:
>> On 01/12/16 14:31, Markus Metz wrote:
>>>
>>>
>>> On Thu, Dec 1, 2016 at 1:16 PM, Paulo van Breugel
>>> <p.vanbreugel at gmail.com <mailto:p.vanbreugel at gmail.com>> wrote:
>>>>
>>>>
>>>>
>>>> On 01-12-16 12:01, Moritz Lennert wrote:
>>>>>
>>>>> On 30/11/16 09:40, Paulo van Breugel wrote:
>>>>>>
>>>>>>
>>>>>>> On Tue, Nov 29, 2016 at 5:44 PM, Moritz Lennert
>>>>>
>>>>>
>>>>>>>
>>>>>>>> An area() function in r.mapcalc would be nice...
>>>>>>
>>>>>>
>>>>>> Would indeed be a nice addition, but it isn't too difficult to
>>>>>> compute,
>>>>>> using:
>>>>>>
>>>>>> |g.region rast=afripop10 at PERMANENT|
>>>>>> |PI=3.1415926536|
>>>>>> |export `g.region -g`|
>>>>>> |export `g.proj -j`|
>>>>>
>>>>>
>>>>> This doesn't work for me as the output is
>>>>>
>>>>> g.proj -j
>>>>>
>>>>> +proj=longlat
>>>>> +no_defs
>>>>> +a=6378137
>>>>> +rf=298.257223563
>>>>> +towgs84=0.000,0.000,0.000
>>>>>
>>>>> and +a is not acceptable as variable name.
>>>>
>>>>
>>>> You are right, that should be g.proj -g I think
>>
>> No this does not provide a, but the name of the ellipsoid. I'm not
>> sure that you can currently directly parse g.proj output for a...
>
> It does to me:
>
> GRASS 7.3.svn (latlon):~ > g.proj -g
> name=Lat/Lon
> proj=ll
> datum=wgs84
> a=6378137
> es=0.006694379990141316
> no_defs=defined
> unit=degree
> units=degrees
> meters=1.0
> GRASS 7.3.svn (latlon):~ >
I guess this depends on how you defined the projection in the first
place. I get:
> g.proj -g
name=Lat/Lon
proj=ll
datum=wgs84
ellps=wgs84
no_defs=defined
unit=degree
units=degrees
meters=1.0
Moritz
More information about the grass-dev
mailing list