geopandas

Distance Between Linestring Geopandas

依然范特西╮ 提交于 2019-12-02 09:53:12
问题 I have a shapefile dataset. Some roads (line) have the same name but are located at different places and are not connected. Here is a picture of the roads with a same name in my geopandas datafile: I would like to be able to measure the distance between road chunks (linestrings) to be able to rename the roads if the distance is higher than a threshold, such that each road has its own unique name. Hence, do you know how to find the distance between linestrings ? 回答1: In geopandas, the

centos libgeos repository missing

萝らか妹 提交于 2019-12-01 18:59:00
On centos 7.3 minimal trying to install shapely or geopandas requires access to https://github.com/libgeos/libgeos libgeos. Trying to install this via sudo yum install libgeos-dev tells me that this package is not available. It seems that I am lacking a repository. So far I have been unable to find a working one as http://trac.osgeo.org/geos is pointing to https://yum.postgresql.org/repopackages.php#pg96 for the RPM but still after rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm the installation candidate is not found. It seems

Cannot import Geopandas with PyInstaller executable - despite running fine in the virtual env

ε祈祈猫儿з 提交于 2019-12-01 14:24:11
When my Python application frozen with PyInstaller attempts to import Geopandas, it stops working. Windows 10 PyInstaller 3.3.1 Geopandas 0.4 Here is the source code: print("Hello, StackOverflow") import geopandas as gpd Here is the resulting console output of the compiled EXE: Hello, StackOverflow Traceback (most recent call last): File "application.py", line 3, in <module> File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "d:

Getting counts of intersections between geometries in GeoPandas

邮差的信 提交于 2019-12-01 07:36:30
Is it possible to get counts of intersections between two geometries using GeoPandas objects? That is, I want to count up the number of polygons or line strings in one GeoDataFrame that intersect with each polygon in another GeoDataFrame. I did not see an easy way of doing this while browsing the GeoPandas docs, but wanted to check before moving on to lower-level tools. You want a spatial join: geopandas.tools.sjoin() . There's an example in this Jupyter Notebook — look at the section called Spatial join . This is counting a set of points ( midpoints ) into a set of polygons ( bins ). Both

Choropleth map from Geopandas GeoDataFame

十年热恋 提交于 2019-12-01 06:09:47
I'm trying to make a choropleth map from polygons in a Geopandas GeoDataFrame. I want to symbolize the polygons by quantiles of a value in one of the GeoDataFrame columns. I'm trying to figure out different options and see what best fits my needs. Any advice on this would be greatly appreciated. It appears that Geopandas does have some ability to do this already: http://nbviewer.ipython.org/github/geopandas/geopandas/blob/master/examples/choropleths.ipynb tracts.plot(column='CRIME', scheme='QUANTILES', k=3, colormap='OrRd') This works, although I can't find much documentation. I'd like to be

Getting counts of intersections between geometries in GeoPandas

痴心易碎 提交于 2019-12-01 04:46:33
问题 Is it possible to get counts of intersections between two geometries using GeoPandas objects? That is, I want to count up the number of polygons or line strings in one GeoDataFrame that intersect with each polygon in another GeoDataFrame. I did not see an easy way of doing this while browsing the GeoPandas docs, but wanted to check before moving on to lower-level tools. 回答1: You want a spatial join: geopandas.tools.sjoin() . There's an example in this Jupyter Notebook — look at the section

Choropleth map from Geopandas GeoDataFame

依然范特西╮ 提交于 2019-12-01 03:15:54
问题 I'm trying to make a choropleth map from polygons in a Geopandas GeoDataFrame. I want to symbolize the polygons by quantiles of a value in one of the GeoDataFrame columns. I'm trying to figure out different options and see what best fits my needs. Any advice on this would be greatly appreciated. It appears that Geopandas does have some ability to do this already: http://nbviewer.ipython.org/github/geopandas/geopandas/blob/master/examples/choropleths.ipynb tracts.plot(column='CRIME', scheme=

Installing geopandas on Python 2.6

房东的猫 提交于 2019-12-01 01:08:47
This is in continuation with my earlier question Geospatial Analytics in Python I started a new question to keep the 2 issues logically separate. I have trying to install geopandas on python 2.6 surprisingly, geopandas is already installed by GeoSeries doesn't work and it needs a package "Fiona". I followed the instruction provided here I installed the libraries required by searching and following the suggestions (including dev libraries thinking I'll get the .h files), I am however stuck with these two issues: https://github.com/Toblerity/Fiona after cloning from git and python setup.py

Shapely地理空间几何库,使用手册(英)

北慕城南 提交于 2019-11-30 21:35:20
The Shapely User Manual Author: Sean Gillies, < sean.gillies@gmail.com > Version: 1.2 and 1.3 Date: December 31, 2013 Copyright: This work is licensed under a Creative Commons Attribution 3.0 United States License . Abstract: This document explains how to use the Shapely Python package for computational geometry. Introduction Deterministic spatial analysis is an important component of computational approaches to problems in agriculture, ecology, epidemiology, sociology, and many other fields. What is the surveyed perimeter/area ratio of these patches of animal habitat? Which properties in this

GeoPandas官方中文文档--译著

邮差的信 提交于 2019-11-30 21:34:22
GeoPandas是基于Pandas的扩展,增加了地理空间几何对象的处理,本文翻译来自于 http://www.cnblogs.com/giserliu/p/4988615.html 。原文和工程在 http://geopandas.org/ 。 GeoPandas官方中文文档--译著 译自 GeoPandas 0.1.0 文档 (原版译著,有错误欢迎交流,转载请注明)   GeoPandas是一个开源项目,它的目的是使得在Python下更方便的处理地理空间数据。GeoPandas扩展了pandas的数据类型,允许其在几何类型上进行空间操作。几何操作由 shapely 执行。 GeoPandas进一步依赖于 fiona 进行文件存取和 descartes , matplotlib 进行绘图。 描述 GeoPandas 的目的是在Python下更容易处理地理数据。它结合了pandas和shaply的功能,提供在pandas下的空间操作和shapel下高层次的处理 多几何构型的接口。GeoPandas 允许你很容易的用Python进行操作,不然的话,你将不得不用一个空间数据库去处理,如PostGIS。 安装 笔者目前的发现版本是0.1,安装,可以使用pip或easy_install: pip install geopandas 你也可以通过克隆 GitHub