Hello,
I'm having some issues finding my way around the notebooks on pro. I created a geodataframe to then create a point feature class and add it to my gdb. But I cant find the way to create the point feature (and visualize it on a map on pro) and add it to my geodatabase.
# imports
from shapely.geometry import Point
import pandas as pd
import geopandas as gpd
# stations coordinates
data = {'STATION': ['Attard', 'Gharb', 'Msida', 'Zejtun', 'St_Pauls_bay', 'Senglea'],
'X': [14.45, 14.20, 14.49, 14.54, 14.41, 14.51],
'Y': [35.89, 36.07, 35.99, 35.88, 35.95, 35.88]}
# turn the data into a Pandas DataFrame, column names are extracted automatically
df = pd.DataFrame(data)
print(df.head)
# use the coordinates to make shapely Point geometries
geometry = [Point(xy) for xy in zip(df['X'], df['Y'])]
# pandas DataFrame and shapely Points can together become a GeoPandas GeoDataFrame
maltaGDF = gpd.GeoDataFrame(df, geometry=geometry, crs = "EPSG:4326")
print(maltaGDF)
Thanks