-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entities extent #236
base: dev
Are you sure you want to change the base?
Entities extent #236
Conversation
@@ -77,7 +79,8 @@ def __init__(self, datastore: Optional[str], entity_type: str, idu: Optional[str | |||
if self.action(o_entity): # si ça retourne True | |||
# On affiche l'entité | |||
Config().om.info(f"Affichage de l'entité {o_entity}", green_colored=True) | |||
Config().om.info(o_entity.to_json(indent=3)) | |||
Entities.print_entity(o_entity, None) | |||
Config().om.info("Emprise masquée, utilisez la commande --extent pour l'afficher") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
à déplacer dans la fonction : on ne veut pas l'afficher s'il n'y a pas d'emprise
@@ -403,6 +423,7 @@ def complete_parser_entities(o_sub_parsers: argparse._SubParsersAction[argparse. | |||
# Filtres | |||
o_sub_parser.add_argument("--infos", "-i", type=str, default=None, help=f"Filtrer les {o_entity.entity_titles()} selon les infos") | |||
o_sub_parser.add_argument("--page", "-p", type=int, default=None, help="Page à récupérer. Toutes si non indiqué.") | |||
o_sub_parser.add_argument("--extent", type=str, default=None, help="Affichage de toute la donnée selon le type", choices=["wkt", "Geojson"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o_sub_parser.add_argument("--extent", type=str, default=None, help="Affichage de toute la donnée selon le type", choices=["wkt", "Geojson"]) | |
o_sub_parser.add_argument("--extent", type=str, default=None, help="Affichage de l'emprise selon le format demandé", choices=["wkt", "geojson"]) |
@staticmethod | ||
def print_entity(o_entity: StoreEntity, extent: str = None): | ||
if o_entity.get("extent") is not None: | ||
if extent != "Geojson": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if extent != "Geojson": | |
if extent != "geojson": |
if extent != "Geojson": | ||
del o_entity._store_api_dict["extent"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça risque pas de détruire l'extent si on veut du wkt ?
il faudrait pas faire if extent is None
?
No description provided.