Hi,
we need to use a spatial function (st_asText) in postGIS in order to tranlsate geometry values to WKT directly in the mappings. The source (SQL query) is executed correctly (within Protege) : SELECT obj_id, traj_id, seg_id, st_asText(geom) FROM imis_seg
However, when put in server and try the mapping (see below), we get error 500 for the 'geom' variable:
ontology:imis_seg/{obj_id}/{traj_id}/{seg_id}/ a ontology:TrajectoryLineSegment ; ontology:segmentId {seg_id} ; ontology:segmentGeom {geom} ; ontology:trajectoryOfSegment ontology:imis_traj/{traj_id}/ ; ontology:segementToVessel ontology:imis_obj/{obj_id}/ .
Even if we try to put the spatial function in the target, we get the same error:
ontology:imis_seg/{obj_id}/{traj_id}/{seg_id}/ a ontology:TrajectoryLineSegment ; ontology:segmentId {seg_id} ; ontology:segmentGeom {st_asText(geom)} ; ontology:trajectoryOfSegment ontology:imis_traj/{traj_id}/ ; ontology:segementToVessel ontology:imis_obj/{obj_id}/ .
Any suggestions?
thanks in advance!
Kostas
PS. We had tested this function with the D2RQ mapping language, with success.