# Shapely3D
* **简介**
基于shapely1.8.1的三维矢量表达和空间计算
* **安装方式**
```
## python version >= 3.8
pip install shapely3d
```
* **使用方式**
```
## 几何实例类
from shapely3d import Point3D as Point, LineString3D as LineString, Polygon3D as Polygon
## 空间计算类
from shapely3d import wkt3D, ops3D, affinity3D
```
* **空间计算**
二维三维转换
`ops3d.trans_3d_2d / ops3d.trans_2d_3d / ops3d.judge_2d_3d`
三维实体表征
`Point3D(0,0,0) / LineString3D([[0,0,0],[1,1,0]])`
三维度量运算
`ops3D_smp.distance_point_point / ops3D_smp.points_line_distance`
三维关系运算
`point_1.intersects(line_1) / ops3D.unary_union`
三维仿射运算
`affinity3D.rotate / affinity3D.scale`
三维插值运算
`ops3D.substring / ops3D.interpolate`
* **依赖库**
`numpy, numba, shapely==1.8.1`
* **更新记录**
* v1.4.2:修正intersection_np算法,适配两线段恰好头尾相连的情况
* v1.4.1:修正intersection_np算法,适配两线段平行且重叠的情况
* v1.4:修正difference
* v1.3:更新setup.py
* v1.2:更新README
* v1.1:新增simplify、difference的三维实现,优化intersection_np
* v1.0:初始提交
Raw data
{
"_id": null,
"home_page": "https://git.n.xiaomi.com/ad/hdmap/hqmap-process/shapely3d.git",
"name": "shapely3d",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "shapely, 3d",
"author": "hhacai",
"author_email": "501351877@qq.com",
"download_url": "https://files.pythonhosted.org/packages/54/e3/8368d2a5bd2e74b1d3f5be5b99062ac8c66ec008bdba71c3cce53a85861b/shapely3d-1.4.2.tar.gz",
"platform": null,
"description": "# Shapely3D\n\n* **\u7b80\u4ecb** \n\u57fa\u4e8eshapely1.8.1\u7684\u4e09\u7ef4\u77e2\u91cf\u8868\u8fbe\u548c\u7a7a\u95f4\u8ba1\u7b97\n\n\n* **\u5b89\u88c5\u65b9\u5f0f**\n ```\n ## python version >= 3.8\n pip install shapely3d\n ```\n\n* **\u4f7f\u7528\u65b9\u5f0f**\n ```\n ## \u51e0\u4f55\u5b9e\u4f8b\u7c7b\n from shapely3d import Point3D as Point, LineString3D as LineString, Polygon3D as Polygon\n ## \u7a7a\u95f4\u8ba1\u7b97\u7c7b\n from shapely3d import wkt3D, ops3D, affinity3D\n ```\n\n\n* **\u7a7a\u95f4\u8ba1\u7b97** \n \u4e8c\u7ef4\u4e09\u7ef4\u8f6c\u6362 \n `ops3d.trans_3d_2d / ops3d.trans_2d_3d / ops3d.judge_2d_3d` \n \u4e09\u7ef4\u5b9e\u4f53\u8868\u5f81 \n `Point3D(0,0,0) / LineString3D([[0,0,0],[1,1,0]])` \n \u4e09\u7ef4\u5ea6\u91cf\u8fd0\u7b97 \n `ops3D_smp.distance_point_point / ops3D_smp.points_line_distance` \n \u4e09\u7ef4\u5173\u7cfb\u8fd0\u7b97 \n `point_1.intersects(line_1) / ops3D.unary_union` \n \u4e09\u7ef4\u4eff\u5c04\u8fd0\u7b97 \n `affinity3D.rotate / affinity3D.scale` \n \u4e09\u7ef4\u63d2\u503c\u8fd0\u7b97 \n `ops3D.substring / ops3D.interpolate` \n\n\n* **\u4f9d\u8d56\u5e93** \n `numpy, numba, shapely==1.8.1` \n\n\n* **\u66f4\u65b0\u8bb0\u5f55**\n * v1.4.2\uff1a\u4fee\u6b63intersection_np\u7b97\u6cd5\uff0c\u9002\u914d\u4e24\u7ebf\u6bb5\u6070\u597d\u5934\u5c3e\u76f8\u8fde\u7684\u60c5\u51b5\n * v1.4.1\uff1a\u4fee\u6b63intersection_np\u7b97\u6cd5\uff0c\u9002\u914d\u4e24\u7ebf\u6bb5\u5e73\u884c\u4e14\u91cd\u53e0\u7684\u60c5\u51b5\n * v1.4\uff1a\u4fee\u6b63difference\n * v1.3\uff1a\u66f4\u65b0setup.py\n * v1.2\uff1a\u66f4\u65b0README\n * v1.1\uff1a\u65b0\u589esimplify\u3001difference\u7684\u4e09\u7ef4\u5b9e\u73b0\uff0c\u4f18\u5316intersection_np\n * v1.0\uff1a\u521d\u59cb\u63d0\u4ea4\n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "3d extension of Shapley library",
"version": "1.4.2",
"project_urls": {
"Homepage": "https://git.n.xiaomi.com/ad/hdmap/hqmap-process/shapely3d.git"
},
"split_keywords": [
"shapely",
" 3d"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "54e38368d2a5bd2e74b1d3f5be5b99062ac8c66ec008bdba71c3cce53a85861b",
"md5": "4c744ba3f9458020f1a34da7e46f7f3f",
"sha256": "06dec220a97d4cdc02b19383ba85d485341846d91074a4666d495af636de0e28"
},
"downloads": -1,
"filename": "shapely3d-1.4.2.tar.gz",
"has_sig": false,
"md5_digest": "4c744ba3f9458020f1a34da7e46f7f3f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 16262,
"upload_time": "2025-01-10T06:36:54",
"upload_time_iso_8601": "2025-01-10T06:36:54.199287Z",
"url": "https://files.pythonhosted.org/packages/54/e3/8368d2a5bd2e74b1d3f5be5b99062ac8c66ec008bdba71c3cce53a85861b/shapely3d-1.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-10 06:36:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "shapely3d"
}