reproject v0.1.3 Reproject
Summary
Functions
Create a projection. This returns {:ok, projection}
where projection
is an opaque pointer referring to a C struct
Get the expanded projection definition
Transform a point from source projection to dest projection
Functions
Create a projection. This returns {:ok, projection}
where projection
is an opaque pointer referring to a C struct
iex> Reproject.create(“+init=epsg:4326”)
Get the expanded projection definition
iex> {:ok, prj} = Reproject.create(“+init=epsg:4326”) iex> Reproject.expand(prj) “ +init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0”
Transform a point from source projection to dest projection
iex> {:ok, wgs84} = Reproject.create(“+init=epsg:4326”) iex> {:ok, crs2180} = Reproject.create(“+init=epsg:2180”) iex> Reproject.transform(wgs84, crs2180, {21.049804687501, 52.22900390625}) {:ok, {639951.5695094677, 486751.7840663176}}