Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there functionality to handle conversion from postgresql for coordinates? #46

Open
vomc opened this issue Aug 1, 2019 · 0 comments

Comments

@vomc
Copy link

vomc commented Aug 1, 2019

Just curious but looking at the src it does not look like it. I have some geo data coming out of a Postgres database in which the coordinates (for postgis querying) for a polygon are stored like this:

((lat,lng), (lat,lng), ... ) etc

So what I get is a long string of lat/lng 'tuples' for lack of a better word, enclosed in parentheses. I can pass this to the parse function but the geoJSON returned looks like this:

 "geometry": {
            "type": "Polygon",
            "coordinates": "((52.350595,13.317583),(52.35007,13.317262),(52.349646,13.319094),(52.350125,13.319396),(52.350595,13.317583))"
        }

I assume I need to write my own callback to process these coordinates first before passing the data to geojson.js ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant