Skip to content

Commit

Permalink
add ST_MakePoint function (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slavenin authored Sep 22, 2023
1 parent b100789 commit 75413b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/geo_postgis.ex
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,16 @@ defmodule Geo.PostGIS do
defmacro st_build_area(geometryA) do
quote do: fragment("ST_BuildArea(?)", unquote(geometryA))
end

defmacro st_make_point(x, y) do
quote do: fragment("ST_MakePoint(?, ?)", unquote(x), unquote(y))
end

defmacro st_make_point(x, y, z) do
quote do: fragment("ST_MakePoint(?, ?, ?)", unquote(x), unquote(y), unquote(z))
end

defmacro st_make_point(x, y, z, m) do
quote do: fragment("ST_MakePoint(?, ?, ?, ?)", unquote(x), unquote(y), unquote(z), unquote(m))
end
end

0 comments on commit 75413b8

Please sign in to comment.