Skip to content

Memory Issues #299

@oguzhannysr

Description

@oguzhannysr

@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() 

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions