how to successfully install pyproj and geopandas?

I have tried to install geopandas via I python by running !pip install geopandas, but this fails with "python setup.py egg_info" failed with error code 1 and then Path to long directory. I read...

GeoPandas Label Polygons

Given the shape file available here: I'd like to label each polygon (county) in the map. Is this possible with GeoPandas? import geopandas as gpd import matplotlib.pyplot as plt %matplotlib...

Relocating legend from GeoPandas plot

I'm plotting a map with legends using the GeoPandas plotting function. When I plot, my legends appear in the upper right corner of the figure. Here is how it looks like: I wanted to move the...

Import error geopandas, fiona

I have an error with import geopandas, fiona. When I'm trying to import geopandas import geopandas as gpd It returns...

Error installing geopandas:" A GDAL API version must be specified " in Anaconda

This error raised while installing geopandas. I've looking for its solution on the web, but none of them really explain what happened and how to solve it.. This is the full error: Collecting...

Python: why do I get an error when I import geopandas?

I try to import geopandas in my jupyter notebook. import geopandas as gp and I get the following error: ImportError:...

PyInstaller: StopIteration Error when I import geopandas

I am trying to execute PyInstaller on a my script. I installed all of the required packages and the .exe is succesfully created. But when I execute it on another machine, I get he Following...

Plot German states using geopandas

I need to plot German states using geopandas. Where could I find .shp file for Germany which has either state/city borders?

Plotted map from shape file seems distorted

I'm trying to plot a map of Germany but the plot seems distorted to me. I would like to get an outcome that looks more like this: The first plot I generated from a shape file the following way...

ImportError: cannot import name 'rcParams' from 'matplotlib'

I have tried to uninstall and reinstall matplotlib in my tf-gpu enviornment I made but I keep getting this error: ImportError: cannot import name 'rcParams' from 'matplotlib' This is the entire...

'Unsupported driver' error when writing Geodataframe to file in geopandas

I am reading in a GeoJson file, applying some functions to it and then want to save the GeoDataFrame to another file. Here's my code: import geopandas as...

Conda install some-package hangs with (Solving environment: failed)

I have tried multiple ways but can't conda install packages (in my case, geopandas). I tried geopandas install guide, but get output that the solver runs forever. I tried without creating an...

Python : How to place a shapefile on top of raster file in one plot, and then save the plot in a Jpeg file format

I am posting this question after three days searching the net but no success. Hope can get the answer here. Please do NOT delete the post as I did not find an answer for it here also. Thanks. I...

How to extract a profile of value from a raster along a given line?

How to extract a profile of values from a raster along a given shapefile line in Python? I am struggling finding a method to extract a profile of values (e.g. topographic profile) from a raster...

geopandas: from a column of coordinate list to geometry

I have a DataFrame which has a column of coordinates list looks like the following: I want to make this DataFrame a GeoPandas DataFrame with a geometry column. One way for doing this is to create...

How to fill holes in Multi-polygons created when dissolving geodataframe with geopandas?

I'm aiming to plot the boundaries of clusters of MSOAs (contiguous geographical units in UK) to do so I've downloaded a shapefile of MSOA boundaries from here. I then add a column of cluster...

How to create a scalebar using cartopy and matplotlib?

in respect to the previous examples in stackoverflow, I searched for other alternatives in order to create a scalebar. In my research, I verified that the Basemap class from mpl_toolkits.basemap...

Python Georasters: geotiff image into geopandas dataframe or pandas dataframe?

I want to convert geotiff file into geopandas dataframe or pandas dataframe. I found this solution here but #!pip3 install georasters import georasters as gr import pandas myRaster =...

Spatial merge/combine of multiple netcdf with xarray or satpy

I have two spatial dataset in netcdf format. They have same time, dimensions, coordinates, and data variable. But they are for different spatial coordinates. In below I tried to show my two...

Geopandas + rasterio : isolate a vector as png

I'm trying to isolate the boundary of a city as a single part of a png. My goal is to superimpose this png to very old satellite photos. To do this, I collected a raster file which copies the...

Read shapefile from HDFS with geopandas

I have a shapefile on my HDFS and I would like to import it in my Jupyter Notebook with geopandas (version 0.8.1). I tried the standard read_file() method but it does not recognize the HDFS...

Adding a feature id when writing to file

for creating Tilesets with tippicanoe, i retrieve spacial data from postgis and write it to a .geojson file with geopandas: geodata = gpd.read_postgis("test", engine1,...

CRSError: Invalid projection: epsg:4326: for geopandas

I am using anaconda for geopandas. However, everytime I try to use epsg:4326:, it gives an error. CRSError: Invalid projection: epsg:4326: (Internal Proj Error: proj_create: SQLite error on SELECT...

GeoPandas Convert Geometry Column To Geometry Type

I currently have a geopandas dataframe that looks like this |----|-------|-----|------------------------------------------------| | id | name | ... | geometry ...

Conda install geopandas doing nothing

I'm using conda with Spyder/Python 3.8.8. I'm trying to install the geopandas package through conda-install, but when running it, I receive no output. I've input the command conda install -c...

How to deploy fastapi to google cloud run

I have a fastapi app that I want to deploy to google cloud run. With a gRPC python project, We deploy it as gcloud beta run deploy countries --source . But this doesn't deploy as expected. I...

Insert a geovoronoi library polygon to folium map in Python

To create a Voronoi polygon with geovoronoi lib i use: polyShapes, puntos = voronoi_regions_from_coords(coords, milagroShape) coords is a geoDataFrame object that it contains map´s locations and...

ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly. Importing fiona resulted in:

Trying to read a shapefile (.shp) and received an ImportError after executing the below line of code. I even pip installed GDAL, geopandas, fiona and shapely before executing the below...

PyInstaller: ImportError: cannot import name 'ccompiler' from partially initialized module 'numpy.distutils'

After freezing my program with PyInstaller, I encountered following error while trying to run the executable: ModuleNotFoundError: No module named 'numpy.distutils' After adding numpy.distutils...

mask NetCDF using shapefile and calculate average and anomaly for all polygons within the shapefile

There are several tutorials (example 1, example 2, example 3) about masking NetCDF using shapefile and calculating average measures. However, I was confused with those workflows about masking...