74 Commits

Author SHA1 Message Date
Mathieu Brédif
4088121eeb dim pointers instead of positions in PCSCHEMA
replaces `int32_t x_position` with `PCDIMENSION *xdim` (and similarly for y,z,m) in PCSCHEMA to get a direct access to the corresponding dimension
-> code readability improvement by discarding the `-1` constant and maybe slight expected performance increase of get/set functions
2017-04-01 10:03:25 +02:00
Mathieu Brédif
a6ceb504c3 test_point_geometry (pcpoint to geometry wkb tests)
xy, xyz, xym and xyzm test cases
2017-04-01 10:03:23 +02:00
Mathieu Brédif
f62481bc9b pcpoint_set/get API normalisation and testing
- definition of CU_ASSERT_FAILURE and CU_ASSERT_SUCCESS for easy checking of return values in tests.
- pcpoint_set functions were returning the PC_SUCCESS/PC_FAILURE as a double (!)
- add simple xy, xyz, xym and xyzm xml schemas for unit tests (test_point_xyzm)
2017-04-01 10:03:22 +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
8f4e7e5ecc Consistent error handling in pc_schema_from_xml (2)
slight rework of #108 from @achidlow
2017-03-17 12:13:08 +01:00
Éric Lemoine
abce712ec8 Support other dimensions for lazperf compression 2017-03-14 14:36:39 +01:00
Blottiere Paul
96de4159f7 Add unit test for pc_patch_filter with lazperf 2017-03-14 08:33:45 +01:00
Mathieu Brédif
165d9ea7be geometry cast of pcpoint with optional srid, z and m values, using caching of Z and M positions in schema. 2017-02-16 09:27:04 +01:00
Éric Lemoine
9f19f32536 Remove compile warning (#140)
When using `./configure CFLAGS="-Wall -O2 -g"` we get an "unused-function"
warning at compile time. This was raised by @strk in #130. This commit fixes
the issue.
2017-02-13 19:19:51 +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
87cb90cf29 Fix indent in cu_pc_sort.c (#131)
cu_pc_sort.c currently uses a mix of spaces and tabs. This commit changes all
the tabs to spaces.
2017-01-30 16:52:22 +01:00
Éric Lemoine
c9692411f9 Fix sort unit tests with cunit 2.1-3 (#132) 2017-01-30 16:51:28 +01:00
Mathieu Brédif
68caab7ae1 PC_Sort and PC_IsSorted (#106)
* PC_Sort and PC_IsSorted

* fixing -Wdeclaration-after-statement warnings

* using sort_r for a portable definition of qsort_r/qsort_s

* uncompression fallback for lazperf/is_sorted

* NEWS updated, sort_r github reference and README added
2017-01-29 23:12:31 +01:00
Éric Lemoine
e90e0ac166 Remove unused functions and vars (#128)
* Remove unused function in pc_patch_ght.c

* Remove unused vars in pc_patch_lazperf.c

* Remove unused vars in cu_pc_patch_ght.c

* Remove unused vars in cu_pc_point.c

* Remove unused vars in cu_pc_bytes.c
2017-01-27 17:22:37 +01:00
Éric Lemoine
8165600c61 Build issues when using a specific install prefix (Autotools) (#127)
* Introduce LAZPERF_CPPFLAGS

Without this the las.hpp header file is not found when lazperf was
installed in a non-system place.

* Use GHT_CPPFLAGS

Without this the ght.h header file is not found when libght was installed in
a non-system place.

* Use tabs in Makefiles
2017-01-26 17:43:03 +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
Paul Ramsey
211258b78d Merge pull request #105 from pblottiere/laz
Add lazperf pcpatch
2016-06-14 05:59:51 -07:00
Blottiere Paul
b3764bd5dc Add lazperf pcpatch 2016-06-14 10:22:16 +02:00
Mathieu Brédif
5a0f7944fd new PC_PointN function 2016-03-07 15:57:05 +01:00
Blottiere Paul
1508f405bb fix crash when a child node is empty in pc schema
add unit test in case of an empty child node in schema
2016-03-06 15:48:08 +01:00
Sandro Santilli
e6a8e062a9 Merge pull request #101 from mbredif/patch-2
Enable valgrind checks in Travis, fix reported errors and leaks.
2016-03-05 15:55:06 +01:00
Mathieu Brédif
19a57ee89b Testing compression type of dimensional bytes 2016-03-03 17:35:20 +01:00
Mathieu Brédif
0826a986a0 fix memory leak in test_uncompressed_filter 2016-03-02 23:48:13 +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
3011d8dace Fix crash on cloning schema with missing dimension name/description
Closes #66
Includes testcase
2015-04-09 16:00:27 +02:00
Sandro Santilli
53b4fa1dcb Add test for pc_schema_clone and plug memory leaks in the test
See #65
2015-04-09 12:24:47 +02:00
Sandro Santilli
11012357fd Support sigbits encoding for 64bit integers
Fixes #61
2015-04-02 16:26:30 +02:00
Sandro Santilli
74a0818f6a Add pc_point_to_double_array function
The function was written by Remi-C and slightly modified by me
to avoid the check for NULL and be const-correct.

Also I've added a unit test for the new library function.
2015-02-12 10:34:17 +01:00
Sandro Santilli
aebb3cb0d3 Add test for #28
Involves registering cu_tester specific error handler
2015-02-09 19:55:59 +01: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
Andrew Bell
5d6dac27cb Cast char *'s to proper type. 2014-11-24 18:27:27 -06:00
Paul Ramsey
87f875eabf Build against Centos6 2013-10-22 12:55:55 -07:00
Paul Ramsey
28da32e323 First cut of cmake support 2013-10-21 21:38:43 -07:00
Paul Ramsey
e92de9f3f3 Remove hard requirement for CUnit to build 2013-10-21 10:51:01 -07:00
Paul Ramsey
75fdd0fb90 Fix test to declare length of pcbytes correctly 2013-07-03 11:48:02 -07:00
Paul Ramsey
0909faa673 Do efficient filtering in RLE encoded dimensions 2013-06-28 17:34:41 -07:00
Paul Ramsey
b8ff674ac4 Replace uncompressed filter hack with native GHT filtering for GHT cases. 2013-06-28 11:35:27 -07:00
Paul Ramsey
158b5791e6 Fix RLE encoding size change 2013-06-04 14:57:11 -07: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