import networkx as nx
import osmnx as ox
center_point = (40.4168, -3.7038)
G1 = ox.graph_from_point(center_point, dist=15000, dist_type='bbox', network_type='all',
simplify=True, retain_all=True, truncate_by_edge=False,
clean_periphery=False, custom_filter='["natural"~"water"]')
G2 = ox.graph_from_point(center_point, dist=15000, dist_type='bbox', network_type='all',
simplify=True, retain_all=True, truncate_by_edge=False,
clean_periphery=False, custom_filter='["waterway"~"river"]')
Gwater = nx.compose(G1, G2)