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

Trying to loop through different polygons, and find the points within those polygons

I have 2 datasets: admin_area.shp - contains polygon district data which has index, names, geometry point_data.shp - contains point data which has index, lat, lon, geometry I want to loop through each polygon within admin_area, then for each area…
0
votes
0 answers

plotly map from json polygon is very slow

I am building a small app in Dash where I want to plot data on a map. I am loading a geojson file that holds my countries regions delimitation using geopandas. I made a test dataframe containing random values for some regions. I am ploting eveything…
Victor Gl
  • 81
  • 1
  • 8
0
votes
0 answers

Label Position Folium

I want to change the position of an folium map legend, I searched and tried a lot but it is not working. fill_color="OrRd", fill_opacity=0.55, line_opacity=.35, highlight=True, show=False, line_color='black', …
0
votes
0 answers

I am trying to read shape file from geopandas library using gpd.read_file() DriverError: not recognized as a supported file format. ERROR

DriverError: '/vsizip//vsimem/3a044273ad394c659206ed9154647032.zip' not recognized as a supported file format. I am trying to read shape file link which is on my github using gpd.read_file() but I got this error help me please DriverError:…
0
votes
0 answers

Python tool to get an outline map of counties/states given the bounding coordinates?

I am looking for a python tool that gives me the county and/or state boundaries in an image format if I provide the 4 corners in lat/lon coordinates. I plan to overlay some satellite images on these. I briefly dabbled with geopandas and I could get…
SEU
  • 1,304
  • 4
  • 15
  • 36
0
votes
1 answer

Subset geopandas dataframe return nonetype

I have a few geodataframes with geometry type linestring and point and I'd like to subset each gdf into 2 based on geometry type. I used below code to subset it: gdf1_line = gdf1[gdf1['geometry'].geom_type == 'LineString'] gdf1_point =…
0
votes
0 answers

How to read large csv files of AIS data in Pandas and sort by mmsi?

I currently have a large (~2.5GB) csv file containing AIS data ('mmsi', 'date_time_utc', 'lon', 'lat', 'sog', 'cog', 'true_heading', 'nav_status', 'message_nr') for all vessels within a specific area. However, when I try to use pandas to create…
OlK
  • 1
  • 1
0
votes
0 answers

Trying to add column with city names in dataframe based on columns that contains longitude and latitude/ or spatial join with shp file?

I have a csv file with 2 columns which contain long and lat location, but there is not one column wheres the city name is specified. To do so, I use python and I want to make a spatial join with a shp/shx file with every city from France. The csv…
TMB
  • 15
  • 2
0
votes
0 answers

How to turn individual points into a kernel density map?

I am trying to recreate in Python a map I made in Tableau. I'm pretty sure it's called a kernel density map (just "density" map in Tableau). Each point is just a single point and doesn't correspond with any kind of value. I have plotted my points…
0
votes
0 answers

FutureWarning when creating an empty GeoSeries

I'm trying to create an empty GeoSeries which is later populated with geometries: import geopandas as gpd x = gpd.GeoSeries() This gives me the following warning: FutureWarning: The default dtype for empty Series will be 'object' instead of…
0
votes
1 answer

how to get list of all points in a multipolygon in Python?

I have a csv file that contains a column that contains multipolygon representation of NYC. Meaning, NYC is divided into multi-polygons and those multi-polygons are stored in a column called the_geom in the csv file I have. My question is how can I…
abs8090
  • 111
  • 2
  • 9
0
votes
0 answers

Having trouble creating a mask to plot coordinates on a map

I have been working on this dataset for a while now trying to plot some coordinates on a simple map of the US to create a density map. I easily created the map in Tableau, but I want to be able to make a similar map in Python. The following picture…
0
votes
1 answer

multiprocessing a geopandas.overlay() throws no error but seemingly never completes

I'm trying to pass a geopandas.overlay() to multiprocessing to speed it up. I have used custom functions and functools to partially fill function inputs and then pass the iterative component to the function to produce a series of dataframes that I…
MrKingsley
  • 171
  • 1
  • 10
0
votes
0 answers

Shapely polygon creates straight lines between points where it shouldn't

I'm using shapely within Python. I created a polygon using coordinates; however, when I plot it, it creates random straight lines between points where it should not. Here is what it looks like: And here is what I want the perimeter to look like…
0
votes
0 answers

Check to see if coordinates fall inside/outside of a shapefile polygon in Python

I am working with shapefiles and DataFrames that contain longitude and latitude coordinates. What I want to do is see if the coordinates within the DataFrames fall outside of the shapefile polygons and select those to a new DataFrame. I converted…