{"id":17218463,"url":"https://github.com/perliedman/local-proj","last_synced_at":"2025-03-25T14:25:33.681Z","repository":{"id":143886751,"uuid":"43285591","full_name":"perliedman/local-proj","owner":"perliedman","description":"Find a suitable local projection from GeoJSON data","archived":false,"fork":false,"pushed_at":"2017-04-05T19:17:37.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-26T07:22:53.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perliedman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-09-28T07:11:38.000Z","updated_at":"2017-03-22T07:59:22.000Z","dependencies_parsed_at":"2023-07-18T23:16:33.507Z","dependency_job_id":null,"html_url":"https://github.com/perliedman/local-proj","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flocal-proj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flocal-proj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flocal-proj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perliedman%2Flocal-proj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perliedman","download_url":"https://codeload.github.com/perliedman/local-proj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245478706,"owners_count":20622024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-15T03:46:53.501Z","updated_at":"2025-03-25T14:25:33.656Z","avatar_url":"https://github.com/perliedman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# local-proj\n\n[![npm version](https://badge.fury.io/js/local-proj.svg)](https://badge.fury.io/js/local-proj) [![Build status](https://travis-ci.org/perliedman/local-proj.svg?branch=master)](https://travis-ci.org/perliedman/local-proj)\n\nFind a projection for easy cartesian calculations, given a GeoJSON in WGS84.\n\n_Problem:_ you have geographic data in WGS84 of limited extent, but arbitrary location,\nand you need to work with the data in a cartesian system (use euclidean distance, etc.)\n\n_Solution:_ feed your data to `local-proj`, and it will hand you a suitable projection\nindependent of geographic location\n\n## Installing\n\n```\nnpm install --save local-proj\n```\n\n## Example\n\n```javascript\nvar localProj = require('local-proj');\nvar geojson = [...]\n\nvar projection = localProj.find(geojson);\n\nvar cartesian = projection.forward(geojsoncoord);\n```\n\nTo reproject your GeoJSON to the projection, you might want to look at\n[reproject](https://github.com/perliedman/reproject).\n\n## API\n\n### find(geojson)\n\nFinds a local projection that is suitable for projecting the `geojson` to cartesian\ncoordinates.\n\nThe returned projection is a [proj4](http://proj4js.org/) projection object (`proj4.Proj`), which\nyou can use to create transforms to and from other projections.\n\nNote that the local coordinate system will only work as expected for datasets up to a couple\nof hundred kilometers in size.\n\nCurrently, the returned projection will always be a [transverse mercator](https://en.wikipedia.org/wiki/Transverse_Mercator_projection) projection.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperliedman%2Flocal-proj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperliedman%2Flocal-proj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperliedman%2Flocal-proj/lists"}