{"id":17793953,"url":"https://github.com/nora-soderlund/coordinateprojection","last_synced_at":"2025-03-16T20:31:13.633Z","repository":{"id":98846273,"uuid":"591374473","full_name":"nora-soderlund/CoordinateProjection","owner":"nora-soderlund","description":"An itsy-bitsy-teenie-weenie-tiny package to project coordinates into screen points where the map boundaries are already defined.","archived":true,"fork":false,"pushed_at":"2023-01-20T15:57:23.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T17:18:35.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nora-soderlund.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-20T15:49:13.000Z","updated_at":"2023-08-29T21:45:48.000Z","dependencies_parsed_at":"2023-05-07T02:04:50.253Z","dependency_job_id":null,"html_url":"https://github.com/nora-soderlund/CoordinateProjection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nora-soderlund%2FCoordinateProjection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nora-soderlund%2FCoordinateProjection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nora-soderlund%2FCoordinateProjection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nora-soderlund%2FCoordinateProjection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nora-soderlund","download_url":"https://codeload.github.com/nora-soderlund/CoordinateProjection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243928320,"owners_count":20370269,"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-27T11:14:39.899Z","updated_at":"2025-03-16T20:31:13.627Z","avatar_url":"https://github.com/nora-soderlund.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoordinateProjection\nAn itsy-bitsy-teenie-weenie-tiny package to project coordinates into screen points where the map boundaries are already defined.\n\n## Example\n\n```csharp\npublic partial class MyForm : Form {\n    private readonly CoordinateBounds staticMapBounds = new () {\n        East = 153.32191748046876f,\n        North = -33.50848555239759f,\n        South = -35.27618036073599f,\n        West = 147.96608251953126f\n    };\n\n    private List\u003cCoordinate\u003e Coordinates = new List\u003cCoordinate\u003e() {\n        new (-33.86883898636453f, 151.20914864607147f), // Sydney\n        new (-34.82777280506466f, 148.90830590294317f), // Yass\n        new (-34.66920061357916f, 150.852685799046f), // Kiama\n        new (-34.424845374813025f, 150.89311318548945f) // Wollongong\n    };\n\n    public MyForm() {\n        InitializeComponent();\n\n        ScreenProjection screenProjection = new(staticMap.Width, staticMap.Height, staticMapBounds);\n\n        Image image = new Bitmap(staticMap.Width, staticMap.Height);\n\n        using (var graphics = Graphics.FromImage(image)) {\n            graphics.DrawImage(Resources.Resources.static_map, new Rectangle(0, 0, staticMap.Width, staticMap.Height));\n\n            foreach (Coordinate coordinate in Coordinates) {\n                ScreenPoint point = screenProjection.GetScreenPoint(coordinate);\n\n                graphics.DrawImage(Resources.Resources.pin, new Rectangle(point.Left, point.Top - 20, 20, 20));\n            }\n        }\n\n        staticMap.Image = image;\n    }\n}\n```\n\n![image](https://user-images.githubusercontent.com/78360666/213744975-d094deea-4690-45f5-b151-e193a717fbd7.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnora-soderlund%2Fcoordinateprojection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnora-soderlund%2Fcoordinateprojection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnora-soderlund%2Fcoordinateprojection/lists"}