Skip to content

Commit

Permalink
Made changes after review
Browse files Browse the repository at this point in the history
Signed-off-by: Omkar Mestry <omkar.mestry@here.com>
  • Loading branch information
omanges committed Oct 16, 2020
1 parent 7699f7a commit e1df492
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
4 changes: 1 addition & 3 deletions tests/space/test_space_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,7 @@ def test_force_2d(space_object):
)
assert len(feature[0]["geometry"]["coordinates"][0][0]) == 2

for f in space_object.iter_feature(force_2d=True):
feature = f
break
feature = next(space_object.iter_feature(force_2d=True))
assert len(feature["geometry"]["coordinates"][0][0]) == 2

feature = space_object.get_feature(feature_id="FRA", force_2d=True)
Expand Down
16 changes: 8 additions & 8 deletions xyzspaces/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def get_space_features(
:param space_id: The desired space ID.
:param feature_ids: A list of feature_ids.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A feature collection with all features inside the specified
space.
Expand All @@ -548,7 +548,7 @@ def get_space_feature(
:param space_id: The desired space ID.
:param feature_id: The desired feature ID.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A feature with the specified feature ID inside the space
with the specified ID.
Expand Down Expand Up @@ -609,7 +609,7 @@ def get_space_bbox(
:param clustering: ...
:param clusteringParams: ...
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A dict representing a feature collection.
Expand Down Expand Up @@ -683,7 +683,7 @@ def get_space_tile(
:param clustering: ...
:param clusteringParams: ...
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A dict representing a feature collection.
Expand Down Expand Up @@ -742,7 +742,7 @@ def get_space_search(
:param selection: ...
:param skip_cache: ...
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A dict representing a feature collection.
Expand Down Expand Up @@ -778,7 +778,7 @@ def get_space_iterate(
:param space_id: A string representing desired space ID.
:param limit: A max. number of features to return in the result.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:yields: A feature in space.
"""
Expand Down Expand Up @@ -1048,7 +1048,7 @@ def get_space_spatial(
:param skip_cache: A Boolean if set to ``True`` the response is not returned from
cache.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A dict representing a feature collection.
:raises ValueError: If incorrect params are passed, either ``lat`` and ``lon`` or
Expand Down Expand Up @@ -1111,7 +1111,7 @@ def post_space_spatial(
:param skip_cache: A Boolean if set to ``True`` the response is not returned from
cache.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A dict representing a feature collection.
"""
Expand Down
16 changes: 8 additions & 8 deletions xyzspaces/spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def search(
:param geo_dataframe: A boolean if set to ``True`` searched features will be
yield as single Geopandas Dataframe.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:yields: A Feature object by default. If param ``geo_dataframe`` is True then
yields single Geopandas Dataframe.
Expand All @@ -335,7 +335,7 @@ def iter_feature(
:param limit: A max. number of features to return in the result.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:yields: A Feature object.
"""
Expand All @@ -352,7 +352,7 @@ def get_feature(
:param feature_id: Feature id which is to fetched.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A GeoJSON representing a feature with the specified feature
ID inside the space.
Expand Down Expand Up @@ -440,7 +440,7 @@ def get_features(
:param geo_dataframe: A boolean if set to ``True`` features will be
returned as single Geopandas Dataframe.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:return: A feature collection with all features inside the specified
space. If param ``geo_dataframe`` is set to ``True`` then return features
Expand Down Expand Up @@ -686,7 +686,7 @@ def features_in_bbox(
:param geo_dataframe: A boolean if set to ``True`` searched features will be
yield as single Geopandas Dataframe.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:yields: A Feature object by default. If param ``geo_dataframe`` is True then
yields single Geopandas Dataframe.
Expand Down Expand Up @@ -770,7 +770,7 @@ def features_in_tile(
:yields: A Feature object by default. If param ``geo_dataframe`` is True then
yields single Geopandas Dataframe.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:raises ValueError: If `tile_type` is invalid, valid tile_types are
`quadkeys`, `web`, `tms` and `here`.
Expand Down Expand Up @@ -858,7 +858,7 @@ def spatial_search(
:param geo_dataframe: A boolean if set to ``True`` searched features will be
yield as single Geopandas Dataframe.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:yields: A Feature object by default. If param ``geo_dataframe`` is True then
yields single Geopandas Dataframe.
Expand Down Expand Up @@ -940,7 +940,7 @@ def spatial_search_geometry(
:param geo_dataframe: A boolean if set to ``True`` searched features will be
yield as single Geopandas Dataframe.
:param force_2d: If set to True the features in the response
will have only X's and Y's as coordinates,by default all
will have only X and Y components, by default all
x,y,z coordinates will be returned.
:yields: A Feature object by default. If param ``geo_dataframe`` is True then
yields as single Geopandas Dataframe.
Expand Down

0 comments on commit e1df492

Please sign in to comment.