<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true">
    <br>
    <div class="moz-cite-prefix">On 03/07/2020 12:33, 李泽浩 wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEP1KrS0OC1kQ9X3LqqDJ-Lbrs1Dn-GhQm4bDt1SxPv+dW83pw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Thanks for your advice! But I fail to run the "
        grass -c
        " code in the GRASS console. Is it should be run elsewhere?</div>
    </blockquote>
    <p><br>
    </p>
    <p>(Keeping the thread on the list)</p>
    <p><br>
    </p>
    <p>Sorry, you need to run the grass -c command *outside of grass*,
      at the regular command prompt (OSGeo2W shell if you installed from
      OSGeo4W)</p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAEP1KrS0OC1kQ9X3LqqDJ-Lbrs1Dn-GhQm4bDt1SxPv+dW83pw@mail.gmail.com"><br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">Micha Silver <<a
            href="mailto:tsvibar@gmail.com" moz-do-not-send="true">tsvibar@gmail.com</a>>
          于2020年7月3日周五 下午5:07写道:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div> <br>
            <div>On 03/07/2020 11:53, 李泽浩 wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hi Micha,
                <div><br>
                </div>
                <div>Thanks for your reply! Here is the output from <b>gdalinfo</b>: </div>
                <div>This DEM is projected from WGS84 to CGCS 2000 in
                  ArcMap first and then imported in GRASS.</div>
                <div><br>
                </div>
                <div><font face="times new roman, serif">gdalinfo
                    C:\Users\zhangtong\Desktop\Zehao_DEM.tif            
                                      <br>
                    Driver: GTiff/GeoTIFF<br>
                    Files: C:\Users\zhangtong\Desktop\Zehao_DEM.tif<br>
                    Size is 3353, 1748<br>
                    Coordinate System is:<br>
                    PROJCS["CGCS2000_3_Degree_GK_CM_120E",<br>
                       
                    GEOGCS["GCS_China_Geodetic_Coordinate_System_2000",<br>
                            DATUM["China_2000",<br>
                               
                    SPHEROID["CGCS2000",6378137,298.257222101]],<br>
                            PRIMEM["Greenwich",0],<br>
                            UNIT["degree",0.0174532925199433]],<br>
                        PROJECTION["Transverse_Mercator"],<br>
                        PARAMETER["latitude_of_origin",0],<br>
                        PARAMETER["central_meridian",120],<br>
                        PARAMETER["scale_factor",1],<br>
                        PARAMETER["false_easting",500000],<br>
                        PARAMETER["false_northing",0],<br>
                        UNIT["metre",1,<br>
                            AUTHORITY["EPSG","9001"]]]<br>
                    Origin = (118.670833333333334,42.996666666666670)<br>
                    Pixel Size = (0.000833333333333,-0.000833333333333)<br>
                    Metadata:<br>
                      AREA_OR_POINT=Area<br>
                      DataType=Generic<br>
                    Image Structure Metadata:<br>
                      INTERLEAVE=BAND<br>
                    Corner Coordinates:<br>
                    Upper Left  ( 118.6708333,  42.9966667)
                    (115d30'50.80"E,  0d 0' 1.40"N)<br>
                    Lower Left  ( 118.6708333,  41.5400000)
                    (115d30'50.80"E,  0d 0' 1.35"N)<br>
                    Upper Right ( 121.4650000,  42.9966667)
                    (115d30'50.89"E,  0d 0' 1.40"N)<br>
                    Lower Right ( 121.4650000,  41.5400000)
                    (115d30'50.89"E,  0d 0' 1.35"N)<br>
                    Center      ( 120.0679167,  42.2683333)
                    (115d30'50.84"E,  0d 0' 1.37"N)<br>
                    Band 1 Block=128x128 Type=Int16, ColorInterp=Gray<br>
                      NoData Value=32767</font><br>
                </div>
                <div><font face="trebuchet ms, sans-serif"><br>
                  </font></div>
              </div>
            </blockquote>
            <p><br>
            </p>
            <p><br>
            </p>
            <p><font face="trebuchet ms, sans-serif">OK, that looks
                good.</font></p>
            <p><font face="trebuchet ms, sans-serif">Now you can create
                a new LOCATION for your GRASS data using that DEM
                projection information as follows:</font><br>
              <font face="trebuchet ms, sans-serif">(I'll assume you
                want your GRASS database under: </font>C:\Users\zhangtong\grassdata)</p>
            <p><br>
            </p>
            <p>grass -c C:\Users\zhangtong\Desktop\Zehao_DEM.tif -e
              C:\Users\zhangtong\grassdata\CGCS2000\PERMANENT</p>
            <p><br>
            </p>
            <p>THis command creates a new LOCATION based on the DEM
              coordinate system, then exits (-e option).</p>
            <p>Now start GRASS in that new location and you should be
              able to import your DEM without problem:</p>
            <p><br>
            </p>
            <p>grass C:\Users\zhangtong\grassdata\CGCS2000\PERMANENT</p>
            <p><br>
            </p>
            <p>and then at the GRASS command prompt:</p>
            <p>r.import C:\Users\zhangtong\Desktop\Zehao_DEM.tif
              output=zehao_dem</p>
            <p>g.region -ap rast=zehao_dem<br>
            </p>
            <p><br>
            </p>
            <p><font face="trebuchet ms, sans-serif"><br>
              </font></p>
            <p><br>
            </p>
            <blockquote type="cite">
              <div dir="ltr">
                <div><font face="trebuchet ms, sans-serif"><br>
                  </font></div>
                <div><font face="trebuchet ms, sans-serif">Zac</font></div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">Micha Silver <<a
                    href="mailto:tsvibar@gmail.com" target="_blank"
                    moz-do-not-send="true">tsvibar@gmail.com</a>>
                  于2020年7月3日周五 下午4:43写道:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div> <br>
                    <div>On 02/07/2020 20:58, Zac45 wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <pre>Hi,

I am quite new to GRASS and this is my first post, looking for some help
here!</pre>
                    </blockquote>
                    Welcome<br>
                    <blockquote type="cite">
                      <pre>I am now processing the dataset under *CGCS2000 / 3-degree Gauss-Kruger CM
120E*. But the dataset could not be recognised by GRASS when I trying to
import the DEM data.  The warning message kept poping up: </pre>
                    </blockquote>
                    <p>Can you show the CRS of your original DEM before
                      import into GRASS. What's the output from:</p>
                    <p><br>
                    </p>
                    <p>gdalinfo <your_original_DEM></p>
                    <p>?</p>
                    <p><br>
                    </p>
                    <blockquote type="cite">
                      <pre>WARNING: Datum <China_2000> not recognised by GRASS and no parameters found

And the output from g.region -p is:

projection: 99 (CGCS2000 / 3-degree Gauss-Kruger CM 120E)
zone:       0
datum:      ** unknown (default: WGS84) **
ellipsoid:  grs80
north:      1
south:      0
west:       0
east:       1
nsres:      1
ewres:      1
rows:       1​
cols:       1
cells:      1

How can I fix it?

Best,
Zac45



--
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html" target="_blank" moz-do-not-send="true">http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html</a>
_______________________________________________
grass-user mailing list
<a href="mailto:grass-user@lists.osgeo.org" target="_blank" moz-do-not-send="true">grass-user@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
                    </blockquote>
                    <pre cols="72">-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
<a href="https://orcid.org/0000-0002-1128-1325" target="_blank" moz-do-not-send="true">https://orcid.org/0000-0002-1128-1325</a></pre>
                  </div>
                </blockquote>
              </div>
            </blockquote>
            <pre cols="72">-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
<a href="https://orcid.org/0000-0002-1128-1325" target="_blank" moz-do-not-send="true">https://orcid.org/0000-0002-1128-1325</a></pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
<a class="moz-txt-link-freetext" href="https://orcid.org/0000-0002-1128-1325">https://orcid.org/0000-0002-1128-1325</a></pre>
  </body>
</html>