{"action":"created","issue":{"url":"https://api.github.com/repos/libLAS/libLAS/issues/68","labels_url":"https://api.github.com/repos/libLAS/libLAS/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/libLAS/libLAS/issues/68/comments","events_url":"https://api.github.com/repos/libLAS/libLAS/issues/68/events","html_url":"https://github.com/libLAS/libLAS/issues/68","id":101695821,"number":68,"title":"color does not save in new las file","user":{"login":"ainglot","id":12034064,"avatar_url":"https://avatars.githubusercontent.com/u/12034064?v=3","gravatar_id":"","url":"https://api.github.com/users/ainglot","html_url":"https://github.com/ainglot","followers_url":"https://api.github.com/users/ainglot/followers","following_url":"https://api.github.com/users/ainglot/following{/other_user}","gists_url":"https://api.github.com/users/ainglot/gists{/gist_id}","starred_url":"https://api.github.com/users/ainglot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ainglot/subscriptions","organizations_url":"https://api.github.com/users/ainglot/orgs","repos_url":"https://api.github.com/users/ainglot/repos","events_url":"https://api.github.com/users/ainglot/events{/privacy}","received_events_url":"https://api.github.com/users/ainglot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-18T16:32:44Z","updated_at":"2015-08-19T12:58:39Z","closed_at":null,"body":"Hi,\r\nI have issue, in my script everything items of file las saved (x, y, z, intensity), but not color RGB.\r\nI used this link: http://lists.osgeo.org/pipermail/liblas-devel/2010-July/000904.html\r\n\r\nfrom liblas import file\r\nfrom liblas import header\r\nfrom liblas import color\r\nimport liblas\r\n\r\nLASin = r\"D:\\SHP\\PyLAS\\PG1.las\"\r\nLASout = r\"D:\\SHP\\PyLAS\\PG2.las\"\r\nh = header.Header()\r\nh.data_format_id = 1\r\nh.minor_version = 2\r\n\r\nLASinr = file.File(LASin, mode=\"r\")\r\na = 0\r\nLASoutw = file.File(LASout, mode=\"w\", header=h)\r\nnew = liblas.point.Point()\r\nfor point in LASinr:\r\n    classy = point.classification\r\n    if classy == 2:\r\n        new.x = point.x\r\n        new.y = point.y\r\n        new.z = point.z\r\n        new.intensity = point.intensity\r\n        new.return_number = point.return_number\r\n        new.number_of_returns = point.number_of_returns\r\n        new.scan_direction = point.scan_direction\r\n        new.flightline_edge = point.flightline_edge\r\n        new.classification = point.classification\r\n        new.scan_angle = point.scan_angle\r\n        new.user_data = point.user_data\r\n        cr = point.color\r\n        rr = cr.red\r\n        bb = cr.blue\r\n        gg = cr.green\r\n        new.color = color.Color(red = rr, blue = bb, green = gg)\r\n        LASoutw.write(new)\r\n        a += 1\r\nLASoutw.close()\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/libLAS/libLAS/issues/comments/132582542","html_url":"https://github.com/libLAS/libLAS/issues/68#issuecomment-132582542","issue_url":"https://api.github.com/repos/libLAS/libLAS/issues/68","id":132582542,"user":{"login":"hobu","id":87751,"avatar_url":"https://avatars.githubusercontent.com/u/87751?v=3","gravatar_id":"","url":"https://api.github.com/users/hobu","html_url":"https://github.com/hobu","followers_url":"https://api.github.com/users/hobu/followers","following_url":"https://api.github.com/users/hobu/following{/other_user}","gists_url":"https://api.github.com/users/hobu/gists{/gist_id}","starred_url":"https://api.github.com/users/hobu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hobu/subscriptions","organizations_url":"https://api.github.com/users/hobu/orgs","repos_url":"https://api.github.com/users/hobu/repos","events_url":"https://api.github.com/users/hobu/events{/privacy}","received_events_url":"https://api.github.com/users/hobu/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T12:58:38Z","updated_at":"2015-08-19T12:58:38Z","body":"Unless you have a strong reason to keep using libLAS, I would suggest laspy. It is a pure python implementation, and while it might be a little bit slower in some situations, it is going to be much more satisfactory. It's API mimic's libLAS', and you should be able to use it as a drop-in for libLAS python."}}