Questions tagged [geodataframe]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
8 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 = ...
1
vote
1answer
57 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
1answer
29 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
2answers
26 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
1answer
83 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 ...
0
votes
1answer
50 views

Geopandas intersects/contains fails between GeoDataFrames

I am struggling to make the GeoDataFrame functions: intersects/contains work between GeoDataFrames instances. Let t be a GeoDataFrame with contents: id ...
0
votes
1answer
57 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):...
0
votes
0answers
39 views

Locating observations that lies within a collection of Polygons (Python)

I'm trying to locate the observations that lie within a collection of Polygons but my current implementation takes forever, and I suspect that it is because the 'within' method needs to check all ...
0
votes
0answers
64 views

Issue with GeoPandas method 'contains' for two GeoDataFrames

I want to verify that a GeoDataFrame called mask2 COMPLETELY CONTAINS all the linestrings in another GeoDataFrame called transect_file2. In the image is clearly visible that transect number 16 (TR_ID=...
2
votes
1answer
293 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 ...
0
votes
1answer
118 views

How to create a shapefile [polygon type] from a Geodataframe, returned from a Oracle Spatial cursor with geometry column type=cx_Oracle.LOB?

I'm trying to create a shapefile [2D polygon type] with a Geodataframe, that result from a SQL made to a Oracle Spatial database. The SQL and the Geodataframe creation runs without errors, but when I ...
1
vote
0answers
28 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
1answer
668 views

How to convert GeoSeries polygons to lists of coordinates?

I have a GeoDataFrame consisting polygons. How can I convert each polygon into a list of coordinates? Is there any attribute, method or function in GeoPandas to do this?
3
votes
1answer
1k 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....
2
votes
1answer
2k 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
1answer
104 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 ...
0
votes
1answer
557 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 : ...
1
vote
1answer
481 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 ...
4
votes
2answers
5k views

Create a polygon grid using with Geopandas

I'm working with a geodataframe of points and I need to create a grid of rectangular polygons. I know how to have bounds of the geodataframe with gdf.geometry.bounds. Now using this information and ...
0
votes
1answer
3k 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 ...