Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Aug 17, 2018
1 parent c0ad157 commit f60ca86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ you can see the accessible fields in :class:`pylas.headers.rawheader.RawHeader1_
Accessing Points Records
========================

To access point records unsing the dimension name, you have 2 options:
To access point records using the dimension name, you have 2 options:

1) regular attribute access using the `las.dimension_name` syntax
2) dict-like attribute access `las[dimension_name]`.
Expand Down Expand Up @@ -111,7 +111,7 @@ you can access the list of available dimensions in the file you read just like t
('X', 'Y', 'Z', 'intensity', 'return_number', 'number_of_returns', 'scan_direction_flag', 'edge_of_flight_line', 'classification', 'synthetic', 'key_point', 'withheld', 'scan_angle_rank', 'user_data', 'point_source_id', 'gps_time', 'red', 'green', 'blue')

This gives you all the dimension names, including extra dimensions if any.
If you with to get only the extra dimension names the point format can give them to you:
If you wish to get only the extra dimension names the point format can give them to you:

>>> point_format.extra_dimension_names
[]
Expand Down
2 changes: 1 addition & 1 deletion pylas/lasdatas/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def __setitem__(self, key, value):
self.points_data[key] = value

def update_header(self):
self.header.point_format_id = self.points_data.point_format
self.header.point_format_id = self.points_data.point_format.id
self.header.point_count = len(self.points_data)
self.header.point_data_record_length = self.points_data.point_size

Expand Down
7 changes: 5 additions & 2 deletions pylas/point/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@ def empty(cls, point_format_id):


class PointRecord(IPointRecord):
def __init__(self, data, point_format):
def __init__(self, data, point_format: PointFormat):
self.array = data
self.point_format = point_format
self.dimensions_names = point_format.unpacked_dtype.names

@property
def dimensions_names(self):
return self.point_format.dimension_names

@property
def extra_dimensions_names(self):
Expand Down

0 comments on commit f60ca86

Please sign in to comment.