You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a 'geopoint' column, but I access it using SQL with something like SELECT ST_AsEWKT(coords) as coords and I will get the EWKT text, how can I parese it to a Point() object?
I came up with something like below, but I am guessing this is not the right way?:
$sql = "SELECT st.id,st.name,ST_AsEWKT(coords) as coords FROM store st LIMIT 1";
$conn = $this->getEntityManager()->getConnection();
$stmt = $conn->prepare($sql);
$stmt->execute();
$result = $stmt->fetchAll();
$parser = new PostgreSql();
$point = $parser->convertStringToPHPValue(AbstractSpatialType::getType('geopoint'),$result[0]['coords']);
The text was updated successfully, but these errors were encountered:
If I have a 'geopoint' column, but I access it using SQL with something like
SELECT ST_AsEWKT(coords) as coords
and I will get the EWKT text, how can I parese it to a Point() object?I came up with something like below, but I am guessing this is not the right way?:
The text was updated successfully, but these errors were encountered: