Matching Perimeters and Figuring out CRS issue

I am fresh as a baby’s bottom with coding. Have been learning the last two months and I need help. I am trying to match NASA algorithmic fire growth data to final perimeter data measured on the ground to see if deployed pods are efficient in fire mitigation over time. The fire grows over a 12-hour incremental time in row “t” for as many days as it burns. I can’t just load the data into ArcGIS and do a merge and clip because all the outside pieces of the perimeters get assigned to the last day instead of aligning with the actual day they burned on. I wrote the following code to go over each row, buffer, and clip to the perimeter if it is close enough, if not just leave as is. When I plot this data, I am getting the exact polygons I need in the first code i wrote, but it is giving me a CRS error. I was also told to use for “i in range(len(cameron_peak_sorted))” instead by a supervisor, but when I do that, I doesn’t plot at all. I have both pieces that I wrote below. I know what the majority of this stuff does, but I am brand new to this stuff. Help please! I can only get so far with chat GPT and google haha!

CODE I Wrote:

cameron_peak_sorted = cameron_peak_data_Nasa.sort_values(by='t')
# Convert the first row to a GeoSeries
meters = 100
degrees = meters / 111000  # conversion factor from meters to degrees

cpnasa = cameron_peak_sorted.iloc

for i in cpnasa:
# Convert the first row to a GeoSeries
    current_day_row_nasa = gpd.GeoSeries(i['geometry'])
# Convert OneDay_row_NASA to a GeoDataFrame
    current_day_row_nasa_gdf = gpd.GeoDataFrame(geometry=gpd.GeoSeries(current_day_row_nasa))

    buffered_cameron_peak = cameron_peak_data_NIFC.buffer(degrees)

# Create a unary union of the buffered geometries to handle multiple polygons
    buffered_union = buffered_cameron_peak.unary_union
# Check for intersections and adjust geometries
    current_day_row_nasa_gdf['adjusted_geometry'] = current_day_row_nasa_gdf.apply(
        lambda row: row['geometry'].intersection(buffered_union) if row['geometry'].intersects(buffered_union) else row['geometry'],
        axis=1
     )

# You must now remove the negative buffer
    current_day_row_nasa_gdf['Removebuffered_adjusted_geometry'] = current_day_row_nasa_gdf['adjusted_geometry'].buffer(-degrees)
    current_day_nasa_poly = current_day_row_nasa_gdf['Removebuffered_adjusted_geometry']
    clipped_data = current_day_nasa_poly.intersection(cameron_peak_data_NIFC.unary_union)

    clipped_data.plot()
    plt.plot([],[]," ", label = "Report for " + i.t)
    plt.legend()
    plt.show()

Error:
C:UserselktifAppDataLocalTempipykernel_186242526076382.py:12: UserWarning: Geometry is in a geographic CRS. Results from ‘buffer’ are likely incorrect. Use ‘GeoSeries.to_crs()’ to re-project geometries to a projected CRS before this operation.

CODE I tried to write to meet recommendation by supervisor:

cameron_peak_data_NIFC = cameron_peak_data_NIFC.to_crs("EPSG:4326")

cameron_peak_sorted = cameron_peak_data_Nasa.sort_values(by='t')
meters = 100
degrees = meters / 111000  # conversion factor from meters to degrees
all_clipped_gdfs = []

for i in range(len(cameron_peak_sorted)):
    current_row = cameron_peak_sorted.iloc[i]
    current_day_row_nasa = gpd.GeoSeries(current_row['geometry'])
    current_day_row_nasa_gdf = gpd.GeoDataFrame(geometry=gpd.GeoSeries(current_day_row_nasa))

    buffered_cameron_peak = cameron_peak_data_NIFC.buffer(degrees)

    buffered_union = buffered_cameron_peak.unary_union
    current_day_row_nasa_gdf['adjusted_geometry'] = current_day_row_nasa_gdf.apply(
        lambda row: row['geometry'].intersection(buffered_union) if row['geometry'].intersects(buffered_union) else row['geometry'],
        axis=1
    )

    current_day_row_nasa_gdf['Removebuffered_adjusted_geometry'] = current_day_row_nasa_gdf['adjusted_geometry'].buffer(-degrees)
    current_day_nasa_poly = current_day_row_nasa_gdf['Removebuffered_adjusted_geometry']
    clipped_data = current_day_nasa_poly.intersection(cameron_peak_data_NIFC.unary_union)

    clipped_gdf = gpd.GeoDataFrame(geometry=gpd.GeoSeries(clipped_data))
    all_clipped_gdfs.append(clipped_gdf)

# Concatenate all GeoDataFrames in the list into one GeoDataFrame
all_clipped_gdf = gpd.GeoDataFrame(pd.concat(all_clipped_gdfs, ignore_index=True))

all_clipped_gdf = all_clipped_gdf.to_crs("EPSG:4326")

# Plot the concatenated GeoDataFrame
all_clipped_gdf.plot()
plt.title("Report for " + str(current_row['t']))  # Assuming 't' is a timestamp column in your DataFrame
plt.show()

Final Cameron Peak Fire Perimeter
NASA Algorithmic Fire Growth
Second 12-hour measurement Buffer with final perimeter
Second 12-hour measurement buffer and clip (Final product)
First 2 12-hour measurements final product with CRS Error

New contributor

Tiffany Elkins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật