If you select a spatial field value from MySQL without converting it to text in the query, I get an βunreadableβ string in PHP. What function can I use to convert it to WKT?
Example:
SELECT AsText(polygon_field) FROM Table; // gives a nice WKT string.
SELECT polygon_field FROM Table; // gives an unreadable (binary?) string.
Due to limitations in the structure we use, it would be great if this string could be converted to WKT using PHP. Any ideas on which function to use? It seems it cannot find anything, because all the examples that I find rely on the MySQL AsText function: - (
preyz source
share