[GRASS-user] Importing .tif

   I've not found specific information on importing *.tif rasters so I winged
it to import a LiDAR Digital Quad (LDQ) map. This is my work flow and how
grass7.5svn responded.

   0. There are 4 files for each of the LDQs: *.aux, *.tfw, *.tif, and
*.tif.xml.

   1. Looking at the file, *.tif.xml, I learned the projection is
FIPS 3601. A web page listing FIPS codes and their EPSG equivalents showed
the latter is 32126.

   2. The command, 'grass75 -c EPSG:32126' created a new location.

   3. r.in.gdal in=$HOME/projects/oregon/estacada-rock/data/topography/estacada-45122c3/2009_OLC_Hood-to-Coast/45122c3302.tif out=ldq
ERROR: Projection of dataset does not appear to match current location.

        Dataset PROJ_INFO is:
        name: NAD83(HARN) / Oregon North
        datum: nad83harn
        ellps: grs80
        proj: lcc
        lat_1: 46
        lat_2: 44.33333333333334
        lat_0: 43.66666666666666
        lon_0: -120.5
        x_0: 2500000
        y_0: 0
        towgs84: 0,0,0,0,0,0,0
        no_defs: defined

        ERROR: proj

   This is my first question: Since the .xml file showed the projection as
FIPS 3601, and the equivalent EPSG code is 32126 is used to create the
location, why does grass75 see a mis-match?

   4. r.in.gdal -o in=$HOME/projects/oregon/estacada-rock/data/topography/estacada-45122c3/2009_OLC_Hood-to-Coast/45122c3302.tif out=ldq
Over-riding projection check
Importing 3 raster bands...
Importing raster map <ldq.red>...
  100%
Importing raster map <ldq.green>...
  100%
Importing raster map <ldq.blue>...
  100%

   This is my second question: While I can display each map in the monitor,
they all look the same. Displaying one after the other produces no change in
appearance. So, have I correctly imported the LDQ and do the different color
bands matter?

   This LDQ is produced by the intensity of returns of the highest hits in
the area of coverage. It looks like a low resolution black-and-white aerial
photograph while generated from 1.5' (45cm) horizontal resolution LiDAR
scans (see attached screenshot.png). Really helpful in correlating specific
project areas to the elevation map and other features.

Carpe weekend,

Rich

(attachments)

screenshot.png

On Fri, 13 Jul 2018, Rich Shepard wrote:

2. The command, 'grass75 -c EPSG:32126' created a new location.

   However, I cannot re-project these raster maps because there's no
projection information in that location:

$ ls EPSG\:32126/PERMANENT/
CURGROUP MYNAME WIND cell/ cellhd/ group/ sqlite/
DEFAULT_WIND VAR cats/ cell_misc/ colr/ hist/

   What might be the reason for this?

Rich

> This is my first question

as already mentioned in other threads, gdalinfo your.tif should always be
your first step.

ias GRASS is based upon GDAL, the gdalinfo oztput is needed to understand
how GDAL sees the tif raster data.

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

Rich, I downloaded a sample LDQ file: 'LDQ-43120C4.zip'.

Some '.tif' files are inside the subdirectory 'Intensity'. GDAL says for
one of them:

gdalinfo int_43120C4404.tif -proj4 -nomd

Driver: GTiff/GeoTIFF
Files: int_43120C4404.tif
       int_43120C4404.tif.ovr
       int_43120C4404.tif.aux.xml
Size is 865, 1739
Coordinate System is:
PROJCS["NAD_1983_CORS96_UTM_Zone_10N",
    GEOGCS["GCS_NAD_1983_CORS96",
        DATUM["NAD_1983_CORS96",
            SPHEROID["GRS_1980",6378137,298.257222101]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-123],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
PROJ.4 string is:
'+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs '
Origin = (711475.000000000000000,4798302.500000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Corner Coordinates:
Upper Left  (  711475.000, 4798302.500) (120d23'32.93"W, 43d18'28.22"N)
Lower Left  (  711475.000, 4797433.000) (120d23'34.13"W, 43d18' 0.06"N)
Upper Right (  711907.500, 4798302.500) (120d23'13.75"W, 43d18'27.78"N)
Lower Right (  711907.500, 4797433.000) (120d23'14.96"W, 43d17'59.62"N)
Center      (  711691.250, 4797867.750) (120d23'23.94"W, 43d18'13.92"N)
Band 1 Block=128x128 Type=Byte, ColorInterp=Gray
  Min=15.000 Max=223.000
  Minimum=15.000, Maximum=223.000, Mean=111.348, StdDev=14.186
  NoData Value=0
  Overviews: 433x870, 217x435

Indeed, using this file's geo-metadata to create a new GRASS location,
ends up in `r.in.gdal` complaining while performing the projection
check.

Perhaps the geo-metadata in these .tif files are not a good match for
GRASS GIS (and its mechanism to detect reference systems).

The 'Shapefiles' directory contains various ancillary vector maps. One
such map is 'OLC_1-100th_Quadrangle_Index.shp' whose corresponding .prj
file content is:

PROJCS["NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",8202099.737532808],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-120.5],PARAMETER["Standard_Parallel_1",44.33333333333334],PARAMETER["Standard_Parallel_2",46.0],PARAMETER["Latitude_Of_Origin",43.66666666666666],UNIT["Foot",0.3048]]

The file 'OLC_EASTERN_OR_TIR_2012_0_75_UTM.prj', however, appears to be
a match for the .tif file (?).

PROJCS["NAD_1983_CORS96_UTM_Zone_10N",GEOGCS["GCS_NAD_1983_CORS96",DATUM["D_NAD_1983_CORS96",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-123.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

I used this vector map as a source, created a new Location/Mapset,
imported one '.tif' file without problems. The "FIPS 3601" is not the
correct one to use for the '.tif' files, in this example LDQ I
downloaded.

Hope the above is useful for you too.

Nikos

* Rich Shepard <rshepard@appl-ecosys.com> [2018-07-13 15:47:34 -0700]:

I've not found specific information on importing *.tif rasters so I winged
it to import a LiDAR Digital Quad (LDQ) map. This is my work flow and how
grass7.5svn responded.

0. There are 4 files for each of the LDQs: *.aux, *.tfw, *.tif, and
*.tif.xml.

1. Looking at the file, *.tif.xml, I learned the projection is
FIPS 3601. A web page listing FIPS codes and their EPSG equivalents showed
the latter is 32126.

2. The command, 'grass75 -c EPSG:32126' created a new location.

3. r.in.gdal in=$HOME/projects/oregon/estacada-rock/data/topography/estacada-45122c3/2009_OLC_Hood-to-Coast/45122c3302.tif out=ldq
ERROR: Projection of dataset does not appear to match current location.

      Dataset PROJ_INFO is:
      name: NAD83(HARN) / Oregon North
      datum: nad83harn
      ellps: grs80
      proj: lcc
      lat_1: 46
      lat_2: 44.33333333333334
      lat_0: 43.66666666666666
      lon_0: -120.5
      x_0: 2500000
      y_0: 0
      towgs84: 0,0,0,0,0,0,0
      no_defs: defined

      ERROR: proj

This is my first question: Since the .xml file showed the projection as
FIPS 3601, and the equivalent EPSG code is 32126 is used to create the
location, why does grass75 see a mis-match?

4. r.in.gdal -o in=$HOME/projects/oregon/estacada-rock/data/topography/estacada-45122c3/2009_OLC_Hood-to-Coast/45122c3302.tif out=ldq
Over-riding projection check
Importing 3 raster bands...
Importing raster map <ldq.red>...
100%
Importing raster map <ldq.green>...
100%
Importing raster map <ldq.blue>...
100%

This is my second question: While I can display each map in the monitor,
they all look the same. Displaying one after the other produces no change in
appearance. So, have I correctly imported the LDQ and do the different color
bands matter?

This LDQ is produced by the intensity of returns of the highest hits in
the area of coverage. It looks like a low resolution black-and-white aerial
photograph while generated from 1.5' (45cm) horizontal resolution LiDAR
scans (see attached screenshot.png). Really helpful in correlating specific
project areas to the elevation map and other features.

Carpe weekend,

Rich

gdalinfo int_43120C4404.tif -proj4 -nomd

Driver: GTiff/GeoTIFF
Files: int_43120C4404.tif
      int_43120C4404.tif.ovr
      int_43120C4404.tif.aux.xml
Size is 865, 1739
Coordinate System is:
PROJCS["NAD_1983_CORS96_UTM_Zone_10N",
   GEOGCS["GCS_NAD_1983_CORS96",
       DATUM["NAD_1983_CORS96",
           SPHEROID["GRS_1980",6378137,298.257222101]],
       PRIMEM["Greenwich",0],
       UNIT["degree",0.0174532925199433]],
   PROJECTION["Transverse_Mercator"],
   PARAMETER["latitude_of_origin",0],
   PARAMETER["central_meridian",-123],
   PARAMETER["scale_factor",0.9996],
   PARAMETER["false_easting",500000],
   PARAMETER["false_northing",0],
   UNIT["metre",1,
       AUTHORITY["EPSG","9001"]]]
PROJ.4 string is:
'+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs '
Origin = (711475.000000000000000,4798302.500000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Corner Coordinates:
Upper Left ( 711475.000, 4798302.500) (120d23'32.93"W, 43d18'28.22"N)
Lower Left ( 711475.000, 4797433.000) (120d23'34.13"W, 43d18' 0.06"N)
Upper Right ( 711907.500, 4798302.500) (120d23'13.75"W, 43d18'27.78"N)
Lower Right ( 711907.500, 4797433.000) (120d23'14.96"W, 43d17'59.62"N)
Center ( 711691.250, 4797867.750) (120d23'23.94"W, 43d18'13.92"N)
Band 1 Block=128x128 Type=Byte, ColorInterp=Gray
Min=15.000 Max=223.000
Minimum=15.000, Maximum=223.000, Mean=111.348, StdDev=14.186
NoData Value=0
Overviews: 433x870, 217x435

steps here

(1) create location by georeferenced file int_43120C4404.tif

(2)
r.in.gdal input=D:\temp\LDQ-43120C4\2012_OLC_Eastern OR
TIR\Intensity\int_43120C4404.tif output=fdgdfgf
WARNING: Datum <NAD_1983_CORS96> not recognised by GRASS and no parameters
found
Importing raster map <fdgdfgf>...

the datum isn't recognized, but raster imported

see

https://epsg.io/6782
https://epsg.io/6781

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

* Helmut Kudrnovsky <hellik@web.de> [2018-07-14 00:59:52 -0700]:

gdalinfo int_43120C4404.tif -proj4 -nomd

Driver: GTiff/GeoTIFF
Files: int_43120C4404.tif
      int_43120C4404.tif.ovr
      int_43120C4404.tif.aux.xml
Size is 865, 1739
Coordinate System is:
PROJCS["NAD_1983_CORS96_UTM_Zone_10N",
   GEOGCS["GCS_NAD_1983_CORS96",
       DATUM["NAD_1983_CORS96",
           SPHEROID["GRS_1980",6378137,298.257222101]],
       PRIMEM["Greenwich",0],
       UNIT["degree",0.0174532925199433]],
   PROJECTION["Transverse_Mercator"],
   PARAMETER["latitude_of_origin",0],
   PARAMETER["central_meridian",-123],
   PARAMETER["scale_factor",0.9996],
   PARAMETER["false_easting",500000],
   PARAMETER["false_northing",0],
   UNIT["metre",1,
       AUTHORITY["EPSG","9001"]]]
PROJ.4 string is:
'+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs '
Origin = (711475.000000000000000,4798302.500000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Corner Coordinates:
Upper Left ( 711475.000, 4798302.500) (120d23'32.93"W, 43d18'28.22"N)
Lower Left ( 711475.000, 4797433.000) (120d23'34.13"W, 43d18' 0.06"N)
Upper Right ( 711907.500, 4798302.500) (120d23'13.75"W, 43d18'27.78"N)
Lower Right ( 711907.500, 4797433.000) (120d23'14.96"W, 43d17'59.62"N)
Center ( 711691.250, 4797867.750) (120d23'23.94"W, 43d18'13.92"N)
Band 1 Block=128x128 Type=Byte, ColorInterp=Gray
Min=15.000 Max=223.000
Minimum=15.000, Maximum=223.000, Mean=111.348, StdDev=14.186
NoData Value=0
Overviews: 433x870, 217x435

steps here

(1) create location by georeferenced file int_43120C4404.tif

(2)
r.in.gdal input=D:\temp\LDQ-43120C4\2012_OLC_Eastern OR
TIR\Intensity\int_43120C4404.tif output=fdgdfgf
WARNING: Datum <NAD_1983_CORS96> not recognised by GRASS and no parameters
found
Importing raster map <fdgdfgf>...

the datum isn't recognized, but raster imported

see

https://epsg.io/6782
https://epsg.io/6781

Helmut,

I did that before too. Did you also note that it takes "too much" time to
create the Location using the '.tif' file?

As well, trying a few things further, I have seen similar problems such
as the ones Rich mentions (trying to reproject, etc.).

This is why I ended up in using the Shapefile as a source.

Nikos

I did that before too. Did you also note that it takes "too much" >time to
create the Location using the '.tif' file?

it didn't take a long time to create the location.

Loaded it also in qgis 2.18.x and 3.3.x, always interpreted in another way.

It seems these srs aren't well covered by the underlying GDAL and EPSG.

Any ideas?

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

On Sat, Jul 14, 2018 at 1:19 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

I did that before too. Did you also note that it takes “too much” >time to
create the Location using the ‘.tif’ file?

it didn’t take a long time to create the location.

Loaded it also in qgis 2.18.x and 3.3.x, always interpreted in another way.

It seems these srs aren’t well covered by the underlying GDAL and EPSG.

Warnings like “Datum <NAD_1983_CORS96> not recognised by GRASS and no parameters found” are generally harmless. These descriptions are not always standardized, depending on how they were created. It is up to the user to decide if additional parameters are needed.

Generally the safest method to create a new location for georeferenced data is to use these data directly, unless there is good reason to assume that the SRS info as returned by gdalinfo / ogrinfo is wrong.

Markus M

Any ideas?


best regards
Helmut

Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Sat, 14 Jul 2018, Nikos Alexandris wrote:

gdalinfo int_43120C4404.tif -proj4 -nomd

Nilos/Helmut:

   For some reason I looked at the .xml file rather than running gdalinfo on
the 100th/quad .tif file. Creating a new location with that proj.4 string
allowed me to import the DLQ, but ... I still needed to use the '-o'
projection override. IIRC, the proj.4 string units are feet, but the image
itself is apparently in meters. Well, it's ESRI software and as long as it
imports I'm happy.

   The new imported raster map reprojected to the project location, so the
remaining question (which may not have an answer) is why three separate
color bands are imported (RGB)? The display is monochrome and all three
separate images *.red, *.green, and *.blue look the same on the monitor. Can
I display this DLQ in color? (I think the last time I used aerial
photographs or satellite imagery was with grass-4.1 or -5.x.)

Rich

On Mon, Jul 16, 2018 at 5:04 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Sat, 14 Jul 2018, Nikos Alexandris wrote:

gdalinfo int_43120C4404.tif -proj4 -nomd

Nilos/Helmut:

For some reason I looked at the .xml file rather than running gdalinfo on
the 100th/quad .tif file. Creating a new location with that proj.4 string
allowed me to import the DLQ, but … I still needed to use the ‘-o’

projection override.

If you use the -o flag, you are potentially corrupting the data. The safest is to create a new location directly from the data to be imported, unless there is a good reason to assume that the srs info in the data as reported by gdalinfo is wrong.

IIRC, the proj.4 string units are feet, but the image
itself is apparently in meters. Well, it’s ESRI software and as long as it

imports I’m happy.

It does not import, unless the -o flag is used. That means the srs of the location and of the data to be imported do not match.

The new imported raster map reprojected to the project location, so the
remaining question (which may not have an answer) is why three separate
color bands are imported (RGB)? The display is monochrome and all three
separate images *.red, *.green, and *.blue look the same on the monitor. Can
I display this DLQ in color? (I think the last time I used aerial

photographs or satellite imagery was with grass-4.1 or -5.x.)

Try d.rgb

Markus M

Rich


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, 16 Jul 2018, Markus Metz wrote:

If you use the -o flag, you are potentially corrupting the data. The
safest is to create a new location directly from the data to be imported,
unless there is a good reason to assume that the srs info in the data as
reported by gdalinfo is wrong.

Markus,

   I understand this. However, when I use the proj.4 string returned by
'gdalinfo -proj4' I am shown two different projections. I want to learn how
to do this correctly. Here's an example:

$ gdalinfo 45122c3307.tif -proj4 -nomd
Driver: GTiff/GeoTIFF
Files: 45122c3307.tif
        45122c3307.aux
Size is 2215, 3088
Coordinate System is:
PROJCS["NAD83(HARN) / Oregon North",
     GEOGCS["NAD83(HARN)",
         DATUM["NAD83_High_Accuracy_Reference_Network",
             SPHEROID["GRS 1980",6378137,298.257222101,
                 AUTHORITY["EPSG","7019"]],
             TOWGS84[0,0,0,0,0,0,0],
             AUTHORITY["EPSG","6152"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.0174532925199433,
             AUTHORITY["EPSG","9122"]],
         AUTHORITY["EPSG","4152"]],
     PROJECTION["Lambert_Conformal_Conic_2SP"],
     PARAMETER["standard_parallel_1",46],
     PARAMETER["standard_parallel_2",44.33333333333334],
     PARAMETER["latitude_of_origin",43.66666666666666],
     PARAMETER["central_meridian",-120.5],
     PARAMETER["false_easting",8202099.737532808],
     PARAMETER["false_northing",0],
     UNIT["international_feet",0.3048],
     AXIS["X",EAST],
     AXIS["Y",NORTH]]
PROJ.4 string is:
'+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs '
Origin = (7722808.500000000000000,600993.000000000000000)
Pixel Size = (1.500000000000000,-1.500000000000000)
Corner Coordinates:
Upper Left ( 7722808.500, 600993.000) (122d21'46.47"W, 45d17'59.99"N)
Lower Left ( 7722808.500, 596361.000) (122d21'44.98"W, 45d17'14.27"N)
Upper Right ( 7726131.000, 600993.000) (122d21' 0.00"W, 45d18' 0.75"N)
Lower Right ( 7726131.000, 596361.000) (122d20'58.51"W, 45d17'15.02"N)
Center ( 7724469.750, 598677.000) (122d21'22.49"W, 45d17'37.51"N)
Band 1 Block=2215x1 Type=Byte, ColorInterp=Red
   Description = Band_1

Band 2 Block=2215x1 Type=Byte, ColorInterp=Green
   Description = Band_2

Band 3 Block=2215x1 Type=Byte, ColorInterp=Blue
   Description = Band_3

#------------
$ grass75 -gtext
# defind new location, LDQ, using above proj.4 string. Start grass and run:
r.in.gdal in=$HOME/path/to/data/45122c3307.tif out=south_area
ERROR: Projection of dataset does not appear to match current location.

        Location PROJ_INFO is:
        name: unnamed
        ellps: grs80
        proj: lcc
        lat_1: 46
        lat_2: 44.33333333333334
        lat_0: 43.66666666666666
        lon_0: -120.5
        x_0: 2500000
        y_0: 0
        towgs84: 0,0,0,0,0,0,0
        no_defs: defined

        Dataset PROJ_INFO is:
        name: NAD83(HARN) / Oregon North
        datum: nad83harn
        ellps: grs80
        proj: lcc
        lat_1: 46
        lat_2: 44.33333333333334
        lat_0: 43.66666666666666
        lon_0: -120.5
        x_0: 2500000
        y_0: 0
        towgs84: 0,0,0,0,0,0,0
        no_defs: defined

        ERROR: datum

        In case of no significant differences in the projection definitions,
        use the -o flag to ignore them and use current location definition.
        Consider generating a new location from the input dataset using the
        'location' parameter.

Can I display this DLQ in color? (I think the last time I used aerial
photographs or satellite imagery was with grass-4.1 or -5.x.)

Try d.rgb

   Okay. Thanks.

Rich

On Mon, 16 Jul 2018, Rich Shepard wrote:

      Location PROJ_INFO is:
      name: unnamed
      ellps: grs80
      proj: lcc

      Dataset PROJ_INFO is:
      name: NAD83(HARN) / Oregon North
      datum: nad83harn
      ellps: grs80
      proj: lcc

   It appears that gdalinfo does not provide the datum (also used for name)
when it returns the PROJ.4 string. Is there anything I can do about this?

Rich

On Mon, Jul 16, 2018 at 6:50 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Mon, 16 Jul 2018, Markus Metz wrote:

If you use the -o flag, you are potentially corrupting the data. The
safest is to create a new location directly from the data to be imported,
unless there is a good reason to assume that the srs info in the data as
reported by gdalinfo is wrong.

Markus,

I understand this. However, when I use the proj.4 string returned by
‘gdalinfo -proj4’ I am shown two different projections. I want to learn how

to do this correctly.

The proj4 string can not contain all the information present in WKT. As I mentioned before, the safest is to create a new location directly from the data to be imported, unless there is a good reason to assume that the srs info in the data as reported by gdalinfo is wrong.

Markus M

Here’s an example:

$ gdalinfo 45122c3307.tif -proj4 -nomd
Driver: GTiff/GeoTIFF
Files: 45122c3307.tif
45122c3307.aux
Size is 2215, 3088
Coordinate System is:
PROJCS[“NAD83(HARN) / Oregon North”,
GEOGCS[“NAD83(HARN)”,
DATUM[“NAD83_High_Accuracy_Reference_Network”,
SPHEROID[“GRS 1980”,6378137,298.257222101,
AUTHORITY[“EPSG”,“7019”]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY[“EPSG”,“6152”]],
PRIMEM[“Greenwich”,0,
AUTHORITY[“EPSG”,“8901”]],
UNIT[“degree”,0.0174532925199433,
AUTHORITY[“EPSG”,“9122”]],
AUTHORITY[“EPSG”,“4152”]],
PROJECTION[“Lambert_Conformal_Conic_2SP”],
PARAMETER[“standard_parallel_1”,46],
PARAMETER[“standard_parallel_2”,44.33333333333334],
PARAMETER[“latitude_of_origin”,43.66666666666666],
PARAMETER[“central_meridian”,-120.5],
PARAMETER[“false_easting”,8202099.737532808],
PARAMETER[“false_northing”,0],
UNIT[“international_feet”,0.3048],
AXIS[“X”,EAST],
AXIS[“Y”,NORTH]]
PROJ.4 string is:
‘+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft +no_defs ’
Origin = (7722808.500000000000000,600993.000000000000000)
Pixel Size = (1.500000000000000,-1.500000000000000)
Corner Coordinates:
Upper Left ( 7722808.500, 600993.000) (122d21’46.47"W, 45d17’59.99"N)
Lower Left ( 7722808.500, 596361.000) (122d21’44.98"W, 45d17’14.27"N)
Upper Right ( 7726131.000, 600993.000) (122d21’ 0.00"W, 45d18’ 0.75"N)
Lower Right ( 7726131.000, 596361.000) (122d20’58.51"W, 45d17’15.02"N)
Center ( 7724469.750, 598677.000) (122d21’22.49"W, 45d17’37.51"N)
Band 1 Block=2215x1 Type=Byte, ColorInterp=Red
Description = Band_1

Band 2 Block=2215x1 Type=Byte, ColorInterp=Green
Description = Band_2

Band 3 Block=2215x1 Type=Byte, ColorInterp=Blue
Description = Band_3

#------------
$ grass75 -gtext

defind new location, LDQ, using above proj.4 string. Start grass and run:

r.in.gdal in=$HOME/path/to/data/45122c3307.tif out=south_area
ERROR: Projection of dataset does not appear to match current location.

Location PROJ_INFO is:
name: unnamed
ellps: grs80
proj: lcc
lat_1: 46
lat_2: 44.33333333333334
lat_0: 43.66666666666666
lon_0: -120.5
x_0: 2500000
y_0: 0
towgs84: 0,0,0,0,0,0,0
no_defs: defined

Dataset PROJ_INFO is:
name: NAD83(HARN) / Oregon North
datum: nad83harn
ellps: grs80
proj: lcc
lat_1: 46
lat_2: 44.33333333333334
lat_0: 43.66666666666666
lon_0: -120.5
x_0: 2500000
y_0: 0
towgs84: 0,0,0,0,0,0,0
no_defs: defined

ERROR: datum

In case of no significant differences in the projection definitions,
use the -o flag to ignore them and use current location definition.
Consider generating a new location from the input dataset using the
‘location’ parameter.

Can I display this DLQ in color? (I think the last time I used aerial
photographs or satellite imagery was with grass-4.1 or -5.x.)

Try d.rgb

Okay. Thanks.

Rich


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, 16 Jul 2018, Markus Metz wrote:

The proj4 string can not contain all the information present in WKT. As I
mentioned before, the safest is to create a new location directly from the
data to be imported, unless there is a good reason to assume that the srs
info in the data as reported by gdalinfo is wrong.

Markus,

   If I don't use the proj4 string provided by gdalinfo how do I create a new
location directly from the data to be imported? In the case of these DLQs
there are four files, e.g.: *.aux, *.tfw, *.tif, and *.tif.xml.

   Do I type, 'r.in.gdal -c new_loc/PERMANENT' then start grass with 'grass75
new_loc/PERMANENT' and run 'r.in.gdal in=/path/to/filename.tif
out=new_map'?

Thanks,

Rich

Rich,

The manual [1] gives the following examples. Did you try that?

**grass74 -c EPSG:5514:3 $HOME/grassdata/mylocation**
Creates new GRASS location with EPSG code 5514 (S-JTSK / Krovak East North - SJTSK) with datum transformation parameters used in Czech Republic in the specified GISDBASE
**grass74 -c myvector.shp $HOME/grassdata/mylocation**
Creates new GRASS location based on georeferenced Shapefile
**grass74 -c myraster.tif $HOME/grassdata/mylocation**
Creates new GRASS location based on georeferenced GeoTIFF file

I think the last example is the one you want

Cheers
Daniel

[1] https://grass.osgeo.org/grass74/manuals/grass7.html

On Mon, Jul 16, 2018 at 3:38 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Mon, 16 Jul 2018, Markus Metz wrote:

The proj4 string can not contain all the information present in WKT. As I
mentioned before, the safest is to create a new location directly from the
data to be imported, unless there is a good reason to assume that the srs
info in the data as reported by gdalinfo is wrong.

Markus,

If I don’t use the proj4 string provided by gdalinfo how do I create a new
location directly from the data to be imported? In the case of these DLQs
there are four files, e.g.: *.aux, *.tfw, *.tif, and *.tif.xml.

Do I type, ‘r.in.gdal -c new_loc/PERMANENT’ then start grass with ‘grass75
new_loc/PERMANENT’ and run ‘r.in.gdal in=/path/to/filename.tif
out=new_map’?

Thanks,

Rich


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, Jul 16, 2018 at 9:14 PM, Daniel Victoria <daniel.victoria@gmail.com> wrote:

Rich,

The manual [1] gives the following examples. Did you try that?

grass74 -c EPSG:5514:3 $HOME/grassdata/mylocation Creates new GRASS location with EPSG code 5514 (S-JTSK / Krovak East North - SJTSK) with datum transformation parameters used in Czech Republic in the specified GISDBASE
grass74 -c myvector.shp $HOME/grassdata/mylocation Creates new GRASS location based on georeferenced Shapefile
grass74 -c myraster.tif $HOME/grassdata/mylocation Creates new GRASS location based on georeferenced GeoTIFF file

I think the last example is the one you want

some more options, as mentioned before

  • the location wizard using this georeferenced data file

  • from within GRASS ‘g.proj georef= location=’

  • from with GRASS r.in.gdal input= location=

for a GeoTIFF, the geofile would be the *.tif file

Markus M

Cheers
Daniel

[1] https://grass.osgeo.org/grass74/manuals/grass7.html

On Mon, Jul 16, 2018 at 3:38 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Mon, 16 Jul 2018, Markus Metz wrote:

The proj4 string can not contain all the information present in WKT. As I
mentioned before, the safest is to create a new location directly from the
data to be imported, unless there is a good reason to assume that the srs
info in the data as reported by gdalinfo is wrong.

Markus,

If I don’t use the proj4 string provided by gdalinfo how do I create a new
location directly from the data to be imported? In the case of these DLQs
there are four files, e.g.: *.aux, *.tfw, *.tif, and *.tif.xml.

Do I type, ‘r.in.gdal -c new_loc/PERMANENT’ then start grass with ‘grass75
new_loc/PERMANENT’ and run ‘r.in.gdal in=/path/to/filename.tif
out=new_map’?

Thanks,

Rich


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Mon, 16 Jul 2018, Daniel Victoria wrote:

The manual [1] gives the following examples. Did you try that?

*grass74 -c EPSG:5514:3 $HOME/grassdata/mylocation* Creates new GRASS

Daniel,

   I've used the '-c EPSG:....' option before. The issue with the DLQs is
what EPSG code to use. Markus M pointed out that the ones shown by gdalinfo
refer to aspects of the SRS, not the entire projection. That's why I used
the proj.4 string, apparently under the mis-impression that it provides
location projection information for importing raster files.

Rich

Rich,

I copied 3 examples from the man page. The last one was:

grass74 -c myraster.tif $HOME/grassdata/mylocation

That’s probably what you are looking for.

On Mon, Jul 16, 2018 at 4:52 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Mon, 16 Jul 2018, Daniel Victoria wrote:

The manual [1] gives the following examples. Did you try that?

grass74 -c EPSG:5514:3 $HOME/grassdata/mylocation Creates new GRASS

Daniel,

I’ve used the ‘-c EPSG:…’ option before. The issue with the DLQs is
what EPSG code to use. Markus M pointed out that the ones shown by gdalinfo
refer to aspects of the SRS, not the entire projection. That’s why I used
the proj.4 string, apparently under the mis-impression that it provides
location projection information for importing raster files.

Rich


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

* Rich Shepard <rshepard@appl-ecosys.com> [2018-07-16 08:04:59 -0700]:

On Sat, 14 Jul 2018, Nikos Alexandris wrote:

gdalinfo int_43120C4404.tif -proj4 -nomd

Nilos/Helmut:

For some reason I looked at the .xml file rather than running gdalinfo on
the 100th/quad .tif file. Creating a new location with that proj.4 string
allowed me to import the DLQ, but ... I still needed to use the '-o'
projection override. IIRC, the proj.4 string units are feet, but the image
itself is apparently in meters. Well, it's ESRI software and as long as it
imports I'm happy.

The new imported raster map reprojected to the project location, so the
remaining question (which may not have an answer) is why three separate
color bands are imported (RGB)? The display is monochrome and all three
separate images *.red, *.green, and *.blue look the same on the monitor. Can
I display this DLQ in color? (I think the last time I used aerial
photographs or satellite imagery was with grass-4.1 or -5.x.)

Rich

I also think there might be something special to these images.
From another example file, LDQ-42124C2:

gdalinfo intensity_42124C2_1.tif -norat -nomd
..
Band 1 Block=64x64 Type=Byte, ColorInterp=Gray
  Description = Band_1
  Min=5.000 Max=255.000
  Minimum=5.000, Maximum=255.000, Mean=150.269, StdDev=39.671
  NoData Value=0
  Overviews: 583x908, 292x454, 146x227, 73x114, 37x57
Band 2 Block=64x64 Type=Byte, ColorInterp=Undefined
  Description = Band_2
  Min=5.000 Max=255.000
  Minimum=5.000, Maximum=255.000, Mean=150.269, StdDev=39.671
  NoData Value=0
  Overviews: 583x908, 292x454, 146x227, 73x114, 37x57
Band 3 Block=64x64 Type=Byte, ColorInterp=Undefined
  Description = Band_3
  Min=5.000 Max=255.000
  Minimum=5.000, Maximum=255.000, Mean=150.269, StdDev=39.671
  NoData Value=0
  Overviews: 583x908, 292x454, 146x227, 73x114, 37x57

Is it "ok" to have identical stats for all layers?

Nikos

On Mon, Jul 16, 2018 at 9:51 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Mon, 16 Jul 2018, Daniel Victoria wrote:

The manual [1] gives the following examples. Did you try that?

grass74 -c EPSG:5514:3 $HOME/grassdata/mylocation Creates new GRASS

Daniel,

I’ve used the ‘-c EPSG:…’ option before. The issue with the DLQs is
what EPSG code to use. Markus M pointed out that the ones shown by gdalinfo
refer to aspects of the SRS, not the entire projection. That’s why I used
the proj.4 string, apparently under the mis-impression that it provides
location projection information for importing raster files.

The proj4 string can provide all the information needed, but sometimes some additional information is only contained in the WKT version of the SRS. Please use the datasource directly to create a new location.

Markus M