cgcai / svy21 Goto Github PK
View Code? Open in Web Editor NEWA Free and Open Source Library to convert between Lat/Lon and SVY21.
A Free and Open Source Library to convert between Lat/Lon and SVY21.
Converting X,Y from onemap is totally off.
Using the script calculates wrong coordinates from :
http://www.onemap.sg/api/help/HTMLSource/ConvertCords.aspx
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
Hi,
What is exact license of this library? Can it be used in closed-source projects?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.