Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index geobuf #26

Merged
merged 38 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bcd9dde
add geobuf plus
zhixiong-tang Nov 12, 2023
b848bf7
not ready
zhixiong-tang Nov 12, 2023
8beb9bd
it should work
zhixiong-tang Nov 12, 2023
d68e73d
export
zhixiong-tang Nov 12, 2023
5df343c
good
zhixiong-tang Nov 12, 2023
579b109
not ready
zhixiong-tang Nov 12, 2023
157342c
export geobuf plus
zhixiong-tang Nov 13, 2023
1c579b4
export geobuf + index
zhixiong-tang Nov 13, 2023
d04e16c
good
zhixiong-tang Nov 13, 2023
4b06b3e
not ready
zhixiong-tang Nov 13, 2023
6e0308f
not ready
zhixiong-tang Nov 13, 2023
1adb154
add header
zhixiong-tang Nov 13, 2023
c36b73b
not ready
zhixiong-tang Nov 13, 2023
68fbf4d
not ready
zhixiong-tang Nov 13, 2023
7bd8a01
notready
zhixiong-tang Nov 13, 2023
6d3d435
invalid tag exception?
zhixiong-tang Nov 13, 2023
980430d
not ready
zhixiong-tang Nov 13, 2023
1d45f7f
not ready
zhixiong-tang Nov 14, 2023
1dfd5b2
not ready
zhixiong-tang Nov 14, 2023
2cd350f
not good
zhixiong-tang Nov 14, 2023
8558444
good
zhixiong-tang Nov 14, 2023
4609d5a
this is better
zhixiong-tang Nov 14, 2023
7014306
extract geometry/properties
zhixiong-tang Nov 15, 2023
dbb5ebd
not ready
zhixiong-tang Nov 15, 2023
5cafd8c
good
zhixiong-tang Nov 15, 2023
d9db7d2
not ready
zhixiong-tang Nov 15, 2023
875be6a
good
zhixiong-tang Nov 15, 2023
117b106
rename
zhixiong-tang Nov 15, 2023
990a724
fix
zhixiong-tang Nov 15, 2023
429fb2f
update
zhixiong-tang Nov 15, 2023
f2621be
good
zhixiong-tang Nov 15, 2023
3d227aa
good
zhixiong-tang Nov 15, 2023
47da11d
not ready
zhixiong-tang Nov 15, 2023
1e5409a
fix
zhixiong-tang Nov 15, 2023
a95ccaf
fix lint
zhixiong-tang Nov 15, 2023
407f891
supports int/string get/set
zhixiong-tang Nov 16, 2023
6800b51
add test
zhixiong-tang Nov 16, 2023
86fd7af
fix for windows
zhixiong-tang Nov 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ benchmarks/*.pbf*
# https://github.com/cubao/nano-fmm/blob/master/data/Makefile
data/suzhoubeizhan.json
tests/*.json
data/suzhoubeizhan.idx
4 changes: 4 additions & 0 deletions docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ To upgrade `pybind11-geobuf` to the latest version, use pip:
pip install -U pybind11-geobuf
```

## Version 0.1.9 (2023-11-15)

* Indexing geobuf (like flatgeobuf, but more general), making it random accessible

## Version 0.1.8 (2023-11-11)

* Fix readthedocs
Expand Down
11 changes: 10 additions & 1 deletion pybind11_geobuf/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from loguru import logger

from pybind11_geobuf import rapidjson # noqa
from pybind11_geobuf import Decoder, Encoder # noqa
from pybind11_geobuf import Decoder, Encoder, GeobufIndex # noqa
from pybind11_geobuf import is_subset_of as is_subset_of_impl # noqa
from pybind11_geobuf import normalize_json as normalize_json_impl # noqa
from pybind11_geobuf import pbf_decode as pbf_decode_impl # noqa
Expand Down Expand Up @@ -210,13 +210,22 @@ def is_subset_of(path1: str, path2: str):
assert is_subset_of_impl(path1, path2)


def index_geobuf(input_geobuf_path: str, output_index_path: str):
os.makedirs(
os.path.dirname(os.path.abspath(output_index_path)),
exist_ok=True,
)
return GeobufIndex.indexing(input_geobuf_path, output_index_path)


if __name__ == "__main__":
import fire

fire.core.Display = lambda lines, out: print(*lines, file=out)
fire.Fire(
{
"geobuf2json": geobuf2json,
"index_geobuf": index_geobuf,
"is_subset_of": is_subset_of,
"json2geobuf": json2geobuf,
"normalize_geobuf": normalize_geobuf,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def build_extension(self, ext):
# logic and declaration, and simpler if you include description/version in a file.
setup(
name="pybind11_geobuf",
version="0.1.8",
version="0.1.9",
author="tzx",
author_email="[email protected]",
url="https://geobuf-cpp.readthedocs.io",
Expand Down
Loading