[GRASS-user] ogr2ogr and ortho/rgb display

Dylan Beaudette dylan.beaudette at gmail.com
Fri Jan 5 20:36:58 EST 2007


Hi Daniel,

On Friday 05 January 2007 16:10, Daniel Farnan wrote:
> I am struggling with two things Dylan, in GRASS, and QGIS, seperately, with
> slightly different issues.
> the data is USGS download
> In GRASS
> 1)I would like to re-project LatLong NAD 83 vector to UTM NAD 83 to work
> with a layer with Ortho images in a GRASS region.

I tend to do work like this in a 3-step process:

1. project my vector/raster data into a common projection
2. import the projected data into GRASS
3. the fun begins...

For some examples of using the GDAL tools, check this page here:
http://casoilresource.lawr.ucdavis.edu/drupal/node/98

> 2)I would like also to load UTM NAD 83 orthos to the same region for
> display+.
> I also have LL NAD 83 Landsat Data and the d.rgb, and other efforts in 6.0
> and 6.1 (working on Debian, and with Cygwin/Windows) generates a grey
> rectangle in the UTM region from landsat LL NAD83 data, and then sometimes
> nothing. Nothing visible from the UTM NAD 83 orthos with d.rgb in Debian
> 6.0 or in cygwin/windows 6.1 with HIS display mode.

Strange results. I am using Debian + GRASS-cvs for all of my work. I can't 
give any cygwin specific help, sorry. 

i would recommend creating a new GRASS location, based on the ortho photos, as 
these are already in the correct projection. You can easily do this with 
r.in.gdal ... location=new_location

This will create a new location based on the metadata encoded in the ortho 
photo: projection, extent, etc.

> I am planning to have the orthos for subregional overlays of the vector
> file, working with the DEM in new locations in both GRASS and QGIS.

be sure to project the DEM data with gdalwarp, and then import with 
r.in.gdal . Note that DEM projection requires some planning if you will be 
performing any flow-related analysis. If you are looking for a 'smooth' DEM 
then I would recommend looking into the "-rcs' parameter to gdalwarp .

> In QGIS
> The GRASS rasters (r, g, b) load and are viewable in QGIS (in greyscale)as
> will the rgb tiffs, but the vector will not overlay them once I use
> re-projection tool in QGIS. The LatLong NAD83 vector data will show in QGIS
> and overlay a landsat dataset raster and a DEM which both show LL nad83
> defs.
>
> I have not reset/remade the location, because it's bounds exceed both(all)
> the datasets in question, and I prefer to keep the projection of the
> orthophotography as is (UTM NAD83 GRS80 Meters)... though I am now thinking
> it would make sense to just GDAL Warp the Orthos.
>
> I would ideally like to combine all 4 datum for multiple locations and
> experiment a bit with NVIZ and look into POVRay possibilities to serve the
> data via HostGIS or some other way.
>

Again, things are much simpler and will probably work if all input data is 
first projected into a common coordinate system, and then imported into a 
single location/mapset. If you region is small enough, then an equal-area or 
UTM projection may be suitable. 

Good luck, and don't hesitate to ask questions on this list.

Dylan


> -----Original Message-----
> From: Dylan Beaudette [mailto:dylan.beaudette at gmail.com]
> Sent: Friday, January 05, 2007 2:37 PM
> To: grassuser at grass.itc.it
> Cc: Daniel Farnan
> Subject: Re: [GRASS-user] ogr2ogr and ortho/rgb display
>
> On Friday 05 January 2007 13:07, Daniel Farnan wrote:
> > I am having unusual difficulty getting orthos from USGS to display (d.rgb
> > red=... green=... blue=...), I had initially included the out=... but
> > that was an error which read as invalid. The files will display in QGIS
> > though
>
> -
>
> > both in full color and as the individual GRASS misc cells.
> >
> > I have the correct syntax for ogr2ogr but do not know which directory to
> > copy the file to in order for the program to perform the re-projection.
> > I have not been able to find the list for the re-projection codes (though
>
> I
>
> > looked up epsg codes in the epsg table and have been trying with that
> > designation) and have tried a variety of possible solutions, in the
> > location folder, and grassdata, which have not provided a result -
>
> searched
>
> > the grass user e-mails and wiki with no result.
> >
> > Any help appreciated - could not find this help in the book or elsewhere
> > I looked.
> > Re-direct(s) for harder to find OS GIS tutorials/manuals welcome, I have
> > most of the easier to find ones available as well as the userlist e-mails
> > and wiki url.
> >
> >  Daniel Farnan
> >  Office phone?415-284-9662
>
> Hi Daniel,
>
> ogr2ogr is used for the projection / inverse projection of vector data.
> From
>
> your message it sounds like you needs to perform projection / inverse
> projection on raster data. If this is the case you will want to use the
> program gdalwarp . Can you post some examples of what you are specifically
> trying to do ?
>
> Cheers,
>
> Dylan

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list