[GRASS-user] Setting Initial Projection/Bounds

   I keep tripping over new issues. If there's a doc discussing this, please
point me to it and I'll go read it.

   My Nevada data come from a variety of different sources and have different
projections (Alberts Conical Equal Area [aea] and Long/Lat [ll], if not
more) and coverage boundaries. This for both vector and raster data.

   I want to put all these in a GRASS state data location and PERMANENT
mapset. Once all data are in I can re-project and change regions as
necessary.

   Importing the state and county boundaries I set the bounds by long/lat (in
decimal degrees) and grass took the aea projection information from the .e00
file. When I tried to import hydrologic unit boundaries from the National
Hydrologic Database, v.in.ogr on a .shp file and using the -o option to
override the defaults, failed becaue the projection of these data are
lat/long.

   Is the appropriate response for me to set up a suite of locations, one per
projection, to initially import all data and then reproject them into a
common location? Or is there a more appropriate way to get all the disparate
data into grass?

TIA,

Rich

ogr2ogr

may help.

if you have raster data

gdalwarp

should do the trick

these are scriptable.

On Feb 25, 2011, at 3:26 PM, Rich Shepard wrote:

I keep tripping over new issues. If there's a doc discussing this, please
point me to it and I'll go read it.

My Nevada data come from a variety of different sources and have different
projections (Alberts Conical Equal Area [aea] and Long/Lat [ll], if not
more) and coverage boundaries. This for both vector and raster data.

I want to put all these in a GRASS state data location and PERMANENT
mapset. Once all data are in I can re-project and change regions as
necessary.

Importing the state and county boundaries I set the bounds by long/lat (in
decimal degrees) and grass took the aea projection information from the .e00
file. When I tried to import hydrologic unit boundaries from the National
Hydrologic Database, v.in.ogr on a .shp file and using the -o option to
override the defaults, failed becaue the projection of these data are
lat/long.

Is the appropriate response for me to set up a suite of locations, one per
projection, to initially import all data and then reproject them into a
common location? Or is there a more appropriate way to get all the disparate
data into grass?

TIA,

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Rich wrote:

  Is the appropriate response for me to set up a suite of locations,
one per projection, to initially import all data and then reproject
them into a common location?

yes, but r.in.gdal and v.in.ogr have options to automatically create new
locations for you from the geodata file, so it isn't so much work as it
seems. after that use r.proj or v.proj to pull data into your location
containing the target projection.

Or is there a more appropriate way to get all the disparate data into
grass?

another way is to use GDAL/OGR tools to reproject the data before loading
into GRASS. I wouldn't say that is either better or worse, depends on your
data and your needs.

Hamish

Rich Shepard wrote:

   I keep tripping over new issues. If there's a doc discussing this, please
point me to it and I'll go read it.

   My Nevada data come from a variety of different sources and have different
projections (Alberts Conical Equal Area [aea] and Long/Lat [ll], if not
more) and coverage boundaries. This for both vector and raster data.

   I want to put all these in a GRASS state data location and PERMANENT
mapset. Once all data are in I can re-project and change regions as
necessary.

   Importing the state and county boundaries I set the bounds by long/lat (in
decimal degrees) and grass took the aea projection information from the .e00
file. When I tried to import hydrologic unit boundaries from the National
Hydrologic Database, v.in.ogr on a .shp file and using the -o option to
override the defaults, failed becaue the projection of these data are
lat/long.

   Is the appropriate response for me to set up a suite of locations, one per
projection, to initially import all data and then reproject them into a
common location? Or is there a more appropriate way to get all the disparate
data into grass?

Each location has a single projection. If you have data in multiple
projections, you need to either re-project outside of GRASS (with e.g.
gdalwarp) first, or create one location per projection.

Also, the region bounds must be in the coordinate system used by the
data. If you have lat-lon data, the bounds must be in lat-lon degrees.
If you have AEA data, the bounds must be given in the AEA coordinate
system.

If the data has georeferencing information, the easiest solution is to
use "r.in.gdal -c ... location=..."; this will import the data into a
new location with the correct projection and bounds.

From there, you can use r.proj to reproject data to the working

location.

--
Glynn Clements <glynn@gclements.plus.com>