diff --git a/README.md b/README.md index 3b39d76..27a4245 100644 --- a/README.md +++ b/README.md @@ -423,6 +423,7 @@ Given origin coordinates, find shapes of zones reachable within corresponding tr * [transportation](#transportation): Union - Transportation mode and related parameters. * [level_of_detail](#level-of-detail): LevelOfDetail - When enabled, allows the user to specify how detailed the isochrones should be. * [snapping](#snapping): Snapping - Adjusts the process of looking up the nearest roads from the departure / arrival points. +* [no_holes](#no_holes): No holes - Enable to remove holes from returned polygons. #### Returns: diff --git a/traveltimepy/dto/requests/distance_map.py b/traveltimepy/dto/requests/distance_map.py index 01b7fed..82eff7a 100644 --- a/traveltimepy/dto/requests/distance_map.py +++ b/traveltimepy/dto/requests/distance_map.py @@ -39,6 +39,7 @@ class DepartureSearch(BaseModel): level_of_detail: Optional[LevelOfDetail] = None snapping: Optional[Snapping] = None polygons_filter: Optional[PolygonsFilter] = None + no_holes: Optional[bool] = None class ArrivalSearch(BaseModel): @@ -58,6 +59,7 @@ class ArrivalSearch(BaseModel): level_of_detail: Optional[LevelOfDetail] = None snapping: Optional[Snapping] = None polygons_filter: Optional[PolygonsFilter] = None + no_holes: Optional[bool] = None class Intersection(BaseModel): diff --git a/traveltimepy/mapper.py b/traveltimepy/mapper.py index 62894ea..fb950e4 100644 --- a/traveltimepy/mapper.py +++ b/traveltimepy/mapper.py @@ -696,6 +696,7 @@ def create_distance_map( level_of_detail: Optional[LevelOfDetail], snapping: Optional[Snapping], polygons_filter: Optional[PolygonsFilter], + no_holes: Optional[bool], ) -> DistanceMapRequest: if isinstance(time_info, ArrivalTime): return DistanceMapRequest( @@ -709,6 +710,7 @@ def create_distance_map( level_of_detail=level_of_detail, snapping=snapping, polygons_filter=polygons_filter, + no_holes=no_holes, ) for ind, cur_coordinates in enumerate(coordinates) ], @@ -728,6 +730,7 @@ def create_distance_map( level_of_detail=level_of_detail, snapping=snapping, polygons_filter=polygons_filter, + no_holes=no_holes, ) for ind, cur_coordinates in enumerate(coordinates) ], diff --git a/traveltimepy/sdk.py b/traveltimepy/sdk.py index 5bada4e..1795841 100644 --- a/traveltimepy/sdk.py +++ b/traveltimepy/sdk.py @@ -804,6 +804,7 @@ async def distance_map_async( level_of_detail: Optional[LevelOfDetail] = None, snapping: Optional[Snapping] = None, polygons_filter: Optional[PolygonsFilter] = None, + no_holes: Optional[bool] = None, ) -> List[TimeMapResult]: time_info = get_time_info(departure_time, arrival_time) resp = await send_post_async( @@ -818,6 +819,7 @@ async def distance_map_async( level_of_detail, snapping, polygons_filter, + no_holes, ), self._sdk_params, )