[postgis-devel] Validity flag
Paul Ramsey
pramsey at cleverelephant.ca
Fri Mar 4 10:19:22 PST 2016
I think the right answer is to have an "extended info" flag on the
main flags slot, which, if present indicates a spare 8 bytes will be
inserted into the header before the bounding box. This could hold less
commonly used flags, like the validity values (which we would have
room to represent as yes, no, and unknown), solidity values, and so
on. It will require a bit of work on the serializer/deserializer, but
not a lot.
If you're OK w/ the idea, I will implement a branch of it.
P.
On Fri, Mar 4, 2016 at 5:58 AM, Daniel Baston <dbaston at gmail.com> wrote:
> I like the suggestion to add an optional set of extra flags at the end of
> the geometry, as a nice backwards-compatible way to store extra information
> when we need the ability. But it seems like overkill for the current
> situation, where we do have flags available in the current structure. Can
> we not get 99% of the benefits (avoid repeatedly testing geometries known to
> be valid) by storing the single "valid / unknown" flag in the current
> structure?
>
> On unrelated note, do we need to further quality what we mean by "valid" ?
> Is SFCGAL validity always the same as GEOS validity ?
>
> Dan
>
> On Mon, Feb 29, 2016 at 1:54 PM, Sandro Santilli <strk at keybit.net> wrote:
>>
>> On Mon, Feb 29, 2016 at 09:23:13AM -0800, Paul Ramsey wrote:
>> > I have another (better?) option:
>> > Use one of the existing bits be an "extra-8-bytes" flag. That way we
>> > can have lots of extra info if we want, in cases where fluff isn't an
>> > issue, and without ruining alignment.
>> > Thanks Hugo for the idea,
>>
>> Yes, "extra-8-bytes" is the alternative.
>> But Hugo idea could be limited to "1-byte" (with another "extend" bit
>> in case we need more) w/out affecting alignment.
>> So I guess it all depends on how much we want to reduce on-disk size
>> (assuming a single byte would not be padded to next 8-bytes boundary
>> on disk write...).
>>
>> --strk;
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/postgis-devel
>
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list