Geographic Information Systems Asked on March 29, 2021
My understanding is that ::geography transforms data from whatever CRS into 4326. But what is ::geometry doing?
Relatedly, in the context of the ST_Project function:
st_project(a.geom::geography,b.recommended_radius,radians(a.azimuth))
which takes as input a Point (in 4326), a distance (in meters), and an azimuth (in radians), presumably there’s a transformation of some kind happening to get from a Point(4326) to a distance (in meters) – is there a way of finding out more details about the function? The documentation is minimal.
Ultimately, the ST_Project function is nested inside of an ST_MakeLine function, then cast back to ::geometry (but without any specified CRS).
st_makeline(array[a.geom,st_project(a.geom::geography,b.recommended_radius,radians(a.azimuth))::geometry])
Finally, for context, I am drawing wedges around a given azimuth using this code:
st_intersection(
st_buffer(
a.geom::geography, b.recommended_radius*1000, 50
)::geometry()
, st_makepolygon(
st_makeline(
array[
a.geom
, st_project(a.geom::geography, b.recommended_radius*1000*2, radians(a.azimuth-a.sector_width/2))::geometry
, st_project(a.geom::geography, b.recommended_radius*1000*2, radians(a.azimuth+a.sector_width/2))::geometry
, a.geom
]
)
)
)
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP