Last active
December 26, 2015 02:29
-
-
Save DrMartiner/7079278 to your computer and use it in GitHub Desktop.
Convert PostGIS point to Yandex-Map point
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convertPostGisToYandex = (point) -> | |
coords = /POINT\s*\(\s*([0-9\.]+)\s*([0-9.]+)\s*\)/.exec point | |
if coords.length != 2 | |
console.error 'Bad parse PostGIS point data', point | |
return [] | |
return [parseFloat(coords[1]), parseFloat(coords[2])] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment