Questions tagged [geopandas]

GeoPandas is an open source project to make working with geospatial data in python easier. GeoPandas extends the datatypes used by pandas to allow spatial operations on geometric types.

GeoPandas is an open source project to make working with geospatial data in python easier. GeoPandas extends the datatypes used by pandas to allow spatial operations on geometric types.

Geometric operations are performed by shapely. Geopandas further depends on fiona for file access and descartes and matplotlib for plotting.

If you're having trouble running or installing geopandas, it is recommended that you use conda to install geopandas into a new conda environment. When installing the GIS stack, it's recommended that you pull all of the dependencies from a single channel (e.g., only from the default channel or only from conda-forge):

> conda create --name=gis python=3.7 geopandas --channel=conda-forge

Resources:

2652 questions
0
votes
0 answers

getting 6 equally spaced points from a sequence of linestring in python

I have data whose geometry is a sequence of line strings. From this geometry, we intend to obtain 6 equally spaced points. I have tried using the np.linspace and the np.arrange functions but I can't get what I am looking for. Kindly help me with the…
0
votes
1 answer

How can I plot a map of a specfic country using plotly

Using geopandas and matplotlib I have ploted a map of india showing Air Quality Index. The link to my data is: https://drive.google.com/file/d/1-xihM-LCB6dNfONbK28CJWOP_PVgXA8C/view?usp=share_link I want to plot an interactive map with names of the…
Najo
  • 1
  • 1
0
votes
0 answers

How to plot geographical data with Plotly

I know my question might sound a bit too general but I actually just need some guidance to start learning geographical plotting with Plotly package iin python. I'm following guides on the internet but I never really manage to replicate the method…
StackyGuy
  • 37
  • 7
0
votes
0 answers

Python intersection test on multiple polygons in nested for loop results in only one MultiLinestring, when expecting multiple outputs

baby programmer here so apologies if this is a simple fix, however I am running a test to see where multiple polygons and multipolygons intersect, using two identical lists to loop through the whole dataset. The dataset is a geoseries of length 200,…
wodseaur
  • 1
  • 2
0
votes
0 answers

RuntimeWarning: overflow encountered in double_scalars in visualizing shapefile with geopandas.plot()

I want to visualize the shapefile data about Iran accidents in googlecolab, but when I try to read it as Geopaandas data frame the plot function is not working correctly, would you please advise me on this issue, import pandas as pd import…
fatane
  • 5
  • 7
0
votes
1 answer

Trouble visualize GIS data with Geopandas.plot()

I want to visualize the GIS data about Iran accidents in googlecolab, I have latitude, longitude, and death_count information but when I try to read it as Geopaandas data frame the plot function is not working correctly, May you please advise me on…
fatane
  • 5
  • 7
0
votes
0 answers

AttributeError: module 'pysal' has no attribute 'pdio'

I'm currently learning how to use PySAL (http://darribas.org/gds_scipy16/ipynb_md/01_data_processing.html) and I've come across some problems when trying to use PySAL functions. After succesfully loading pysal as ps, I'm trying to use ps.pdio, but…
HM_ft
  • 98
  • 5
0
votes
2 answers

PyInstaller failing to build exe -- cannot find pyproj.libs

Here's the traceback: Traceback (most recent call last): File "main.py", line 5, in File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "
primitivist
  • 805
  • 10
  • 18
0
votes
0 answers

geopandas choropleth: Dataframe object has no attribute "total_bounds"

I keep getting this error whenever I try to plot a choropleth: AttributeError Traceback (most recent call last) Input In [337], in () 13 scheme =mc.EqualInterval(pro['total'], k=10)#…
Jahrakal
  • 29
  • 4
0
votes
0 answers

Pyproj transformation of a geopandas does not match QGIS reprojection

I have a file in British National Grid coordinates (EPSG 27700) which I'm trying to convert to WGS84 (EPSG 4326) My first attempt was to transform in the usual way import geopandas as gpd file = '27700.gpkg' sh = gpd.read_file(file) sh =…
0
votes
1 answer

A Polygon that covers land and oceans?

I need a polygon that covers land and oceans. I found each polygon separately and used the function dissolve but the result did not make sense ( i have a big rectangle as shown below). Here is the code # world polygon world =…
bravopapa
  • 309
  • 1
  • 10
0
votes
0 answers

Plotting Data from Pandas Dataframe with Cartopy

I'm Looking to build a bubble map of Europe that contains agricultural data. Each row has a bunch of data segmented by country, and coordinates that coincide with the data. My plot looks like the code below, and I can't manage to get all of my…
0
votes
0 answers

spatial geo dataframe clipped by a polygon yield error, even from office document example in python

From the geopandas example, using world.clip(polygon), I got error as below, same error as I tried on my own cliping code. It said it's type mismatch, so to use astype(str()), but that didn't fix my…
Barry
  • 13
  • 1
0
votes
0 answers

How to assign a geo-label (x,y coordinate) for each square in a grid system using python

I am trying to design a grid system that can be applied to any forms of building/facility, and each squares in the grid system can be explained by 4 specific coordinates(bottomLeft/bottomRight/utopLeft/topRight). My bounding box coordinates for my…
0
votes
0 answers

I am not able to read .shp files anymore after installing pygeos. What is the problem?

I am not able to read shape files anymore after installing pygeos. What a mess! these lines used to work fine files = glob.iglob(path_to_data+shapes_folder+'*.shp') gdfs = [gpd.read_file(file).to_crs(crs) for file in files] But when I installed…
bravopapa
  • 309
  • 1
  • 10
1 2 3
99
100