[GRASS-user] create location from CLI

Dave Roberts droberts at montana.edu
Tue Sep 6 13:44:45 PDT 2016


Thanks for clarification Markus, and thanks Helmut for similar input. 
So, the last problem is that

g.proj -c proj4=-

followed by input to stdin works, but I cannot seem to construct a file 
with proj4 parameters that g.proj will accept, even though identical 
information entered at stdin works.  So, I'm still struggling for the 
syntax of aproj4 file I guess.

Thanks all, Dave

On 09/06/16 14:37, Markus Neteler wrote:
> Hi,
>
> On Sep 6, 2016 9:25 PM, "Dave Roberts" <droberts at montana.edu
> <mailto:droberts at montana.edu>> wrote:
>>
>> Hi Ken, Hi Sajid,
>>
>>    Thanks for the pointers.  I think my problem is that grass70 and
> g.proj parse the files differently.  I.e.,
>>
>> Here is file teste.prj
>>
>> PROJCS["Lambert_Conformal_Conic",
>>     GEOGCS["GCS_WGS_1984",
>>         DATUM["D_WGS_1984",
>>             SPHEROID["WGS_1984",6378137,298.257223563]],
>>         PRIMEM["Greenwich",0],
>>         UNIT["Degree",0.017453292519943295]],
>>     PROJECTION["Lambert_Conformal_Conic"],
>>     PARAMETER["standard_parallel_1",40],
>>     PARAMETER["standard_parallel_2",45],
>>     PARAMETER["latitude_of_origin",0],
>>     PARAMETER["central_meridian",-109],
>>     PARAMETER["false_easting",0],
>>     PARAMETER["false_northing",0],
>>     UNIT["Meter",1]]
>>
>> The following does not work
>>
>> grass70 -e -c teste.prj teste
>>
>> Creating new GRASS GIS location/mapset...
>> ERROR: ERROR 4: `teste.prj' not recognised as a supported
>> file format.
>>
>> ERROR: Could not read georeferenced file teste.prj using either OGR nor
>>        GDAL
>
> Yes because it is not a raster or vector file.
>
>> However, this does work
>>
>> grass70 -c teste
>> g.proj -c wkt=teste.prj
>
> This one is right.
>
>>    I'm having even worse luck with PROJ4 syntax of files.
>
> AFAIK that's only supported in g.proj.
>
> Markus
>

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts                                     office 406-994-4548
Professor and Head                                      FAX 406-994-3190
Department of Ecology                         email droberts at montana.edu
Montana State University
Bozeman, MT 59717-3460


More information about the grass-user mailing list