h3 3.4.0 → 3.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/ext/h3/src/.travis.yml +5 -0
- data/ext/h3/src/CHANGELOG.md +25 -0
- data/ext/h3/src/CMakeLists.txt +5 -8
- data/ext/h3/src/CONTRIBUTING.md +2 -0
- data/ext/h3/src/README.md +6 -2
- data/ext/h3/src/VERSION +1 -1
- data/ext/h3/src/appveyor.yml +6 -1
- data/ext/h3/src/docs/api/misc.md +16 -0
- data/ext/h3/src/docs/community/bindings.md +9 -0
- data/ext/h3/src/docs/community/tutorials.md +4 -0
- data/ext/h3/src/scripts/binding_functions.ps1 +1 -2
- data/ext/h3/src/scripts/binding_functions.sh +3 -2
- data/ext/h3/src/scripts/coverage.sh.in +3 -3
- data/ext/h3/src/src/apps/applib/include/utility.h +60 -0
- data/ext/h3/src/src/apps/applib/lib/utility.c +196 -2
- data/ext/h3/src/src/apps/benchmarks/benchmarkPolyfill.c +7 -4
- data/ext/h3/src/src/apps/filters/geoToH3.c +73 -27
- data/ext/h3/src/src/apps/filters/h3ToGeo.c +63 -47
- data/ext/h3/src/src/apps/filters/h3ToGeoBoundary.c +64 -48
- data/ext/h3/src/src/apps/filters/h3ToLocalIj.c +4 -5
- data/ext/h3/src/src/apps/filters/hexRange.c +0 -1
- data/ext/h3/src/src/apps/filters/kRing.c +60 -28
- data/ext/h3/src/src/apps/filters/localIjToH3.c +75 -0
- data/ext/h3/src/src/apps/miscapps/generateBaseCellNeighbors.c +2 -2
- data/ext/h3/src/src/apps/testapps/testBBox.c +18 -0
- data/ext/h3/src/src/apps/testapps/testCompact.c +41 -0
- data/ext/h3/src/src/apps/testapps/testCoordIj.c +0 -1
- data/ext/h3/src/src/apps/testapps/testCoordIjk.c +53 -0
- data/ext/h3/src/src/apps/testapps/testH3Api.c +20 -0
- data/ext/h3/src/src/apps/testapps/testH3Distance.c +5 -3
- data/ext/h3/src/src/apps/testapps/testH3Line.c +18 -6
- data/ext/h3/src/src/apps/testapps/testH3ToLocalIj.c +75 -3
- data/ext/h3/src/src/apps/testapps/testH3UniEdge.c +17 -11
- data/ext/h3/src/src/apps/testapps/testHexRanges.c +10 -0
- data/ext/h3/src/src/apps/testapps/testKRing.c +11 -7
- data/ext/h3/src/src/h3lib/lib/algos.c +2 -1
- data/ext/h3/src/src/h3lib/lib/geoCoord.c +10 -10
- data/ext/h3/src/src/h3lib/lib/h3Index.c +1 -2
- data/ext/h3/src/src/h3lib/lib/localij.c +32 -36
- data/lib/h3/version.rb +1 -1
- metadata +4 -7
- data/ext/h3/src/cmake/CheckAlloca.cmake +0 -33
- data/ext/h3/src/cmake/CheckVLA.cmake +0 -33
- data/ext/h3/src/cmake/alloca_test.c +0 -29
- data/ext/h3/src/cmake/vla_test.c +0 -26
- data/ext/h3/src/src/h3lib/include/stackAlloc.h +0 -64
data/lib/h3/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: h3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lachlan Laycock
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -131,13 +131,9 @@ files:
|
|
131
131
|
- ext/h3/src/RELEASE.md
|
132
132
|
- ext/h3/src/VERSION
|
133
133
|
- ext/h3/src/appveyor.yml
|
134
|
-
- ext/h3/src/cmake/CheckAlloca.cmake
|
135
|
-
- ext/h3/src/cmake/CheckVLA.cmake
|
136
134
|
- ext/h3/src/cmake/Config.cmake.in
|
137
135
|
- ext/h3/src/cmake/TestWrapValgrind.cmake
|
138
|
-
- ext/h3/src/cmake/alloca_test.c
|
139
136
|
- ext/h3/src/cmake/toolchain.cmake
|
140
|
-
- ext/h3/src/cmake/vla_test.c
|
141
137
|
- ext/h3/src/dev-docs/Doxyfile.in
|
142
138
|
- ext/h3/src/dev-docs/build_windows.md
|
143
139
|
- ext/h3/src/dev-docs/creating_bindings.md
|
@@ -193,6 +189,7 @@ files:
|
|
193
189
|
- ext/h3/src/src/apps/filters/h3ToLocalIj.c
|
194
190
|
- ext/h3/src/src/apps/filters/hexRange.c
|
195
191
|
- ext/h3/src/src/apps/filters/kRing.c
|
192
|
+
- ext/h3/src/src/apps/filters/localIjToH3.c
|
196
193
|
- ext/h3/src/src/apps/miscapps/generateBaseCellNeighbors.c
|
197
194
|
- ext/h3/src/src/apps/miscapps/generateFaceCenterPoint.c
|
198
195
|
- ext/h3/src/src/apps/miscapps/generateNumHexagons.c
|
@@ -206,6 +203,7 @@ files:
|
|
206
203
|
- ext/h3/src/src/apps/testapps/testBaseCells.c
|
207
204
|
- ext/h3/src/src/apps/testapps/testCompact.c
|
208
205
|
- ext/h3/src/src/apps/testapps/testCoordIj.c
|
206
|
+
- ext/h3/src/src/apps/testapps/testCoordIjk.c
|
209
207
|
- ext/h3/src/src/apps/testapps/testGeoCoord.c
|
210
208
|
- ext/h3/src/src/apps/testapps/testGeoToH3.c
|
211
209
|
- ext/h3/src/src/apps/testapps/testH3Api.c
|
@@ -246,7 +244,6 @@ files:
|
|
246
244
|
- ext/h3/src/src/h3lib/include/mathExtensions.h
|
247
245
|
- ext/h3/src/src/h3lib/include/polygon.h
|
248
246
|
- ext/h3/src/src/h3lib/include/polygonAlgos.h
|
249
|
-
- ext/h3/src/src/h3lib/include/stackAlloc.h
|
250
247
|
- ext/h3/src/src/h3lib/include/vec2d.h
|
251
248
|
- ext/h3/src/src/h3lib/include/vec3d.h
|
252
249
|
- ext/h3/src/src/h3lib/include/vertexGraph.h
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# Copyright 2018 Uber Technologies, Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
if(__check_alloca)
|
16
|
-
return()
|
17
|
-
endif()
|
18
|
-
set(__check_alloca 1)
|
19
|
-
|
20
|
-
function(check_alloca var)
|
21
|
-
if(NOT DEFINED have_alloca)
|
22
|
-
try_compile(have_alloca
|
23
|
-
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/alloca_test
|
24
|
-
${CMAKE_CURRENT_SOURCE_DIR}/cmake/alloca_test.c)
|
25
|
-
endif()
|
26
|
-
set(description "Checking for stack allocation function (alloca)")
|
27
|
-
if(have_alloca)
|
28
|
-
set(${var} ON PARENT_SCOPE)
|
29
|
-
message(STATUS "${description} - Success")
|
30
|
-
else()
|
31
|
-
message(STATUS "${description} - Failed")
|
32
|
-
endif()
|
33
|
-
endfunction()
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# Copyright 2018 Uber Technologies, Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
if(__check_vla)
|
16
|
-
return()
|
17
|
-
endif()
|
18
|
-
set(__check_vla 1)
|
19
|
-
|
20
|
-
function(check_vla var)
|
21
|
-
if(NOT DEFINED ${var})
|
22
|
-
try_compile(have_vla
|
23
|
-
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/vla_test
|
24
|
-
${CMAKE_CURRENT_SOURCE_DIR}/cmake/vla_test.c)
|
25
|
-
endif()
|
26
|
-
set(description "Checking for VLA support")
|
27
|
-
if(have_vla)
|
28
|
-
set(${var} ON PARENT_SCOPE)
|
29
|
-
message(STATUS "${description} - Success")
|
30
|
-
else()
|
31
|
-
message(STATUS "${description} - Failed")
|
32
|
-
endif()
|
33
|
-
endfunction()
|
@@ -1,29 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2018 Uber Technologies, Inc.
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
#ifdef _MSC_VER
|
18
|
-
#include <malloc.h>
|
19
|
-
#define alloc_fn _alloca
|
20
|
-
#else
|
21
|
-
#include <alloca.h>
|
22
|
-
#define alloc_fn alloca
|
23
|
-
#endif
|
24
|
-
|
25
|
-
int main(void) {
|
26
|
-
char* vla = alloc_fn(10);
|
27
|
-
memset(vla, 0, 10);
|
28
|
-
return 0;
|
29
|
-
}
|
data/ext/h3/src/cmake/vla_test.c
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2018 Uber Technologies, Inc.
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
#include <stdio.h>
|
18
|
-
#include <string.h>
|
19
|
-
|
20
|
-
int main(void) {
|
21
|
-
int x;
|
22
|
-
scanf("%d", &x);
|
23
|
-
char vla[x];
|
24
|
-
(void)vla;
|
25
|
-
return 0;
|
26
|
-
}
|
@@ -1,64 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2016-2018 Uber Technologies, Inc.
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
/** @file stackAlloc.h
|
17
|
-
* @brief Macro to provide cross-platform mechanism for allocating variable
|
18
|
-
* length arrays on the stack.
|
19
|
-
*/
|
20
|
-
|
21
|
-
#ifndef STACKALLOC_H
|
22
|
-
#define STACKALLOC_H
|
23
|
-
|
24
|
-
#include <assert.h>
|
25
|
-
#include <string.h>
|
26
|
-
|
27
|
-
#ifdef H3_HAVE_VLA
|
28
|
-
|
29
|
-
#define STACK_ARRAY_CALLOC(type, name, numElements) \
|
30
|
-
assert((numElements) > 0); \
|
31
|
-
type name##Buffer[(numElements)]; \
|
32
|
-
memset(name##Buffer, 0, (numElements) * sizeof(type)); \
|
33
|
-
type* name = name##Buffer
|
34
|
-
|
35
|
-
#elif defined(H3_HAVE_ALLOCA)
|
36
|
-
|
37
|
-
#ifdef _MSC_VER
|
38
|
-
|
39
|
-
#include <malloc.h>
|
40
|
-
|
41
|
-
#define STACK_ARRAY_CALLOC(type, name, numElements) \
|
42
|
-
assert((numElements) > 0); \
|
43
|
-
type* name = (type*)_alloca(sizeof(type) * (numElements)); \
|
44
|
-
memset(name, 0, sizeof(type) * (numElements))
|
45
|
-
|
46
|
-
#else
|
47
|
-
|
48
|
-
#include <alloca.h>
|
49
|
-
|
50
|
-
#define STACK_ARRAY_CALLOC(type, name, numElements) \
|
51
|
-
assert((numElements) > 0); \
|
52
|
-
type* name = (type*)alloca(sizeof(type) * (numElements)); \
|
53
|
-
memset(name, 0, sizeof(type) * (numElements))
|
54
|
-
|
55
|
-
#endif
|
56
|
-
|
57
|
-
#else
|
58
|
-
|
59
|
-
#error \
|
60
|
-
"This platform does not support stack array allocation, please submit an issue on https://github.com/uber/h3 to report this error"
|
61
|
-
|
62
|
-
#endif
|
63
|
-
|
64
|
-
#endif
|