Python sjoin返回空的GeoDataFrame

Python sjoin返回空的GeoDataFrame,python,pandas,geopandas,Python,Pandas,Geopandas,在下面的代码中,我希望得到与几何体相交的pointsGeometry中的所有点LIDARAsGDF 首先,如代码所示,我将点几何转换为地理数据框,然后使用 points_in_polygons_gdf = gpd.sjoin(pointsGeometryAsGDF, LIDARAsGDF, op='within', how='inner') 但是当我在gdf中打印点的内容时,我得到: INFO:root:points_in_polygons_gdf: Empty GeoDataFrame Co

在下面的代码中,我希望得到与几何体相交的
pointsGeometry
中的所有点
LIDARAsGDF
首先,如代码所示,我将
点几何
转换为地理数据框,然后使用

points_in_polygons_gdf = gpd.sjoin(pointsGeometryAsGDF, LIDARAsGDF, op='within', how='inner')
但是当我在gdf中打印
点的内容时,我得到:

INFO:root:points_in_polygons_gdf: Empty GeoDataFrame
Columns: [geometry, index_right]
Index: []
请让我知道如何修复此错误

代码

LIDARAsPolygons = bindPolygonCoordinates(polygonLongitudeValuesArray, polygonLatitudeValuesArray)
LIDARAsGDF = buildGeoDataFrameForGeometry(LIDARAsPolygons)
boundingBoxLonMin,boundingBoxLatMin,boundingBoxLonMax,boundingBoxLatMax = getPolygonTotalBounds(LIDARAsGDF)
pointsGeometry = [Point(xy) for xy in zip(polygonLongitudeValuesArray,polygonLatitudeValuesArray)]
logger.info("pointsGeometry: %s"%(pointsGeometry))############has values
pointsGeometryAsGDF = buildGeoDataFrameForPoint(pointsGeometry)
logger.info("pointsGeometryAsGDF: %s"%(pointsGeometryAsGDF))############has values
points_in_polygons_gdf = gpd.sjoin(pointsGeometryAsGDF, LIDARAsGDF, op='within', how='inner')
LIDARAsGDF.to_file(filename=ioUtils.getPathToOutputDir() + '/' + 'LIDAR-Data.shp', driver="ESRI Shapefile")
logger.info("points_in_polygons_gdf: %s"%str(points_in_polygons_gdf))


def bindPolygonCoordinates(longitudeValuesArray, latitudeValuesArray):
    return Polygon(zip(longitudeValuesArray, latitudeValuesArray))
    
def buildGeoDataFrameForPoint(point):
    crs = {'init': 'epsg:4326'}
    return gpd.GeoDataFrame(crs=crs, geometry=point)