Thanks for your suggestion but I'm still not convinced if I really can use UserType.
Normal insertion of GEOMETRY data:
Code:
INSERT INTO Coordinates VALUES (Geomfromtext('point(1 1)') );
Retrieval:
Code:
SELECT Y(GeomFromText(AsText(coordinate))) AS lat, X(GeomFromText(AsText(coordinate))) AS lon, ROUND(GLength(LineStringFromWKB(LineString(AsBinary(coordinate), POINT(89.6, 25.98))))) AS distance FROM Coordinate
I have to in some way combine this custom sql query and the UserType.
Is this achievable?