Home › Roadmap › GIS Fundamentals › Part 8

GeoPandas

📘 পাইথনে ভেক্টর GIS ডেটা।

🌐 Vector GIS data in Python.

🗺️ জিআইএস মৌলিক🎚 Intermediate📍 Part 8 / 12🧩 3 সাব-টপিক
🗺️
1

ধারণা · Concept

কী এবং কেন
📘 বাংলা ব্যাখ্যা:
পাইথনে ভেক্টর GIS ডেটা।
🌐 English:
Vector GIS data in Python.

🗂 কোথায় পড়ে

৫. জিওএআই → জিআইএস মৌলিক → GeoPandas

🎯 এই শাখার লক্ষ্য

Handle CRS, vector/raster data, spatial SQL and web maps

🧰 টুলস

QGIS, GeoPandas, PostGIS, Leaflet

🪜

ধাপে ধাপে শিখুন · Step-by-step

কেন শিখবেন → কীভাবে শিখবেন → উদাহরণ → সাধারণ ভুল
💡 কেন গুরুত্বপূর্ণ?

Python-এ ভেক্টর GIS—স্বয়ংক্রিয়, পুনরুৎপাদনযোগ্য বিশ্লেষণ।

  1. ধাপ 1
    gpd.read_file("districts.gpkg") — GeoDataFrame, বিশেষ geometry কলাম
  2. ধাপ 2
    pandas-এর সব কাজ + স্থানিক: area, centroid, distance, buffer
  3. ধাপ 3
    CSV থেকে পয়েন্ট: gpd.points_from_xy(df.lon, df.lat, crs=4326)
  4. ধাপ 4
    gdf.plot(column="rate", legend=True), gdf.explore() (ইন্টারঅ্যাক্টিভ), to_file দিয়ে সেভ

🧪 বাস্তব উদাহরণ

gdf["area_km2"] = gdf.to_crs(32646).area / 1e6 — প্রতিটি জেলার ক্ষেত্রফল।

⚠️ সাধারণ ভুল

lon ও lat উল্টো দেওয়া (points_from_xy(x=lon, y=lat))।

🔑 মূল শব্দ (Key terms)

GeoPandasGeoDataFramegeometrypoints_from_xyexplore

3

সাব-টপিক ও বিস্তারিত · Sub-topics

টপিক → সাব-টপিক → সাব-সাব টপিক
8.1 GeoDataFrame ও geometry কলাম
8.2 read_file, plot, explore
8.3 sjoin ও dissolve
🎬

ভিডিও · Videos (বাংলা ও English)

ক্লিক করলে সাইটের ভেতরেই ফ্লোটিং প্লেয়ারে চলবে · ভিডিও MySQL-এ সংরক্ষিত
💻

হাতে-কলমে · Try it (GIS Fundamentals)

এডিট করে Run চাপুন · Ctrl+Enter
import numpy as np, matplotlib.pyplot as plt
# Buffer & point-in-polygon without GIS libs
poly=np.array([[90.3,23.7],[90.5,23.7],[90.5,23.9],[90.3,23.9]])  # Dhaka bbox (lon,lat)
pts=np.random.default_rng(1).uniform([90.2,23.6],[90.6,24.0],(60,2))
inside=(pts[:,0]>=90.3)&(pts[:,0]<=90.5)&(pts[:,1]>=23.7)&(pts[:,1]<=23.9)
print("Points inside polygon:",inside.sum(),"/",len(pts))
plt.fill(*poly.T,alpha=.25); plt.scatter(*pts.T,c=np.where(inside,"#059669","#ef4444"),s=18)
plt.gca().set_aspect(1); plt.title("Point-in-polygon (spatial join idea)"); plt.show()
❓

সেল্ফ-চেক · Self check

🔗

সংযুক্ত কনসেপ্ট · Connected concepts

← আগের টপিকBuffer & Proximity Analysisপরের টপিক →Rasterio & Xarray
🎬 Video