I have read in a KML file of CA firezones and for a certain area (around LOMPOC, CA), it seems to include anything inside a non-fire zone doughnut hole. Most of the processing is fine, just there are a few areas surrounded by fire zone where areas outside of the zones are included as being in the fire zone areas.
Is there some way to fix the issue or use another approach?
The fire threat maps are here: https://www.cpuc.ca.gov/FireThreatMaps/
I am using the KMZ files unzipped to KML.
import geopandas as gpd import matplotlib.pyplot as plt gpd.io.file.fiona.drvsupport.supported_drivers['KML'] = 'rw' fp = "CPUC_Fire-Threat_Map.kml" polys = gpd.read_file(fp, driver='KML') Tier2 = polys.loc[polys['Name']=='Tier 2'] Tier2.reset_index(drop=True, inplace=True) #test points - visually compared on map POINT_DOUGHNUT = Point(-120.441806,34.652998) POINT_INSIDE = Point(-120.142221,34.66407) POINT_OUTSIDE = Point(-119.471006,36.414549) POINT_INSIDE.within(Tier2.loc[0, 'geometry']) > True (correct) POINT_OUTSIDE.within(Tier2.loc[0, 'geometry']) > False (correct) POINT_DOUGHNUT.within(Tier2.loc[0, 'geometry']) > True (wrong -- should be false)
To add the area that seems to be the problem: