221 Commits

Author SHA1 Message Date
Blottiere Paul
89d2fa0dc3 Fix uninstall rule 2022-02-09 09:19:25 +01:00
Blottiere Paul
7b431437f2 Allman brackets 2022-02-08 09:14:32 +01:00
Blottiere Paul
1cef6c78a5 Custom llvm style 2022-02-08 09:10:45 +01:00
Blottiere Paul
264cae8bad clang-format 6 2022-02-07 17:20:44 +01:00
Blottiere Paul
61f229c304 clang-format 5 2022-02-07 17:14:19 +01:00
Blottiere Paul
0423427f9b clang-format 4 2022-02-07 17:13:29 +01:00
Blottiere Paul
95dd80ddd9 CLang-format 3 2022-02-07 17:13:10 +01:00
Blottiere Paul
428ca78fb3 clang-format 2 2022-02-07 17:11:31 +01:00
Blottiere Paul
b505e04aa7 Clang-format 1 2022-02-07 17:10:10 +01:00
Blottiere Paul
008b0297d8 No print to stdout during unit tests 2022-02-07 14:43:56 +01:00
Blottiere Paul
270f3e1125 Fix compilation with GCC 10.1 2020-06-18 22:03:59 +02:00
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
8e82233b56 Test datasize in test_patch_lazperf 2018-06-12 08:51:34 +02:00
Éric Lemoine
33445f7d87 Fix pc_patch_uncompressed_from_lazperf
pc_patch_uncompressed_from_lazperf needs to set patch->datasize.
2018-06-11 21:50:35 +02:00
Éric Lemoine
6e7023f80a Add asserts to pc_patch_*_free functions 2018-04-30 10:50:20 +02:00
Éric Lemoine
fa5d7549b1 Remove unnecessary test
pc_patch_free_stats should always be called with a valid patch.
2018-04-30 09:47:55 +02:00
Éric Lemoine
a7c046e013 Rename pc_patch_common_free to pc_patch_free_stats 2018-04-30 09:47:55 +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
19075af104 Drop CMake support for building 2018-04-27 07:31:11 +02:00
Éric Lemoine
d7bb3ed395 Merge pull request #189 from landryb/master
Define inline for all systems, change for Windows to __inline
2017-08-21 17:44:31 +02:00
Vadim Zhukov
97891d35ef Use proper CMake idioms for libxml2 and zlib. 2017-07-27 18:58:05 +03:00
Landry Breuil
c0c0461a2e Define inline for all systems, change for Windows to __inline
Adapted from upstream commit 1eb3da5945bfb753b56e389379795f1408b152e1
2017-07-27 10:42:22 +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
7aefd367be Make hexbytes_from_bytes faster 2017-06-12 08:31:03 +02:00
Éric Lemoine
114b16dacd Use pc_patch_set_schema correctly in ght test 2017-05-11 06:42:08 +02:00
Éric Lemoine
d894f3f28a Use schema->xdim and ydim in ght code 2017-05-11 06:38:33 +02:00
robe2
c4474026ad fix compile error for mingw64 (both 64-bit and 32-bit variants). Issue #171 2017-05-08 17:01:27 -04: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
9d1768e89c Remove declaration of unused function 2017-04-21 08:55:49 +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
Éric Lemoine
4f033847fe Add a PC_BoundingDiagonalAsBinary(p PCPATCH) function 2017-04-03 11:29:13 +02:00
Mathieu Brédif
0389d77bbc pc_point_get_* == PC_SUCCESS
Make the result of pc_point_get_* more explicit in pc_point_to_geometry_wkb
2017-04-01 10:03:27 +02:00
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
Éric Lemoine
692a568101 Merge pull request #141 from elemoine/tabs
Remove tabs within if statements
2017-03-14 09:24:01 +01:00
Blottiere Paul
96de4159f7 Add unit test for pc_patch_filter with lazperf 2017-03-14 08:33:45 +01:00
Blottiere Paul
1254177326 Fix memory leak in pc_patch_filter for lazperf 2017-03-13 18:10:59 +01:00
Éric Lemoine
7be5f7fd67 Fix bug in pc_patch_filter for lazperf
In pc_patch_filter, when nset is 0, the empty patch returned was created with
an invalid maxpoints value in the case of lazperf.
2017-03-10 13:01:56 +01:00
Mathieu Brédif
ceefce2ca1 pc_point_to_geometry_wkb : get_m fix
A typo was introduced while rebasing this PR: `z` values were assigned to both `z` and `m` output points
2017-02-18 16:10:09 +01:00
Éric Lemoine
ac11a17a6f Remove tabs within if statements 2017-02-17 18:12:06 +01:00
Mathieu Brédif
266113d1cb pointlist memory fix, pc_pointlist_from_dimensional memory optimization
pointlist: opaque mem pointer rather than readonly attribute
pc_patch_uncompressed_readonly: transfers data ownership
pc_pointlist_from_dimensional: 1 pcalloc/patch rather than 1/point
2017-02-16 10:47:37 +01:00