- Notifications
You must be signed in to change notification settings - Fork 200
Open
Description
@MuellerSeb Hello, I want to use your kriging interpolation method but I'm getting a memory error. How can I overcome this? However, although I waited for the same data in the SmartMap plugin in QGIS, I got a result. Is there anything I can change or suggest I make?
import numpy as np import geopandas as gpd from pykrige.ok import OrdinaryKriging import matplotlib.pyplot as plt gdf = gpd.read_file(r"test_EPSG4326.geojson") X = np.array([gdf.geometry.x, gdf.geometry.y]).T y = gdf['m'].values # Ordinary Kriging OK = OrdinaryKriging(X[:, 0], X[:, 1], y, variogram_model='linear', verbose=True, enable_plotting=False) # İnterpolasyon gridx = np.linspace(X[:, 0].min(), X[:, 0].max(), 100) gridy = np.linspace(X[:, 1].min(), X[:, 1].max(), 100) # Grid grid_z, ss = OK.execute('grid', gridx, gridy) plt.figure(figsize=(10, 6)) plt.contourf(gridx, gridy, grid_z, cmap='coolwarm') plt.scatter(X[:, 0], X[:, 1], c=y, edgecolor='k', cmap='coolwarm') plt.colorbar(label='Maglev Değeri') plt.title('Ordinary Kriging İnterpolasyonu') plt.xlabel('X Koordinatı') plt.ylabel('Y Koordinatı') plt.show() Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

