Questions tagged [geodataframe]

is a pandas.DataFrame that has a column with geometry

Filter by
Sorted by
Tagged with
4 votes
2 answers
89 views

Build land classes from GIS data

I have combined geo-referenced terrain, climate, and soil data with the requirements of the different agricultural food crops in order to build land classes that tell you where which crop can be grown....
0 votes
0 answers
48 views

How to translate from GeoJSON to GeoDataFrame [duplicate]

I want to convert GeoJSON into a GeoDataFrame, but it doesn't work. GeoJSON is stored in a dictionary variable. If you know of a solution, I would like to know how to solve this problem. This is my ...
8 votes
2 answers
11k views

Convert polygon bounding box to geodataframe?

I have a pandas dataframe that contains bounding box information for tiled raster data in the following format. left bottom right top 466583.40921 3135701....
4 votes
2 answers
192 views

Applying geometric operation on multiple GeoDataFrames

I have a collection of geodataframes in my Python environment. How can I apply for each GeoDataFrame the same spatial operation using following manner and create a new variable with the reference that ...
1 vote
2 answers
4k views

Converting (Polyline Data) JSON to GeoDataFrame using GeoPandas

I have this particular json and I want to make the JSON into a GeoDataFrame (with geometry and its attributes); How to set the geometry and attributes to a geodataframe? I have tried using geopandas....
2 votes
0 answers
995 views

Create a GeoDataFrame with more than one geo_column

I am working with PostgreSQL/PostGIS and geopandas. I have tables with more than one geometry. How can I move this kind of tables to geopandas recognizing all the geometries columns? I am using ...
0 votes
1 answer
952 views

Equivalent method for .withcolumn() for geodataframe

I am trying to use a user-defined function in pyspark in order to check whether the points in CANmep_GDF lie within the polygons in gda_GDF. from geopandas import GeoDataFrame def check_exist(geom):...
1 vote
1 answer
2k views

Attempting to get the distance between two Point objects. Getting AttributeError: 'GeoSeries' object has no attribute '_geom'

I am a beginner in GIS. Using the code below to get the distance between two Point objects from two separate GeoDataframe. Using the shapely distance function. Can someone please explain to me what I ...
1 vote
1 answer
480 views

Error while converting Dataframe to Geodataframe

I am trying to convert a table to a shapefile. To do that, I am storing that table in a dataframe and then I am trying to convert that dataframe to geodataframe using GeoPandas. But I am getting an ...
15 votes
1 answer
23k views

Convert GeoJSON to GeoPandas GeoDataframe

I created the following GeoJSON object with this code: from rasterio.features import shapes polys = [] for shape, value in shapes(segments, transform=affine): polys.append(shape) [{'type': '...
4 votes
1 answer
3k views

ValueError geopandas.sjoin: why does it not read my GeoDataFrame?

I'm working on a spatial join between a polygon from a shapefile and points from a CSV file, using geopandas.sjoin. I want to assign each point with a name of the province it is located in. I do know ...
1 vote
1 answer
57 views

GeoDataFrame - Unable to select range of linestrings

df = sample['geometry'] line_gdf = gpd.GeoDataFrame(geometry=[df[2], df[3], df[4], df[5], df[6], df[7], df[8], df[9]]) Above is the manual process of selecting Line Strings In order to select from ...
1 vote
0 answers
513 views

Cannot create geodataframe from feature class due to IndexError: list index out of range

I have a function that helps me read in large feature classes and them create a geodataframe: line_feat = "S_Studies_Ln" cnms_cols = ['REACH_ID', 'STUDY_ID', 'CO_FIPS', 'CID', 'FLD_ZONE', '...
2 votes
1 answer
9k views

CSV to Geodataframe : How to have valid geometry objects?

I'm writing a script with Geopandas. I try to use a csv of blocks to make a spatial join. So I convert it as a Geodataframe. But when I want to set geometry column it returns me Input geometry column ...
2 votes
1 answer
55 views

Retaining last position of vessel position in geodataframe including time series?

I have geodataframe about vessel position which include unique code called 'mmsi' and time series. In the following 'mmsi' column has more than 1 'mmsi' code and time series (* mark). mmsi ...
1 vote
2 answers
4k views

How to pull values from one geodataframe to populate corresponding column/rows in another geodataframe

I have 2 geodataframes; one made from polygons (bldg_res_df) and one from centroid points (parcel_res_df). I used .concat to combine them into a single geodataframe to do some calculations. df_list = ...
2 votes
1 answer
2k views

Why does spatial join on geodataframes return empty result?

I have two geodataframes that I want to perform a spatial join on; one is points, one is polygons. They are both dtype: int64. They both have .crs = {'init': 'epsg:4326'}. I have verified both of them ...
1 vote
1 answer
262 views

Why does geodataframe never complete?

I had a feature class made up of 1,700,000 polygons. I used Geopandas to create a geodataframe: state = "MD" state_gdb = r"C:\Projects\Pop_Alloc\{}_Data.gdb".format(state) join_feat = "{}...
1 vote
2 answers
3k views

How to create a sub dataframe from a dataframe using specific columns

I have a dataframe that has more fields/columns than I want, so I am trying to create a sub dataframe that only has certain fields/columns. The following throws a TypeError: '(['uniqueid'], ['...
2 votes
1 answer
2k views

How to merge geoseries to geodataframe based on geometry attribute

I have 5868 points in a geodataframe with some columns/attributes. Between points which have distance less than 10 m, I just want to select only one point as representation in that area. I have done ...
2 votes
1 answer
3k views

How to convert a spatial Oracle LOB object type to a Geodataframe listlike geometry object column

I have in my dataframe one column with cx_Oracle.LOB object [2D polygon type], made with a SDO_UTIL.TO_WKTGEOMETRY SQL function and I want to create a geodataframe, and set my geometry column the ...
1 vote
0 answers
58 views

Python function like SAGA Grid Gridding?

For a python script, I'm searching for a function that does the same as SAGA Grid gridding, an exponential interpolation on GeoPandas GeoDataFrame. Does anyone know one?
0 votes
1 answer
3k views

Why gdf.explode() doesn't work?

I'm trying to merge 2 geodataframes and combine all entities. So I use : cloudNshadow = gpd.overlay(cloud, shadow, how='union') cloudNshadow = cloudNshadow.unary_union() But it returns me : ...
3 votes
1 answer
6k views

Geometry Data in GeoDataFrame will not plot

I want to import a CSV to use as a geodataframe. When I plot it, nothing shows, which makes me think I'm doing something wrong. Here's my code. import pandas as pd from geopandas import GeoDataFrame ...
0 votes
1 answer
168 views

MapInfo Pro 64-bit - 16.0.3 - Snap Frame to Guideline (unable to?)

I am using MapInfo Pro 64-bit v16.0.3 In the layout, I want to snap my map frame to the guideline. I've noticed that when I create a rectangular box, this snaps to the guidelines once the edge is ...
1 vote
1 answer
1k views

Intersection with Shapely and Fiona gives Key Error

I have written a script for standalone python based on this example for doing intersections of linestrings (representing streets) and polygons (representing gridcells) using shapely/fiona. The ...

1 2
3