GeoAPI provides a set of Java and Python language programming interfaces for geospatial applications. Those interfaces closely follow the abstract models published collaboratively by ISO and OGC. GeoAPI does not provide implementations except bridges between programming languages; implementations must be obtained from other projects.
Contrarily to Java where a standard mechanism exists for discovering implementations at run time, GeoAPI does not provide guidance at this time about how to discover Python implementations. The examples in this page assume that the first step is implementation-specific. After the first line of code, all properties are derived from OGC/ISO specifications.
# Following line is implementation-specific. md = my_implementation.getMetadata() # Assuming that `md` type is opengis.metadata.base.Metadata, # all remaining lines below should be implementation-neutral. # This API uses properties derived from OGC/ISO specifications. axis0 = md.spatial_representation_info.axis_dimension_properties axis1 = md.spatial_representation_info.axis_dimension_properties print("Resource title: ", md.identification_info.citation.title) print("Resource scope: ", md.metadata_scope.resource_scope) print("Name of first axis: ", axis0.dimension_name) print("Size of first axis: ", axis0.dimension_size) print("Name of second axis: ", axis1.dimension_name) print("Size of second axis: ", axis1.dimension_size)