I generated a buffer using this question: Creating buffer circle x kilometers from point using Python?
I did an intersection with this buffer and a shapefile using:
intersection_origem = shp_geom.intersection(Polygon(buffer_origem))
The "intersection_origem" looks like above:
Apparently nothing wrong with it, but I need just the not null values like it's from 2595 to 2597. Is there a "filter" that can do what I need?
I tried the code above but with no success:
for i in range(0,intersection_origem.length):
if (intersection_origem[i] != ""):
print(intersection_origem[i])
None
is the usual Python equivalent ofNULL
-- Empty string is a valid string with length zero. You should always debug the type of the data when in doubt.