Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Wau Cara, você ehh o máximo.Nossa!!
Conteúdo de grande valia.Não encontrei o parâmetro "op". Usei o "predicate" result = gpd.sjoin(left_df=gdf_point, right_df=gdf_polygon, # predicate="intersects", how='left', op='with')
Pode me ajudar por favor?Não estou conseguindo encontrar um ponto dentro do polígono.Dataframe:===================================================================================================gdf_brazil_grid_testeConteúdo : ===================================================================================================30000 POLYGON ((-41.57227 -3.20633, -41.57227 -3.25021, -41.61621 -3.25021, -41.61621 -3.20633, -41.57227 -3.20633))30001 POLYGON ((-41.57227 -3.25021, -41.57227 -3.29408, -41.61621 -3.29408, -41.61621 -3.25021, -41.57227 -3.25021))30002 POLYGON ((-41.57227 -4.25877, -41.57227 -4.30259, -41.61621 -4.30259, -41.61621 -4.25877, -41.57227 -4.25877))30003 POLYGON ((-41.57227 -4.30259, -41.57227 -4.34641, -41.61621 -4.34641, -41.61621 -4.30259, -41.57227 -4.30259))30004 POLYGON ((-41.57227 -4.47786, -41.57227 -4.52167, -41.61621 -4.52167, -41.61621 -4.47786, -41.57227 -4.47786))30005 POLYGON ((-41.57227 -4.52167, -41.57227 -4.56547, -41.61621 -4.56547, -41.61621 -4.52167, -41.57227 -4.52167))30006 POLYGON ((-41.57227 -6.44632, -41.57227 -6.48998, -41.61621 -6.48998, -41.61621 -6.44632, -41.57227 -6.44632))30007 POLYGON ((-41.57227 -6.53364, -41.57227 -6.5773, -41.61621 -6.5773, -41.61621 -6.53364, -41.57227 -6.53364))30008 POLYGON ((-41.57227 -7.01367, -41.57227 -7.05728, -41.61621 -7.05728, -41.61621 -7.01367, -41.57227 -7.01367))30009 POLYGON ((-41.57227 -7.05728, -41.57227 -7.10089, -41.61621 -7.10089, -41.61621 -7.05728, -41.57227 -7.05728))30010 POLYGON ((-41.57227 -7.1445, -41.57227 -7.1881, -41.61621 -7.1881, -41.61621 -7.1445, -41.57227 -7.1445))Name: geometry, dtype: geometryCódigo:===================================================================================================#coordinate_lat_lon: tuple = (-41.57227, -3.25021)# gdf_polygon: gdf = gdf(geometry=[gdf_brazil_grid_teste.loc[30000, 'geometry']], crs='EPSG:4326')gdf_point: gdf = gdf(geometry=[Point(coordinate_lat_lon[1], coordinate_lat_lon[0])], crs=gdf_polygon.crs)gpd.sjoin(left_df=gdf_point, right_df=gdf_polygon, predicate="intersects", how='left')Resultado=================================================================================================== geometry index_right0 POINT (-3.25021 -41.57227) NaN
Ola'... pode entrar em contacto comigo pelo meu linkedin e irei te ajudar de la' www.linkedin.com/in/antonio-macaringue/
Wau Cara, você ehh o máximo.
Nossa!!
Conteúdo de grande valia.
Não encontrei o parâmetro "op". Usei o "predicate"
result = gpd.sjoin(left_df=gdf_point,
right_df=gdf_polygon,
# predicate="intersects",
how='left',
op='with')
Pode me ajudar por favor?
Não estou conseguindo encontrar um ponto dentro do polígono.
Dataframe:
===================================================================================================
gdf_brazil_grid_teste
Conteúdo :
===================================================================================================
30000 POLYGON ((-41.57227 -3.20633, -41.57227 -3.25021, -41.61621 -3.25021, -41.61621 -3.20633, -41.57227 -3.20633))
30001 POLYGON ((-41.57227 -3.25021, -41.57227 -3.29408, -41.61621 -3.29408, -41.61621 -3.25021, -41.57227 -3.25021))
30002 POLYGON ((-41.57227 -4.25877, -41.57227 -4.30259, -41.61621 -4.30259, -41.61621 -4.25877, -41.57227 -4.25877))
30003 POLYGON ((-41.57227 -4.30259, -41.57227 -4.34641, -41.61621 -4.34641, -41.61621 -4.30259, -41.57227 -4.30259))
30004 POLYGON ((-41.57227 -4.47786, -41.57227 -4.52167, -41.61621 -4.52167, -41.61621 -4.47786, -41.57227 -4.47786))
30005 POLYGON ((-41.57227 -4.52167, -41.57227 -4.56547, -41.61621 -4.56547, -41.61621 -4.52167, -41.57227 -4.52167))
30006 POLYGON ((-41.57227 -6.44632, -41.57227 -6.48998, -41.61621 -6.48998, -41.61621 -6.44632, -41.57227 -6.44632))
30007 POLYGON ((-41.57227 -6.53364, -41.57227 -6.5773, -41.61621 -6.5773, -41.61621 -6.53364, -41.57227 -6.53364))
30008 POLYGON ((-41.57227 -7.01367, -41.57227 -7.05728, -41.61621 -7.05728, -41.61621 -7.01367, -41.57227 -7.01367))
30009 POLYGON ((-41.57227 -7.05728, -41.57227 -7.10089, -41.61621 -7.10089, -41.61621 -7.05728, -41.57227 -7.05728))
30010 POLYGON ((-41.57227 -7.1445, -41.57227 -7.1881, -41.61621 -7.1881, -41.61621 -7.1445, -41.57227 -7.1445))
Name: geometry, dtype: geometry
Código:
===================================================================================================
#
coordinate_lat_lon: tuple = (-41.57227, -3.25021)
#
gdf_polygon: gdf = gdf(geometry=[gdf_brazil_grid_teste.loc[30000, 'geometry']],
crs='EPSG:4326')
gdf_point: gdf = gdf(geometry=[Point(coordinate_lat_lon[1],
coordinate_lat_lon[0])],
crs=gdf_polygon.crs)
gpd.sjoin(left_df=gdf_point,
right_df=gdf_polygon,
predicate="intersects",
how='left')
Resultado
===================================================================================================
geometry index_right
0 POINT (-3.25021 -41.57227) NaN
Ola'... pode entrar em contacto comigo pelo meu linkedin e irei te ajudar de la' www.linkedin.com/in/antonio-macaringue/