[GRASS-user] Creating mapset and/or importing data based on a proj4 string

Moritz Lennert mlennert at club.worldonline.be
Fri Oct 6 01:15:05 PDT 2017



Le 6 octobre 2017 09:44:41 GMT+02:00, Ken Mankoff <mankoff at gmail.com> a écrit :
>Dear List,
>
>Most of the time when I work with data in GRASS it is a provided on a
>standard GIS grid (EPSG code) and I can work with it easily. I create a
>location using the "-c" option when I start GRASS, or I import it into
>an
>existing mapset with r.import.
>
>I'm now working with data and all I know is this:
>
>+proj=stere +lat_0=90 +lat_ts=71 +lon_0=-39 +k=1 +x_0=0 +y_0=0
>+datum=WGS84
>+units=m +no_defs”
>
>In the past, when working with a few variables and this information,
>and
>lat/lon grids in the NetCDF file, I would export the data (using
>Python) to
>lat,lon,data, and then r.in.ascii and project it that way. However, now
>I'm
>working with 14,000 high resolution daily records on the above
>projection.
>
>It seems the only way to do this efficiently is to work in the
>projection
>of the data, and r.import the few other variables to this projection.
>Or
>perhaps cdo or gdal or some other 3rd party tool can quickly re-project
>everything for me to a known EPSG code. I've solved this before with
>vectors, ogr2ogr, and arbitrary proj4 strings.
>
>Can anyone here suggest how to best get this data into GRASS?

You can use either the GUI startup location creation wizard and chose proj.4 
string as way to define the projection or in any existing location use g.proj with the 'proj4'  and location' parameters.

It would probably be nice if the startup script could handle proj.4 strings. You can file an enhancement request.

Moritz


More information about the grass-user mailing list