shareloc.geomodels.geomodel

This module contains the GeoModel class factory. This main API GeoModel class generates an object linked with geomodel configuration “geomodel_name” (from registered GeoModelTemplate class)

** Experimental and not used as API for now** ** Will be used with an automatic switcher between Grid file format and RPC file format obj = GeoModel(“file_geom”) only without geomodel_type

Module Contents

Classes

GeoModel

GeoModel factory:

class shareloc.geomodels.geomodel.GeoModel[source]

GeoModel factory: A class designed for registered all available geomodels and instantiate them when needed.

available_geomodels: Dict[str, Any][source]
classmethod create_geomodel(geomodel_path, geomodel_type='RPC')[source]

Factory command to create the geomodel from geomodel_type Return a GeoModelTemplate child instance associated with the “geomodel_type”

Parameters:
  • geomodel_path (string) – Path of geomodel file

  • geomodel_type (string) – Type of the geomodel, default “RPC”, used as key for specific geomodel subclass instance

classmethod print_avalaible_geomodels()[source]

Print all registered applications

classmethod register(geomodel_type)[source]

Allows to register the GeoModelTemplate subclass in the factory with its geomodel geomodel_type through decorator

Parameters:

geomodel_type (string) – the subclass name to be registered