At some point I needed a semantic description of the spatial reference frames that are present in sempr; knowledge about the parent of a LocalCS, to be precise.
To achieve this I changed SpatialReference to inherit SemanticEntity instead of Entity. That way I could easily register the parent_ member of LocalCS as a property to be exported as an RDF triple. I also added a property for the (semantic) type of the object (--> "\<sempr:LocalCS>") using a static const std::string variable -- which feels a bit hacky.
Is inheriting from SemanticEntity okay for SpatialReference?
Do you have any suggestions for improvements?
Should we consider to also let other classes inherit from SemanticEntity? E.g., Geometry could export the id of the assigned SpatialReference.
At some point I needed a semantic description of the spatial reference frames that are present in sempr; knowledge about the parent of a LocalCS, to be precise.
To achieve this I changed SpatialReference to inherit SemanticEntity instead of Entity. That way I could easily register the
parent_
member of LocalCS as a property to be exported as an RDF triple. I also added a property for the (semantic) type of the object (--> "\<sempr:LocalCS>") using astatic const std::string
variable -- which feels a bit hacky.