Skip to content

Add point, polyline, and polygon intersection capabilities #536

@jdhughes-dev

Description

@jdhughes-dev

Here are some thoughts related to March 2019 developer meeting at Delft.

Possible Dependencies

geopandas, shapely, others

Projections, sampling, etc

Initial thoughts for syntax of calls

Point shape to grid for boundary conditions

>>> mg = modelgrid
>>> int_dict = mg.get_cellids(shp_xy, type=POINT)
>>> list(int_dict.keys()) 
['cellids', 'point_id']
>>> wel_spd = [((cellid), q) for cellid, q in zip(int_dict['cellids'], qs)]

or

>>> wel_spd = [((cellid), q) for cellid, q in zip(int_dict.cellids, qs)]

Polyline shape to grid for boundary conditions

>>> mg = modelgrid
>>> int_dict = mg.get_cellids(shp_poly, type=POLYLINE)
>>> list(int_dict.keys()) 
['cellids', 'poly_id', 'length']

Polygon shape to grid for boundary conditions

>>> mg = modelgrid
>>> int_dict = mg.get_cellids(shp_polygon, type=POLYGON)
>>> list(int_dict.keys()) 
['cellids', 'polyg_id', 'area']
>>> mg = modelgrid
>>> int_dict = mg.get_cellids(shp_polygon, type=POLYGON, vertices=True)
>>> list(int_dict.keys()) 
['cellids', 'polyg_id', 'area', 'vert']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions