{"id":16165050,"url":"https://github.com/chrberger/wgs84tocartesian","last_synced_at":"2026-03-06T10:32:17.612Z","repository":{"id":53712659,"uuid":"124599965","full_name":"chrberger/WGS84toCartesian","owner":"chrberger","description":"A simple header-only, single-file library to handle WGS84 coordinate to Cartesian coordinate transformations for C++.","archived":false,"fork":false,"pushed_at":"2021-03-18T18:52:38.000Z","size":274,"stargazers_count":85,"open_issues_count":3,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-26T11:43:58.252Z","etag":null,"topics":["cartesian","coordinate-transformation","coordinates","cpp11","cpp14","cpp17","header-only","platform-independent","single-file","wgs84"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrberger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-09T22:27:53.000Z","updated_at":"2025-10-17T15:00:14.000Z","dependencies_parsed_at":"2022-09-22T00:42:14.089Z","dependency_job_id":null,"html_url":"https://github.com/chrberger/WGS84toCartesian","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chrberger/WGS84toCartesian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2FWGS84toCartesian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2FWGS84toCartesian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2FWGS84toCartesian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2FWGS84toCartesian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrberger","download_url":"https://codeload.github.com/chrberger/WGS84toCartesian/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2FWGS84toCartesian/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30171869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cartesian","coordinate-transformation","coordinates","cpp11","cpp14","cpp17","header-only","platform-independent","single-file","wgs84"],"created_at":"2024-10-10T02:49:05.356Z","updated_at":"2026-03-06T10:32:17.572Z","avatar_url":"https://github.com/chrberger.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## WGS84toCartesian - a simple header-only, single-file library to convert WGS84 positions (latitude/longitude) to/from Cartesian positions using Mercator projection for C++\n\n[![Build Status](https://travis-ci.org/chrberger/WGS84toCartesian.svg?branch=master)](https://travis-ci.org/chrberger/WGS84toCartesian) [![Build status](https://ci.appveyor.com/api/projects/status/i3swddat4tlnxmm5?svg=true)](https://ci.appveyor.com/project/chrberger/WGS84toCartesian) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nWGS84toCartesian is a small and efficient library written in modern C++ library to convert WGS84 latitude/longitude positions to/from Cartesian positions using Mercator projection.\n\nWGS84toCartesian is available as single-file, header-only library - just drop [WGS84toCartesian.hpp](https://raw.githubusercontent.com/chrberger/WGS84toCartesian/master/WGS84toCartesian.hpp) into your project, `#include \"WGS84toCartesian.hpp\"`, and compile your project with a modern C++ compiler (C++11 or newer).\n\nThis library is partially based on the work from Gerald I. Evenden on proj 4.3 released under public domain terms. See thirdparty/proj-4.3 for further details.\n\n\n## Table of Contents\n* [Features](#features)\n* [Dependencies](#dependencies)\n* [Contributing](#contributing)\n* [License](#license)\n\n\n## Features\n* Written in highly portable and high quality C++11\n* **Available as header-only, single-file distribution - just drop [WGS84toCartesian.hpp](https://raw.githubusercontent.com/chrberger/WGS84toCartesian/master/WGS84toCartesian.hpp) into your project, `#include \"WGS84toCartesian.hpp\"`, and compile your project with a modern C++ compiler (C++11 or newer)**\n* The positions are passed to and returned from the functions as [`std::array`](http://en.cppreference.com/w/cpp/container/array) so that this library integrates well with other math libraries (e.g., Eigen).\n* Convert a given WGS84 position to a Cartesian position using a given WGS84 reference position with Mercator projection: `std::array\u003cdouble, 2\u003e cartesianPosition = wgs84::toCartesian({52.247041, 10.575830} /* reference position */, {52.248091, 10.57417} /* position to be converted */));`\n* Convert a given WGS84 position to a Cartesian position using a given WGS84 reference position with Mercator projection: [Another example](https://github.com/chrberger/WGS84toCartesian/blob/master/test/Test-WGS84toCartesian.cpp#L40-L49)\n* Approximate a given Cartesian position with a WGS84 position using a given WGS84 reference position with Mercator projection: `std::array\u003cdouble, 2\u003e approximatedWGS84Position = wgs84::fromCartesian({52.247041, 10.575830} /* reference position */, {-154.48, 441.75} /* position to be converted */);`\n* Approximate a given Cartesian position with a WGS84 position using a given WGS84 reference position with Mercator projection: [Another example](https://github.com/chrberger/WGS84toCartesian/blob/master/test/Test-WGS84toCartesian.cpp#L82-L91)\n\n\n## Dependencies\nNo dependencies! All you need is a C++11-compliant compiler (we are testing with GCC 6.3.0 and MSVC 19.0.24215.1) as the project ships the following dependencies as part of the source distribution:\n\n* [Unit Test Framework Catch2](https://github.com/catchorg/Catch2/releases/tag/v2.1.1) - [![License: Boost Software License v1.0](https://img.shields.io/badge/License-Boost%20v1-blue.svg)](http://www.boost.org/LICENSE_1_0.txt) - [Source](https://github.com/chrberger/stringtoolbox/blob/master/test/catch.hpp)\n\n\n## Installation\n### Installation as single-file, header-only library\nWGS84toCartesian is provided as header-only, single-file library as well - just drop [WGS84toCartesian.hpp](https://raw.githubusercontent.com/chrberger/WGS84toCartesian/master/WGS84toCartesian.hpp) into your project, `#include \"WGS84toCartesian.hpp\"`, and compile your project with a modern C++ compiler (C++11 or newer)\n\n\n## Projects using WGS84toCartesian\nIf your project is using WGS84toCartesian, just let us know :-)\n\n\n## Contributing\nWe are happy to receive your PRs to accelerate libcluon's development; before contributing, please take a look at the [Contribution Documents](CONTRIBUTING.md).\n\n\n## License\n* This project is released under the terms of the MIT License - [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrberger%2Fwgs84tocartesian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrberger%2Fwgs84tocartesian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrberger%2Fwgs84tocartesian/lists"}