45 Commits

Author SHA1 Message Date
Blottiere Paul
5b3c3981ef Add lazperf guards 2018-06-19 12:41:49 +01:00
Blottiere Paul
063a5b1651 Remove GHT support 2018-06-14 18:34:05 +01:00
Karl Pietrzak
4f738eb072 Add PC_MakePatch(pcid integer, values float8[])
Add PC_MakePatch to create a patch from a pcid and an array of float8 values.
2018-06-14 18:49:52 +02:00
Éric Lemoine
3aefbe250c Fix code style 2018-04-30 09:47:55 +02:00
Adam Chidlow
6e3d61a50a Move the freeing of stats into its own function
And call that function from all the different pc_patch_*_free functions.
2018-04-30 09:47:55 +02:00
Éric Lemoine
07c3ddd9f6 Prefix WKB API functions with pc_
This is to avoid conflicts with other libraries, like PostGIS.
2017-06-12 08:42:45 +02:00
Éric Lemoine
114b16dacd Use pc_patch_set_schema correctly in ght test 2017-05-11 06:42:08 +02:00
Éric Lemoine
d552002187 Add PC_Transform
This commit adds a `PC_Transform` function that returns a new patch with its data transformed based on the passed `pcid`.

In contrast to `PC_SetPCId` this function may reinterpret the data if dimension interpretations, scales or offsets are different in the new schema. In the future `PC_Transform` will also re-project the patch data if the schema `srid` has changed, but that is not yet supported.
2017-04-26 16:46:40 +02:00
Éric Lemoine
9491f09dc6 Add PC_SetPCId
This commit adds a `PC_SetPCId` function that can be used to change the schema of a patch.
2017-04-12 09:15:48 +02:00
Blottiere Paul
ccc6e2714e Add lazperf support to PC_PointN 2017-03-31 11:12:39 +02:00
Blottiere Paul
fb5f1dcca4 Add PC_Range(p PCPATCH, first int4, count int4)
This commit adds a PC_Range function. This function returns a patch of "count" points. These points are selected from the start-th point in the input patch.
2017-03-30 09:03:04 +02:00
Mathieu Brédif
3b8f165b35 PCSCHEMA *pc_schema_from_xml(const char *)
consistent return of pc_schema_from_xml : NULL on failure
2017-03-17 12:14:02 +01:00
Mathieu Brédif
ef5fc167d8 indentation normalization 2017-02-12 23:52:15 +01:00
Éric Lemoine
2b87e90d49 Fix indent in cu_pc_patch.c 2017-02-10 15:01:53 +01:00
Éric Lemoine
071d9a72a7 Make pc_patch_compress return the compressed patch
When compressing a patch from GHT to LAZPERF the pc_patch_compress function
currently returns the uncompressed patch.

This commit fixes the bug in pc_patch_compress and adds unit tests for
pc_patch_compress.
2017-02-10 15:01:53 +01:00
Éric Lemoine
8cd3f4c15a Fix unit tests with cunit 2.1-3 (#124)
In CUnit 2.1-2 and before the CU_SuiteInfo structure looks like this:

    typedef struct CU_SuiteInfo {
        const char       *pName;
        CU_InitializeFunc pInitFunc;
        CU_CleanupFunc    pCleanupFunc;
        CU_TestInfo      *pTests;
    } CU_SuiteInfo;

In CUnit 2.1-3 it looks like this:

    typedef struct CU_SuiteInfo {
        const char       *pName;
        CU_InitializeFunc pInitFunc;
        CU_CleanupFunc    pCleanupFunc;
        CU_SetUpFunc      pSetUpFunc;
        CU_TearDownFunc   pTearDownFunc;
        CU_TestInfo      *pTests;
    } CU_SuiteInfo;

This commit changes the test code so it works with both CUnit 2.1-2 and CUnit
2.1-3.
2017-01-24 16:29:33 +01:00
Blottiere Paul
8afd8f9c6d fix compilation issue with GHT support 2016-06-16 16:16:59 +02:00
Mathieu Brédif
5a0f7944fd new PC_PointN function 2016-03-07 15:57:05 +01:00
Sandro Santilli
d345f927c0 Fix leaks in patch unit test 2015-04-21 16:19:57 +02:00
Sandro Santilli
3f3bdab31f Clone stats on dimensional compression
Closes #75
2015-04-21 12:13:17 +02:00
Sandro Santilli
291ccfe57a Fix crash in testcase (due to #75) 2015-04-21 12:01:18 +02:00
Sandro Santilli
44037b743e Leak some leaks from pc_patch unit test 2015-04-21 11:40:21 +02:00
Sandro Santilli
5c9532c00d Revert recently introduced double free on pcpoint (only in test) 2015-02-09 19:55:01 +01:00
Sandro Santilli
e7b8fb8810 Fix typo in pc_patch_dimensional_compute_extent
Includes testcase.
Closes #23
2015-02-09 18:24:17 +01:00
Sandro Santilli
0c7bd2778d Fix unused variables warnings 2015-02-09 18:07:40 +01:00
Paul Ramsey
668d2413b2 Tests in place for patchlevel filtering
much optimization left to do
2013-06-04 14:53:42 -07:00
Paul Ramsey
fdc27ea55d Tests for filtering (need more!) 2013-06-03 16:20:03 -07:00
Paul Ramsey
8174fa4ca3 Finish implementation of patch-level stats 2013-05-31 15:36:23 -07:00
Paul Ramsey
b76a3b8300 Continue with stats calculation reworking 2013-05-30 16:18:42 -07:00
Paul Ramsey
73da920ff0 Remove trailing white space from .c files 2013-03-08 13:46:06 -08:00
Paul Ramsey
d4a104bd77 Enable dimensional storage in the db 2013-03-06 22:06:23 -08:00
Paul Ramsey
e80fc20244 Fix memory error in allocator 2013-03-04 13:00:13 -08:00
Paul Ramsey
c7060031b5 Add dimensional compression routines, right out to the
patch level. Now to add them to SQL.
2013-03-01 16:42:15 -08:00
Paul Ramsey
941d5cb937 Break out struct functions into
their own files. Add patch to dimlist
conversion.
2013-02-26 12:30:11 -08:00
Paul Ramsey
9b20f737ba Finish up change to PCBYTE holder 2013-02-26 10:31:36 -08:00
Paul Ramsey
f499fbc18a First cut of change to PCBYTES 2013-02-25 16:20:44 -08:00
Paul Ramsey
176fa79ecb Add in dimensional data structure.
Build stats on dimensional structure
and figure out preferred compression
for each dimension. Extra tests
for sigbits and other compression
schemes.
2013-02-21 16:26:11 -08:00
Paul Ramsey
e2d636d9ec Add in zlib compression scheme
for dimensional compression.
2013-02-20 21:30:43 -08:00
Paul Ramsey
4f07bfc3fa Add sigbits tests for encode/decode and for 32-bit values. 2013-02-20 12:57:25 -08:00
Paul Ramsey
9d32782984 Add in sigbits decoding functions 2013-02-20 12:22:02 -08:00
Paul Ramsey
53f90321e5 Add in bitcount to dimensional compression 2013-02-20 10:02:46 -08:00
Paul Ramsey
31760d1d53 Fix up 16bit bit packing tests and code 2013-02-18 21:43:39 -08:00
Paul Ramsey
87b05d6668 Commit partial work on dimensional compression 2013-02-18 20:54:37 -08:00
Paul Ramsey
e086d63bb3 Add typmod support to pcpoint and pcpatch 2013-02-06 14:28:19 -08:00
Paul Ramsey
efd85bc528 Rename libpc to lib for hobu 2013-02-04 15:36:13 -08:00