cloudnativegeo / cloud-optimized-geospatial-formats-guide

https://guide.cloudnativegeo.org
Creative Commons Attribution 4.0 International
127 stars 18 forks source link

Example on LiDAR LAS/LAZ files to COPC Conversion using PDAL #107

Open omshinde opened 7 months ago

omshinde commented 7 months ago

An example notebook on LiDAR LAS to COPC conversion would be a good example to add. Is it alright if I contribute to this example?

I am planning to use this dataset from NEON for this example - https://data.neonscience.org/data-products/DP1.30003.001

How to access data from NEON is available here: https://github.com/NEONScience/NEON-Data-Skills/blob/main/tutorials/Python/AOP/Lidar/intro-lidar/intro_point_clouds_py/intro_discrete_point_clouds.ipynb

Any thoughts?

cc: @wildintellect

omshinde commented 7 months ago

Potential LAS file to be used for this tutorial- G-LiHT Lidar Point Cloud V001

omshinde commented 7 months ago

pdal info for a sample file -

{
  "file_size": 250214111,
  "filename": "GLLIDARPC_FL_20200311_FIA8_l0s47.las",
  "now": "2024-02-28T14:45:40-0600",
  "pdal_version": "2.6.3 (git-version: Release)",
  "reader": "readers.las",
  "stats":
  {
    "bbox":
    {
      "EPSG:4326":
      {
        "bbox":
        {
          "maxx": -81.01391715,
          "maxy": 25.51124307,
          "maxz": 69.83,
          "minx": -81.03453087,
          "miny": 25.50220025,
          "minz": -9.45
        },
        "boundary": { "type": "Polygon", "coordinates": [ [ [ -81.034528286502976, 25.502200254253729, -9.45 ], [ -81.034530871489949, 25.511239665437046, -9.45 ], [ -81.013918194926248, 25.511243071520095, 69.83 ], [ -81.013917153007569, 25.502203658959989, 69.83 ], [ -81.034528286502976, 25.502200254253729, -9.45 ] ] ] }
      },
      "native":
      {
        "bbox":
        {
          "maxx": 498601.3863,
          "maxy": 2821558.993,
          "maxz": 69.83,
          "minx": 496530.0563,
          "miny": 2820558.003,
          "minz": -9.45
        },
        "boundary": { "type": "Polygon", "coordinates": [ [ [ 496530.056302567652892, 2820558.003240843303502, -9.45 ], [ 496530.056302567652892, 2821558.993240843061358, -9.45 ], [ 498601.386302567610983, 2821558.993240843061358, 69.83 ], [ 498601.386302567610983, 2820558.003240843303502, 69.83 ], [ 496530.056302567652892, 2820558.003240843303502, -9.45 ] ] ] }
      }
    },
    "statistic":
    [
      {
        "average": 497358.9296,
        "count": 8936204,
        "maximum": 498601.3863,
        "minimum": 496530.0563,
        "name": "X",
        "position": 0,
        "stddev": 506.0022327,
        "variance": 256038.2595
      },
      {
        "average": 2820973.891,
        "count": 8936204,
        "maximum": 2821558.993,
        "minimum": 2820558.003,
        "name": "Y",
        "position": 1,
        "stddev": 266.8654626,
        "variance": 71217.17515
      },
      {
        "average": 2.237860022,
        "count": 8936204,
        "maximum": 69.83,
        "minimum": -9.45,
        "name": "Z",
        "position": 2,
        "stddev": 1.898043367,
        "variance": 3.602568623
      },
      {
        "average": 32229.06975,
        "count": 8936204,
        "maximum": 65535,
        "minimum": 13216,
        "name": "Intensity",
        "position": 3,
        "stddev": 5979.992973,
        "variance": 35760315.96
      },
      {
        "average": 1.216587379,
        "count": 8936204,
        "maximum": 5,
        "minimum": 1,
        "name": "ReturnNumber",
        "position": 4,
        "stddev": 0.4612295828,
        "variance": 0.2127327281
      },
      {
        "average": 1.432819014,
        "count": 8936204,
        "maximum": 5,
        "minimum": 1,
        "name": "NumberOfReturns",
        "position": 5,
        "stddev": 0.6120431647,
        "variance": 0.3745968355
      },
      {
        "average": 0.5140756634,
        "count": 8936204,
        "maximum": 1,
        "minimum": 0,
        "name": "ScanDirectionFlag",
        "position": 6,
        "stddev": 0.4998018644,
        "variance": 0.2498019037
      },
      {
        "average": 0.001704638793,
        "count": 8936204,
        "maximum": 1,
        "minimum": 0,
        "name": "EdgeOfFlightLine",
        "position": 7,
        "stddev": 0.04125206892,
        "variance": 0.00170173319
      },
      {
        "average": 1.416949747,
        "count": 8936204,
        "maximum": 2,
        "minimum": 1,
        "name": "Classification",
        "position": 8,
        "stddev": 0.493054442,
        "variance": 0.2431026827
      },
      {
        "average": -4.952186521,
        "count": 8936204,
        "maximum": 34,
        "minimum": -54,
        "name": "ScanAngleRank",
        "position": 9,
        "stddev": 20.10016627,
        "variance": 404.0166842
      },
      {
        "average": 1.485924337,
        "count": 8936204,
        "maximum": 2,
        "minimum": 1,
        "name": "UserData",
        "position": 10,
        "stddev": 0.4998018644,
        "variance": 0.2498019037
      },
      {
        "average": 182.0805795,
        "count": 8936204,
        "maximum": 65535,
        "minimum": 0,
        "name": "PointSourceId",
        "position": 11,
        "stddev": 1046.114333,
        "variance": 1094355.197
      },
      {
        "average": 310900.9221,
        "count": 8936204,
        "maximum": 310916.1241,
        "minimum": 310881.5198,
        "name": "GpsTime",
        "position": 12,
        "stddev": 8.340845709,
        "variance": 69.56970715
      },
      {
        "average": 0,
        "count": 8936204,
        "maximum": 0,
        "minimum": 0,
        "name": "Synthetic",
        "position": 13,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 0,
        "count": 8936204,
        "maximum": 0,
        "minimum": 0,
        "name": "KeyPoint",
        "position": 14,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 0,
        "count": 8936204,
        "maximum": 0,
        "minimum": 0,
        "name": "Withheld",
        "position": 15,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 0,
        "count": 8936204,
        "maximum": 0,
        "minimum": 0,
        "name": "Overlap",
        "position": 16,
        "stddev": 0,
        "variance": 0
      }
    ]
  }
}
wildintellect commented 7 months ago

@omshinde are there any issue with this being LAS 1.1 not 1.4 specification? I know sometimes the versions force data loss for no longer supported features? Otherwise seems ok, but might be nice to find something a little smaller than 250 MB as the sample.