fatiando / verde

Processing and gridding spatial data, machine-learning style
https://www.fatiando.org/verde
BSD 3-Clause "New" or "Revised" License
607 stars 72 forks source link

Support n-dimensional coordinates in scatter_points #196

Open santisoler opened 5 years ago

santisoler commented 5 years ago

Description of the desired feature

Similarly to #138, verde.scatter_points assumes that region is [W, E, S, N], producing a random scatter set of points in 2D. Currently it only allows to add extra dimensions through the extra_coords argument, although they will have constant values. Would be nice that verde.scatter_points allows a more general region and returns random n-dimensional coordinates.

For example:

import verde as vd

easting, northing, vertical = vd.scatter_points(
    region=[-100, 100, -100, 100, 10, 50], size=1000
)

This would be useful when working with harmonic functions, where each data point is given by three dimensional coordinates.

Are you willing to help implement and maintain this feature? Yes

leouieda commented 5 years ago

:+1: thanks for opening this! It would be good to have this kind of support on all coordinate generation functions.