[GRASS-dev] [GRASS GIS] #2456: read CSV from GDAL data directory

GRASS GIS trac at osgeo.org
Thu Mar 24 09:18:29 PDT 2016


#2456: read CSV from GDAL data directory
---------------------------------+---------------------------------
  Reporter:  martinl             |      Owner:  grass-dev@…
      Type:  task                |     Status:  new
  Priority:  blocker             |  Milestone:  7.1.0
 Component:  Projections/Datums  |    Version:  svn-releasebranch70
Resolution:                      |   Keywords:  gdal
       CPU:  Unspecified         |   Platform:  Unspecified
---------------------------------+---------------------------------

Comment (by neteler):

 FWIW, the source code of GDAL's gdalsrsinfo application might be used for
 inspiration to find the datums:

 {{{
 # find by EPSG code
 gdalsrsinfo "EPSG:4674"

 PROJ.4 : '+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs '

 OGC WKT :
 GEOGCS["SIRGAS 2000",
     DATUM["Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000",
         SPHEROID["GRS 1980",6378137,298.257222101,
             AUTHORITY["EPSG","7019"]],
         TOWGS84[0,0,0,0,0,0,0],
         AUTHORITY["EPSG","6674"]],
     PRIMEM["Greenwich",0,
         AUTHORITY["EPSG","8901"]],
     UNIT["degree",0.0174532925199433,
         AUTHORITY["EPSG","9122"]],
     AUTHORITY["EPSG","4674"]]

 # find by PRJ file (WKT string)
 gdalsrsinfo /geodata/gaussboaga1.prj

 PROJ.4 : '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0
 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m
 +no_defs '

 OGC WKT :
 PROJCS["Monte Mario / Italy zone 1",
     GEOGCS["Monte Mario",
         DATUM["Monte_Mario",
             SPHEROID["International 1924",6378388.0,297.0,
                 AUTHORITY["EPSG","7022"]],
             TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68],
             AUTHORITY["EPSG","6265"]],
         PRIMEM["Greenwich",0.0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.017453292519943295],
         AXIS["Lon",EAST],
         AXIS["Lat",NORTH],
         AUTHORITY["EPSG","4265"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["central_meridian",9.0],
     PARAMETER["latitude_of_origin",0.0],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",1500000.0],
     PARAMETER["false_northing",0.0],
     UNIT["m",1.0],
     AXIS["x",EAST],
     AXIS["y",NORTH],
     AUTHORITY["EPSG","3003"]]

 # another EPSG code:
 gdalsrsinfo "EPSG:5514"

 PROJ.4 : '+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333
 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel
 +towgs84=589,76,480,0,0,0,0 +units=m +no_defs '

 OGC WKT :
 PROJCS["S-JTSK / Krovak East North",
     GEOGCS["S-JTSK",
         DATUM["System_Jednotne_Trigonometricke_Site_Katastralni",
             SPHEROID["Bessel 1841",6377397.155,299.1528128,
                 AUTHORITY["EPSG","7004"]],
             TOWGS84[589,76,480,0,0,0,0],
             AUTHORITY["EPSG","6156"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.0174532925199433,
             AUTHORITY["EPSG","9122"]],
         AUTHORITY["EPSG","4156"]],
     PROJECTION["Krovak"],
     PARAMETER["latitude_of_center",49.5],
     PARAMETER["longitude_of_center",24.83333333333333],
     PARAMETER["azimuth",30.28813972222222],
     PARAMETER["pseudo_standard_parallel_1",78.5],
     PARAMETER["scale_factor",0.9999],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AXIS["X",EAST],
     AXIS["Y",NORTH],
     AUTHORITY["EPSG","5514"]]
 }}}

 Also the TOWGS84 is there as expected.

 Source code:
 https://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdalsrsinfo.cpp#L254

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2456#comment:13>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list