I’m trying to validate data passing between client/server for a location-based application and I can’t find any way to validate WKT strings in PHP. I’d prefer not to implement it myself, not because I’m lazy or incompetent but because I’m afraid of getting it wrong because I’ve never dealt with WKT before. Is there any way for me to validate or must I write my own validator?
I’m trying to validate data passing between client/server for a location-based application and I
Share
I found this class gisconverter.php which can convert WKT to various formats, or other formats to WKT. It appears it will throw an exception if the WKT is not well formed also.
Example: