Skip to content

kriged grid with the style 'masked' #208

Closed

Description

@OusBNH

Hello and Thanks for your tool,
I am trying to use the style 'masked' for a basin but i don't understand how i can use the Parameters mask.

import geopandas as gpd
from pykrige.uk import UniversalKriging
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

delimitation_shp = gpd.read_file(r"C:\Users\oboun\zzzzzz\stage\sig_complement\Délimitation_administrative_des_ABH.shp")
bassin1 = delimitation_shp[delimitation_shp["OBJECTID"]==5]
xmin,ymin,xmax,ymax = bassin1.total_bounds
xmin-=0.1
ymin-=0.1
xmax+=0.1
ymax+=0.1
data = np.genfromtxt(r"C:\Users\zzzzzz\Desktop\stage\sig_complement\CSVTOTAL.csv", delimiter=',', skip_header=1)
data = data[data[:,2]>=xmin]
data = data[data[:,2]<=xmax]
data = data[data[:,1]>=ymin]
data = data[data[:,1]<=ymax]

gridx = np.arange(xmin, xmax, 0.06)
gridy = np.arange(ymin,ymax, 0.06)

UK = UniversalKriging(
    data[:, 2],
    data[:, 1],
    data[:, 3],
    variogram_model="spherical",
)

z, ss = UK.execute("masked",gridx, gridy, mask=)

so the objectif is to calculate the uk just inside the basin.
bassin.PNG

Activity

  1. changed the title [-]calculates a kriged grid with the style 'masked'[/-] [+]kriged grid with the style 'masked'[/+] on Jul 20, 2021
  2. locked and limited conversation to collaborators on Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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