forked from pgpointcloud/pointcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The intent of PC_SetPCID(pcpatch/pcpoint,pcid) is to change the pcid as quickly and efficiently as possible without looking at its raw payload values, similar to a glorified ST_SetSRID(geometry).
The main optimized use case is to efficiently select a subset of the columns (cf former proposals #12 and #13 for a PC_Get(pcpoint/pcpatch,text[]) : pcpoint/pcpatch), while possibly modifying the srid, offset and scales.
It just :
- changes the pcid in the header (hence the srid as well)
- drops and adds dimensions without looking at the scales/offsets, based on the set of dimension names of the old and new pcids.
Requirements (to be discussed) :
- if the dimension ordering and interpretations are unchanged, just pass the original payload.
- internal types (interpretation) should stay unchanged. That would enable very efficient implementation for dimensional patches (keep and reorder relevant PCBYTES, create RLE-compressed PCBYTES of zeros for new dimensions), uncompressed patches would require 0(npoints*ndims) memcpys (or maybe less if coalesing is possible, case 1 being the extreme case of a single coalesced memcpy), other compressions could fall back to uncompression.
- new dimensions have a constant raw value (unscaled/unoffset) of 0. Or should it be a scaled/offset value of 0 ?
This proposal, compared to the current implementation offers the possibility of more efficient implementations by not taking into account the possible change of scale/offset.
PS: The active attribute in schema dimensions is unused for now. It could be relevant to handle dropped dimensions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels