Hello,
I am trying to generate a base map that, visualize the block boundaries on it, and map the block names to their respective block (please see attached image). I have 2 dataset to achieve that, blocks.shp and blocks.dbf.
Here is a snippet of my code:
import pygmt
fig = pygmt.Figure()
xmin = -92
xmax = -91.3
ymin = 28
ymax = 28.5
region = [xmin, xmax, ymin, ymax]
projection = f"M{(xmin+xmax)/2}/{(ymin+ymax)/2}/10c"
fig.basemap(region=region, projection=projection, frame=True)
# protraction boundaries
fig.plot(
data='/content/protrac.shp',
region=region,
projection=projection,
pen='black'
)
# block boundaries
fig.plot(
data='/content/blocks.shp', # Replace 'block_shapefile.shp' with the actual filename and path
region=region,
projection=projection,
)
#Proposed code to map the block names but I am sure this is wrong
fig.plot(
data='/content/blocks.dbf', # Replace 'block_shapefile.shp' with the actual filename and path
region=region,
projection=projection,
)
fig.plot(
x=-91.4616,
y=28.3668,
style='a0.1i',
color='red',
pen='black',
label='BH_Well',
)
fig.legend(position="JTR+jTR+o0.2c/0.2c", box=True)
with pygmt.config(FONT_TITLE=8):
fig.basemap(rose="jTL+w1.3c+lO,E,S,N+o-0.1c/3c")
fig.savefig("gulf_of_mexico_bathymetry.png")
fig.show()
Thank you