pygeobox 1.0.0__tar.gz → 1.0.2__tar.gz
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.
- {pygeobox-1.0.0 → pygeobox-1.0.2}/LICENSE +21 -21
- {pygeobox-1.0.0 → pygeobox-1.0.2}/PKG-INFO +22 -31
- pygeobox-1.0.2/README.md +62 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/__init__.py +63 -63
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/api.py +2517 -2517
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/apikey.py +232 -232
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/attachment.py +297 -297
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/base.py +364 -364
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/basemap.py +162 -162
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/dashboard.py +316 -316
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/enums.py +354 -354
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/exception.py +47 -47
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/feature.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/field.py +309 -309
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/map.py +858 -858
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/model3d.py +334 -334
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/mosaic.py +647 -647
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/plan.py +260 -260
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/query.py +668 -668
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/raster.py +756 -756
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/route.py +63 -63
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/scene.py +317 -317
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/settings.py +165 -165
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/task.py +354 -354
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/tile3d.py +294 -294
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/tileset.py +585 -585
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/user.py +423 -423
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/utils.py +43 -43
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/vectorlayer.py +1149 -1149
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/version.py +248 -248
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/view.py +859 -859
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/workflow.py +315 -315
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/PKG-INFO +22 -31
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/SOURCES.txt +0 -1
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/requires.txt +0 -5
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pyproject.toml +6 -4
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_api.py +1949 -1949
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_feature.py +444 -444
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_field.py +246 -246
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_file.py +345 -345
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_map.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_model3d.py +211 -211
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_mosaic.py +358 -358
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_query.py +460 -460
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_task.py +234 -234
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_tileset.py +312 -312
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_user.py +148 -148
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_vectorlayer.py +667 -667
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_view.py +727 -727
- pygeobox-1.0.0/README.md +0 -63
- pygeobox-1.0.0/setup.py +0 -22
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/file.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/log.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/usage.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/dependency_links.txt +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/top_level.txt +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/setup.cfg +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_apikey.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_attachment.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_basemap.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_dashboard.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_log.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_plan.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_raster.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_route.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_scene.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_settings.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_tile3d.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_usage.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_version.py +0 -0
- {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_workflow.py +0 -0
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2023 Geobox
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Geobox
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -1,12 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pygeobox
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.2
|
4
4
|
Summary: SDK for Geobox's APIs
|
5
|
-
Home-page: https://gitlab.com/geobox-sdks/pygeobox.git
|
6
|
-
Author: Hamid Heydari
|
7
5
|
Author-email: Hamid Heydari <heydari.h62@gmail.com>
|
8
6
|
License: MIT
|
9
|
-
Project-URL: Homepage, https://
|
7
|
+
Project-URL: Homepage, https://geobox.ir
|
8
|
+
Project-URL: Documentation, https://geobox.ir
|
10
9
|
Requires-Python: >=3.7
|
11
10
|
Description-Content-Type: text/markdown
|
12
11
|
License-File: LICENSE
|
@@ -30,18 +29,11 @@ Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
30
29
|
Provides-Extra: all
|
31
30
|
Requires-Dist: shapely; extra == "all"
|
32
31
|
Requires-Dist: pyproj; extra == "all"
|
33
|
-
Requires-Dist: pytest; extra == "all"
|
34
|
-
Requires-Dist: pytest-cov; extra == "all"
|
35
32
|
Requires-Dist: tqdm; extra == "all"
|
36
33
|
Requires-Dist: ipywidgets; extra == "all"
|
37
|
-
Requires-Dist: Sphinx; extra == "all"
|
38
|
-
Requires-Dist: sphinx-rtd-theme; extra == "all"
|
39
|
-
Requires-Dist: sphinx-copybutton; extra == "all"
|
40
|
-
Dynamic: author
|
41
|
-
Dynamic: home-page
|
42
34
|
Dynamic: license-file
|
43
35
|
|
44
|
-
[<img width="200" alt="Geobox logo" src="
|
36
|
+
[<img width="200" alt="Geobox logo" src="https://www.geobox.ir/wp-content/uploads/2022/05/geologo-slider.png">](https://www.geobox.ir/)
|
45
37
|
|
46
38
|
# Geobox
|
47
39
|
SDK for Geobox's APIs
|
@@ -49,46 +41,45 @@ SDK for Geobox's APIs
|
|
49
41
|
Installation
|
50
42
|
============
|
51
43
|
|
52
|
-
|
44
|
+
Enable Virtualenv, Install Dependencies and Run Tests:
|
53
45
|
|
54
46
|
```
|
55
|
-
|
56
|
-
python -m venv .venv
|
57
|
-
source .venv/bin/activate
|
58
|
-
pip install -e .
|
47
|
+
pip install pygeobox
|
59
48
|
```
|
60
49
|
|
61
50
|
Install with Geometry Dependencies
|
62
51
|
|
63
52
|
```
|
64
|
-
pip install
|
53
|
+
pip install pygeobox[geometry]
|
65
54
|
```
|
55
|
+
```
|
56
|
+
from pygeobox import GeoboxClient
|
66
57
|
|
67
|
-
|
58
|
+
client = GeoboxClient()
|
68
59
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
make.bat html
|
60
|
+
layer = client.get_vectors(search='tehran')[0]
|
61
|
+
features = layer.get_feature(feature_id=1)
|
62
|
+
geom = feature.geometry
|
73
63
|
```
|
74
64
|
|
75
|
-
Install with
|
65
|
+
Install with Progress Bar Support
|
76
66
|
|
77
67
|
```
|
78
|
-
pip install
|
79
|
-
pytest -vv
|
68
|
+
pip install pygeobox[tqdm]
|
80
69
|
```
|
70
|
+
```
|
71
|
+
from pygeobox import GeoboxClient
|
81
72
|
|
82
|
-
|
73
|
+
client = GeoboxClient()
|
83
74
|
|
84
|
-
|
85
|
-
|
75
|
+
task = client.geet_tasks()[0]
|
76
|
+
task.wait() # shows progress bar by default. use progress_bar=False to disable it.
|
86
77
|
```
|
87
78
|
|
88
79
|
Install with All Available Dependencies
|
89
80
|
|
90
81
|
```
|
91
|
-
pip install
|
82
|
+
pip install pygeobox[all]
|
92
83
|
```
|
93
84
|
|
94
85
|
|
@@ -96,7 +87,7 @@ Example
|
|
96
87
|
=======
|
97
88
|
|
98
89
|
```
|
99
|
-
from
|
90
|
+
from pygeobox import GeoboxClient
|
100
91
|
|
101
92
|
client = GeoboxClient()
|
102
93
|
|
pygeobox-1.0.2/README.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
[<img width="200" alt="Geobox logo" src="https://www.geobox.ir/wp-content/uploads/2022/05/geologo-slider.png">](https://www.geobox.ir/)
|
2
|
+
|
3
|
+
# Geobox
|
4
|
+
SDK for Geobox's APIs
|
5
|
+
|
6
|
+
Installation
|
7
|
+
============
|
8
|
+
|
9
|
+
Enable Virtualenv, Install Dependencies and Run Tests:
|
10
|
+
|
11
|
+
```
|
12
|
+
pip install pygeobox
|
13
|
+
```
|
14
|
+
|
15
|
+
Install with Geometry Dependencies
|
16
|
+
|
17
|
+
```
|
18
|
+
pip install pygeobox[geometry]
|
19
|
+
```
|
20
|
+
```
|
21
|
+
from pygeobox import GeoboxClient
|
22
|
+
|
23
|
+
client = GeoboxClient()
|
24
|
+
|
25
|
+
layer = client.get_vectors(search='tehran')[0]
|
26
|
+
features = layer.get_feature(feature_id=1)
|
27
|
+
geom = feature.geometry
|
28
|
+
```
|
29
|
+
|
30
|
+
Install with Progress Bar Support
|
31
|
+
|
32
|
+
```
|
33
|
+
pip install pygeobox[tqdm]
|
34
|
+
```
|
35
|
+
```
|
36
|
+
from pygeobox import GeoboxClient
|
37
|
+
|
38
|
+
client = GeoboxClient()
|
39
|
+
|
40
|
+
task = client.geet_tasks()[0]
|
41
|
+
task.wait() # shows progress bar by default. use progress_bar=False to disable it.
|
42
|
+
```
|
43
|
+
|
44
|
+
Install with All Available Dependencies
|
45
|
+
|
46
|
+
```
|
47
|
+
pip install pygeobox[all]
|
48
|
+
```
|
49
|
+
|
50
|
+
|
51
|
+
Example
|
52
|
+
=======
|
53
|
+
|
54
|
+
```
|
55
|
+
from pygeobox import GeoboxClient
|
56
|
+
|
57
|
+
client = GeoboxClient()
|
58
|
+
|
59
|
+
layer = client.get_vectors(search='tehran')[0]
|
60
|
+
features = layer.get_features(out_srid=4326, bbox_srid=4326)
|
61
|
+
fields = layer.get_fields()
|
62
|
+
```
|
@@ -1,63 +1,63 @@
|
|
1
|
-
"""
|
2
|
-
GeoBox SDK
|
3
|
-
|
4
|
-
This package provides classes and functions to interact with the GeoBox API.
|
5
|
-
|
6
|
-
Modules:
|
7
|
-
api (module): Contains the Api class for making API requests.
|
8
|
-
vectors (module): Contains classes for interacting with vector layers, fields, and features.
|
9
|
-
exception (module): Contains custom exception classes for error handling.
|
10
|
-
|
11
|
-
Classes:
|
12
|
-
Api: A class to interact with the GeoBox API.
|
13
|
-
VectorLayers: A class to interact with vector layers in the GeoBox API.
|
14
|
-
Fields: A class to interact with fields in a vector layer.
|
15
|
-
Features: A class to interact with features in a vector layer.
|
16
|
-
GeoboxError: Base class for all exceptions raised by the GeoBox SDK.
|
17
|
-
AuthenticationError: Raised when there is an authentication error.
|
18
|
-
AuthorizationError: Raised when there is an authorization error.
|
19
|
-
ApiRequestError: Raised when there is an error with the API request.
|
20
|
-
NotFoundError: Raised when a requested resource is not found.
|
21
|
-
ValidationError: Raised when there is a validation error.
|
22
|
-
ServerError: Raised when there is a server error.
|
23
|
-
"""
|
24
|
-
import logging, os, dotenv
|
25
|
-
from .api import GeoboxClient
|
26
|
-
|
27
|
-
from .exception import (
|
28
|
-
GeoboxError,
|
29
|
-
AuthenticationError,
|
30
|
-
AuthorizationError,
|
31
|
-
ApiRequestError,
|
32
|
-
NotFoundError,
|
33
|
-
ValidationError,
|
34
|
-
ServerError
|
35
|
-
)
|
36
|
-
|
37
|
-
dotenv.load_dotenv()
|
38
|
-
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
|
39
|
-
|
40
|
-
logger = logging.getLogger(__name__)
|
41
|
-
if DEBUG:
|
42
|
-
logging.basicConfig(
|
43
|
-
level=logging.DEBUG,
|
44
|
-
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
45
|
-
)
|
46
|
-
logger.info("Logging is set to DEBUG level.")
|
47
|
-
else:
|
48
|
-
logging.basicConfig(level=logging.WARNING)
|
49
|
-
|
50
|
-
|
51
|
-
__all__ = [
|
52
|
-
'GeoboxClient',
|
53
|
-
'Feature',
|
54
|
-
'VectorLayer',
|
55
|
-
'GeoboxError',
|
56
|
-
'AuthenticationError',
|
57
|
-
'AuthorizationError',
|
58
|
-
'ApiRequestError',
|
59
|
-
'NotFoundError',
|
60
|
-
'ValidationError',
|
61
|
-
'ServerError'
|
62
|
-
]
|
63
|
-
|
1
|
+
"""
|
2
|
+
GeoBox SDK
|
3
|
+
|
4
|
+
This package provides classes and functions to interact with the GeoBox API.
|
5
|
+
|
6
|
+
Modules:
|
7
|
+
api (module): Contains the Api class for making API requests.
|
8
|
+
vectors (module): Contains classes for interacting with vector layers, fields, and features.
|
9
|
+
exception (module): Contains custom exception classes for error handling.
|
10
|
+
|
11
|
+
Classes:
|
12
|
+
Api: A class to interact with the GeoBox API.
|
13
|
+
VectorLayers: A class to interact with vector layers in the GeoBox API.
|
14
|
+
Fields: A class to interact with fields in a vector layer.
|
15
|
+
Features: A class to interact with features in a vector layer.
|
16
|
+
GeoboxError: Base class for all exceptions raised by the GeoBox SDK.
|
17
|
+
AuthenticationError: Raised when there is an authentication error.
|
18
|
+
AuthorizationError: Raised when there is an authorization error.
|
19
|
+
ApiRequestError: Raised when there is an error with the API request.
|
20
|
+
NotFoundError: Raised when a requested resource is not found.
|
21
|
+
ValidationError: Raised when there is a validation error.
|
22
|
+
ServerError: Raised when there is a server error.
|
23
|
+
"""
|
24
|
+
import logging, os, dotenv
|
25
|
+
from .api import GeoboxClient
|
26
|
+
|
27
|
+
from .exception import (
|
28
|
+
GeoboxError,
|
29
|
+
AuthenticationError,
|
30
|
+
AuthorizationError,
|
31
|
+
ApiRequestError,
|
32
|
+
NotFoundError,
|
33
|
+
ValidationError,
|
34
|
+
ServerError
|
35
|
+
)
|
36
|
+
|
37
|
+
dotenv.load_dotenv()
|
38
|
+
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
|
39
|
+
|
40
|
+
logger = logging.getLogger(__name__)
|
41
|
+
if DEBUG:
|
42
|
+
logging.basicConfig(
|
43
|
+
level=logging.DEBUG,
|
44
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
45
|
+
)
|
46
|
+
logger.info("Logging is set to DEBUG level.")
|
47
|
+
else:
|
48
|
+
logging.basicConfig(level=logging.WARNING)
|
49
|
+
|
50
|
+
|
51
|
+
__all__ = [
|
52
|
+
'GeoboxClient',
|
53
|
+
'Feature',
|
54
|
+
'VectorLayer',
|
55
|
+
'GeoboxError',
|
56
|
+
'AuthenticationError',
|
57
|
+
'AuthorizationError',
|
58
|
+
'ApiRequestError',
|
59
|
+
'NotFoundError',
|
60
|
+
'ValidationError',
|
61
|
+
'ServerError'
|
62
|
+
]
|
63
|
+
|