Giter VIP home page Giter VIP logo

proj4erl's Introduction

proj4erl

proj4erl is a NIF-based binding for PROJ.4 library.

It supports three API calls

  • init/1 - equivalent of pj_init_plus, returns opaque value which should be used as a reference to initialized projection (equivalent to projPJ type)
  • get_def/1 - equivalent of pj_get_def, returns string
  • transform/3 - equivalent of pj_transform

Here is an example of usage:

    {ok, WGS84} = proj4:init("+init=epsg:4326"),
    {ok, CRS2180} = proj4:init("+init=epsg:2180"),
    P = {21.049804687501, 52.22900390625},
    {ok, P2} = proj4:transform(WGS84, CRS2180, P),
    {639951.5695094677, 486751.7840663176} = P2.

Initialized projPJ references are being automatically garbage collected.

Feel free to fork and send pull requests!

Setup

Clone the project and run (on Ubuntu; adapt apt-get command to install proj4 development files on other systems):

$ sudo apt-get install libproj-dev
$ make

TODO

  • ad-hoc transform calls, with implicit initialization of projPJ and it's caching
  • support for linestrings, rings, polygons for speed

proj4erl's People

Contributors

gleber avatar flycodepl avatar

Stargazers

 avatar Rodolphe Quiédeville avatar Volker Mische avatar  avatar Andrew Gopienko avatar æstrid avatar  avatar Zvi avatar

Watchers

Paul Peregud avatar  avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.