[Liblas-devel] Improved SRS support in liblas

Michael Rosen mrosen at lizardtech.com
Tue Feb 3 23:51:12 EST 2009


After discuss this offline with Howard, I'm posting this here for further discussion.

A design limitation of liblas 1.0.0 is that we store the SRS information as a PROJ4 string.  This precludes the ability to reference non-proj4 data like the SRSName or the EPSG code.  An alternative might be to store this as a WKT string and use GDAL's global-but-not-exposed function "GTIFGetOGISDefn" to convert from the (libgeotiff) GTIFDefn structure to a WKT.  Similarly, I think GTIFSetFromOGISDefn (in libgeotiff) could reverse the operation.

To make this concern explicit, consider this WKT


PROJCS["NAD83 / Washington North",      <<<<=============
  GEOGCS["NAD83",
     DATUM["North_American_Datum_1983",
        SPHEROID["GRS 1980",6378137,298.257222101,
           AUTHORITY["EPSG","7019"]],
        AUTHORITY["EPSG","6269"]],
     PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
     UNIT["degree",0.01745329251994328,
        AUTHORITY["EPSG","9122"]],
     AUTHORITY["EPSG","4269"]],
  PROJECTION["Lambert_Conformal_Conic_2SP"],
  PARAMETER["standard_parallel_1",48.73333333333333],
  PARAMETER["standard_parallel_2",47.5],
  PARAMETER["latitude_of_origin",47],
  PARAMETER["central_meridian",-120.8333333333333],
  PARAMETER["false_easting",500000],
  PARAMETER["false_northing",0],
  UNIT["metre",1,
     AUTHORITY["EPSG","9001"]],
  AUTHORITY["EPSG","32148"]]      <<<<=============

If we convert this to a Proj4 string, all we get is 

	+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47
	+lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +datum=NAD83 
	+units=m +no_defs

There appears to be no way to recover the EPSG code or "NAD83 / Washington North."  As it stands now, I think (but don't have a test case) that if we use liblas to read a file with this SRS and then write it out again, we can't keep the original SRS intact.

msr



More information about the Liblas-devel mailing list