any idea what the best way to extract the xy location from this string would be?
{"type":"Point","coordinates":[-1.35507,52.83477]}
Best answer by davideagle
View originalany idea what the best way to extract the xy location from this string would be?
{"type":"Point","coordinates":[-1.35507,52.83477]}
Best answer by davideagle
View originalregex.fmw should sort you out. Use regex to grab the contents of the square brackets and then split the string in the usual way with the AttributeSplitter.
Hope that helps, Dave
In addition to the regex-based solution by @1spatialdave, you can also use the JSONExtractor (since what you posted looks to be JSON) and do the whole extraction with a single transformer.
To extract your coordinates into the attributes x and y, use:
In addition to the regex-based solution by @1spatialdave, you can also use the JSONExtractor (since what you posted looks to be JSON) and do the whole extraction with a single transformer.
To extract your coordinates into the attributes x and y, use:
Nice one @david_r
thank you both for your help still getting my head around the regex expressions. perfect :)
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.