mpas_tools.mesh.creation.signed_distance.distance_from_geojson¶
- 
mpas_tools.mesh.creation.signed_distance.distance_from_geojson(fc, lon_grd, lat_grd, earth_radius, nn_search, max_length=None)[source]¶
- Get the distance for each point on a lon/lat grid from the closest point on the boundary of the geojson regions. - Parameters
- fc (geometrics_features.FeatureCollection) – The regions to be rasterized 
- lon_grd (numpy.ndarray) – A 1D array of evenly spaced longitude values 
- lat_grd (numpy.ndarray) – A 1D array of evenly spaced latitude values 
- earth_radius (float) – Earth radius in meters 
- nn_search ({'kdtree', 'flann'}) – The method used to find the nearest point on the shape boundary 
- max_length (float, optional) – The maximum distance (in degrees) between points on the boundary of the geojson region. If the boundary is too coarse, it will be subdivided. 
 
- Returns
- distance (numpy.ndarray) – A 2D field of distances to the shape boundary