Giter Site home page Giter Site logo

svy21's Issues

different result using c++ and python

Hi guys,

I use the following code in c++:

SVY21 svy21;
double northing, easting;
double lat, lon;
easting = 12056.9149612;
northing = 37621.664783;
svy21.SVY21ToLatLon(northing, easting, &lat, &lon);
printf("%lf %lf\n", lat, lon);

Result: 1.356507 103.159780

I use the python:

cv = SVY21()
(N, E) = (37621.664783, 12056.9149612)
(lat, lon) = cv.computeLatLon(N, E)
(lat, lon)
(1.3565065593611545, 103.69005934636358)

Different results (longitude) and the Python one is quite accurate but the c++ one is not. Anything happened?

Deprecated, Use proj4

Javascript example:

    import proj4 from 'proj4'
    proj4.defs("EPSG:3414","+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs");
    var coords = proj4("EPSG:3414").inverse([43387.0213,40582.6686]);
    console.log(coords)

Projection details were retrieved from https://epsg.io/3414
https://github.com/proj4js/proj4js

License is missing

Hi,
What is exact license of this library? Can it be used in closed-source projects?

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.