Skip to content

Conversation

craigds
Copy link
Member

@craigds craigds commented Aug 25, 2025

Description

When --override-crs is given for raster or pointcloud import, the tiles need to be rewritten (using PDAL or GDAL) to override the CRS (as well as setting the CRS in the dataset meta). This change does that.

Related links:

Fixes #1060

Checklist:

  • Have you reviewed your own change?
  • Have you included test(s)?
  • Have you updated the changelog?

@craigds craigds changed the base branch from master to macos-build August 25, 2025 21:47
Fixes #1060
When --override-crs is given for raster or pointcloud import, the tiles
need to be rewritten (using PDAL or GDAL) to override the CRS (as well
as setting the CRS in the dataset meta). This change does that.
@craigds craigds force-pushed the override-crs-in-laz-files branch from 48f6e58 to f483b24 Compare August 25, 2025 21:48
@craigds craigds changed the base branch from macos-build to master August 25, 2025 21:48
return convert_tile_to_copc
return None

def existing_tile_matches_source(self, source_oid, existing_summary):
"""Check if the existing tile can be reused instead of reimporting."""
# If override_crs is specified, we need to rewrite the CRS in the files,
# so we can't reuse existing tiles
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's actually at least a minor issue here - if you import the same files multiple times, each time with the same --override-crs, this will import all tiles again each time, which is unnecessary.

I'm wondering if we should be checking the CRS of the previous tile itself here (or we could check the CRS of the previous dataset and assume it matches the previous tile, which is much cheaper esp if the tiles are on LFS). If the previous dataset/tile matches the override, we can possibly return True here (if the sourceOID matches)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--override-crs should rewrite the CRS in imported LAZ files
1 participant