ICode9

精准搜索请尝试: 精确搜索
  • 【712】shapely line快速显示2022-05-29 21:01:14

    参考:Python shapely 线缓冲区分析与显示 from shapely.geometry import Point, Polygon, LineString import matplotlib.pyplot as plt line = LineString([(0.1, 0.1), (2, 3)]) x1,y1=line.xy plt.figure() plt.plot(y1,x1) plt.show()    

  • 关于geopandas库的安装2022-01-05 21:31:51

    电脑环境: python 3.8 anaconda-5.3.1 主要依赖包及版本: gdal==3.2.3 Fiona ==1.8.19 shapely ==1.7.1 pyproj == 3.1.0 注意事项: 先安装gdal,再安装其他依赖包上述所列非所有依赖包,其他依赖包还有rtree等 上述包whl文件附链接: 链接:https://pan.baidu.com/s/1VRFzTEw6yLg8Zz6Q

  • 两点截取线【shapely】【clipline】2021-09-03 09:00:48

    from shapely.geometry import Point, LineString from shapely.ops import snap, split, nearest_points def clipLine(ls, p1, p2): p1 = nearest_points(ls, p1)[0] geom = snap(ls, p1, 1) parts = split(geom, p1) if len(parts) == 1: fp = par

  • python-shapely包2021-08-22 14:34:36

    python-shapely 目录python-shapely主要对象通用对象方法PointLineStringsPolygon多边形关系 shapely 是一个专门进行二维平面图像计算包 shapely是一个BSD授权的Python包。是专门做图形计算,用于操作和分析笛卡尔坐标系中的几何对象 ,基本上图形线段,点的判断包里都有,shapely里主

  • 点打断线【GIS】【shapely】2021-08-19 18:31:08

    from shapely.geometry import LineString, Point from shapely.ops import snap, split if __name__ == '__main__': arr = [[0, 0], [10, 0]] brr = [5, 0.01] ls = LineString(arr) pt = Point(brr) geom = snap(ls, pt, 0.5) part1, pa

  • 【649】shapely strtree STRtree 构建 RTree2021-08-17 20:33:45

    class strtree.STRtree(geometries) class strtree.STRtree(geometries) STRtree构造函数采用一系列几何对象, 几何对象的引用将保留并存储在R-tree中 strtree.query(geom) 返回strtree中所有几何体的外延与geom的外延相交的几何体的列表 后续使用所需的二进制谓语(intersects

  • 解决PPOCRLabel不能正常使用的问题2021-07-18 20:01:55

    1.PPOCRLabel的安装 PPOCRLabel是百度研发的用于OCR领域的半自动化图形标注工具,内置PPOCR模型对数据自动标注和重新识别。 官方给的PPOCRLabel安装指南链接在此。 具体安装指南请参考官方链接。 https://github.com/PaddlePaddle/PaddleOCR/blob/dygraph/PPOCRLabel/README_c

  • Anaconda里imgaug库pip安装2021-07-15 10:33:00

    看了几篇文章,imgaug需要先安装依赖库shapely,以下在anaconda prompt里进行 一篇文章写conda install -c  conda-forge shapely,安装shapely,运行没有出问题,但后续pip install imgaug,报错 conda install -c  conda-forge shapely 但是,可以得到信息: 即可知, 我使用的是python3.8,对

  • from shapely.geometry import Polygon提示找不到指定模块2021-05-20 00:02:19

    问题背景:当执行from shapely.geometry import Polygon时提示如下   解决办法:pip uninstall shapely ,然后执行conda install shapely

  • shapely库的基础学习2021-04-14 20:31:46

    DataWhale组队学习打卡第一阶段内容 本学习笔记为Datawhale开源学习训练营21年4月数据挖掘学习的学习内容,学习链接为:团队学习数据挖掘/智慧海洋 所在学习小组:梅利号 shapely库的学习记录: 准备工作 from shapely import geometry as geo from shapley import wkt from shap

  • 【python】shaple安装,使用conda install解决geos_c.dll缺失问题2021-02-22 15:30:05

    直接使用"pip install shapely"安装会安装不完全,丢失geos.dll库: 网上解决方法有很多,比如下载geos_c.dll,配置环境变量等,但这些方法都是弟弟 一句话: conda install shapely 问题解决

  • OSError: [WinError 126] 找不到指定的模块。2020-12-29 23:01:06

    1.问题描述 在windows环境中,运行paddlepaddle程序报错:OSError: [WinError 126] 找不到指定的模块,如下图所示。 2.解决办法 windows环境下,建议从离线下载whl文件,shapely完成安装, 直接通过pip安装的shapely库可能出现[winRrror 126] 找不到指定模块的问题。 (1)下载地址:https://www

  • python Shapely OSError: Could not find lib c or load any of its variants []2020-11-22 10:32:49

    mac 升级过后,python项目运行报错python Shapely OSError: Could not find lib c or load any of its variants []。 在github上找到解决办法没记录如下: To recap, I removed anything dealing with conda that depends on geos: conda remove geos, shapely, cartopy Then i

  • shapely [WinError 126]找不到指定的模块——解决办法2020-05-05 20:07:04

    问题描述 一开始是直接用 pip install Shapely 命令安装的,但之后发现会有如下问题: 解决方案 先将位于Anaconda3\Lib\site-packages的shapely文件删除 然后去https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely 下载自己系统对应的.whl 如我的python是3.7,64位,则下载 Shapely‑

  • javascript-在Jupyter / iPython笔记本中以图形方式选择几何对象2019-11-11 13:33:31

    Shapely和Jupyter / iPython之间的互操作性很好.我可以做一些很酷的事情,例如创建一堆几何形状并在笔记本中查看它们: some_nodes = [[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2]] some_boxes = [] some_boxes.append([some_nodes[0], some_nodes[3], some_nodes[4], some_nod

  • 点到线段的投影Python Shapely2019-11-09 06:58:06

    我有一个由两个点定义的LineString,因此本质上是一个直线段,我想在其上投影一个点.我知道.project和.interpolate.但是,当该点在该线段“外部”时,我不希望该线段上最近的点,而是要扩展该线段并绘制一条穿过该点并与(延伸的)线段正交的线.我想要投影的坐标. 例如,如果该点在“段内

  • 如何在python2中使用geopandas移动多面体2019-10-26 17:59:35

    我是python(geopandas,shapely等)的GIS世界的新手.我需要向上“移动”一个Multipolygon,但是我不知道该怎么做. 问题 import pandas as pd import numpy as np import matplotlib from matplotlib import pyplot as plt import seaborn as sns import pysal as ps from pysal.cont

  • Python无法正常导入2019-10-09 07:07:33

    我在Mac OSX上使用Python3.4,并且尝试导入整形.但是,我无法这样做.这是我的回溯: from shapely.geometry import Point File "/Users/tc9/Library/Python/3.4/lib/python/site-packages/shapely/geometry/__init__.py", line 4, in <module> from .base import CAP_STYLE

  • python – 在Point的任一侧获取LineString上的顶点2019-10-09 03:06:14

    我有一个匀称的LineString,并定义了一个沿着LineString的形状Point. 如何找到位于该点两侧的LineString的顶点? (将线分成两部分)解决方法:在PointString中找到该点所在的线段.然后相应地将LineString的顶点分成两组.要定位线段,只需将点/线段交叉测试应用于每个线段. from shapely

  • python – 拆分自相交多边形只返回Shapely中的一个多边形2019-10-08 04:57:17

    我在Windows 7 64位,匀称版本1.5.13使用Python 3.5 64位. 我有以下代码返回一个自相交的多边形: import numpy as np from shapely.geometry import Polygon, MultiPolygon import matplotlib.pyplot as plt x = np.array([ 0.38517325, 0.40859912, 0.43296919, 0.4583215 ,

  • python – 适用于dateframe的Pandas生成’<内置方法值...'2019-10-08 00:59:37

    我正在尝试构建一个GeoJSON object.我的输入是一个带有地址列,lat列和lon列的csv.然后,我从坐标中创建了Shapely点,用给定的半径缓冲它们,并通过映射选项获得坐标字典 – 到目前为止,非常好.然后,在参考this question之后,我编写了以下函数来获得一系列字典:     def make_geojs

  • python – 确定Shapely点是否在LineString / MultiLineString中2019-10-02 01:55:10

    我试图在函数内使用Shapely来进行LineString和Point文件的“空间连接”(FYI,点文件是使用LineString上的插值函数生成的).问题是 – 什么都没有归还. # this condition is never satisfied if point.within(line): # here I write stuff to a file 哪里: point = POINT (-976

  • python – 在Shapely中查找多边形上最近点的坐标2019-09-30 17:59:10

    说我有以下多边形和点: >>> poly = Polygon([(0, 0), (2, 8), (14, 10), (6, 1)]) >>> point = Point(12, 4) 我可以计算点到多边形的距离…… >>> dist = point.distance(poly) >>> print(dist) 2.49136439561 …但我想知道最短距离所测量的多边形边界上的点的坐标. 我最初的

  • python – 计算两个矩形之间的重叠区域2019-09-30 04:55:52

    我想计算红色和蓝色矩形之间的重叠区域“THE GREY REGION”. 每个矩形由其四个角坐标定义.重叠区域的结果单位是单位平方. 我无法想象我该怎么办? 任何有创意的评论将不胜感激.解决方法:这种类型的交叉点很容易通过“最小值”和“最大值”的想法来完成.要写出来,需要一个矩形的特定

  • python – Shapely中两个几何的最近点的坐标2019-09-26 22:57:52

    存在具有顶点坐标列表的折线= [(x1,y1),(x2,y2),(x3,y3),…]和点(x,y).在Shapely中,geometry1.distance(geometry2)返回两个几何之间的最短距离. >>> from shapely.geometry import LineString, Point >>> line = LineString([(0, 0), (5, 7), (12, 6)]) # geometry2 >>> list(l

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有