Reputation: 352
I want to convert a single point for which I know only longtitude and latitude to a polygon that I could show on Google Maps. It's required to have only 30 meters around the given point.
I am using Postgis and I have tried to create the polygon like this:
select ST_Transform(ST_Expand(ST_Transform(geo::geometry, _ST_BestSRID(geo)), 1, 1), 4326)
from
ST_Centroid(ST_SetSRID(ST_MakePoint(?, ?), 4326)) as geo
I am using Ruby and I am replacing the ?
Signs with the longitude and latitude.
This gives me a polygon but it's too big. I honestly have no idea how to make it smaller so there is only 30 meters around it.
I would appreciate any help.
Upvotes: 0
Views: 703