{"id":21820014,"url":"https://github.com/ngageoint/gars-java","last_synced_at":"2025-04-14T02:41:33.599Z","repository":{"id":39744652,"uuid":"146496220","full_name":"ngageoint/gars-java","owner":"ngageoint","description":"Global Area Reference System Java Library","archived":false,"fork":false,"pushed_at":"2024-04-03T20:45:27.000Z","size":534,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-27T16:41:43.715Z","etag":null,"topics":["gars","global-area-reference-system","java","nga"],"latest_commit_sha":null,"homepage":"https://ngageoint.github.io/gars-java/","language":"Java","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/ngageoint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-28T19:22:46.000Z","updated_at":"2024-05-01T13:53:37.000Z","dependencies_parsed_at":"2024-04-03T21:45:10.752Z","dependency_job_id":null,"html_url":"https://github.com/ngageoint/gars-java","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"64ce43c15847c8b9baf21be642fb6a1bdbeee05d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fgars-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fgars-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fgars-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fgars-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngageoint","download_url":"https://codeload.github.com/ngageoint/gars-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248812189,"owners_count":21165383,"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":["gars","global-area-reference-system","java","nga"],"created_at":"2024-11-27T16:27:59.443Z","updated_at":"2025-04-14T02:41:33.577Z","avatar_url":"https://github.com/ngageoint.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GARS Java\n\n#### Global Area Reference System Lib ####\n\nThe GARS Library was developed at the [National Geospatial-Intelligence Agency (NGA)](http://www.nga.mil/) in collaboration with [BIT Systems](https://www.caci.com/bit-systems/). The government has \"unlimited rights\" and is releasing this software to increase the impact of government investments by providing developers with the opportunity to take things in new directions. The software use, modification, and distribution rights are stipulated within the [MIT license](http://choosealicense.com/licenses/mit/).\n\n### Pull Requests ###\nIf you'd like to contribute to this project, please make a pull request. We'll review the pull request and discuss the changes. All pull request contributions to this project will be released under the MIT license.\n\nSoftware source code previously released under an open source license and then modified by NGA staff is considered a \"joint work\" (see 17 USC § 101); it is partially copyrighted, partially public domain, and as a whole is protected by the copyrights of the non-government authors and must be released according to the terms of the original open source license.\n\n### About ###\n\n[GARS](http://ngageoint.github.io/gars-java/) is a Java library providing Global Area Reference System functionality, a standardized geospatial reference system for areas.\n\n### Usage ###\n\nView the latest [Javadoc](http://ngageoint.github.io/gars-java/docs/api/)\n\n#### Coordinates ####\n\n```java\n\nGARS gars = GARS.parse(\"006AG39\");\nPoint point = gars.toPoint();\nPoint pointMeters = point.toMeters();\n\ndouble latitude = 63.98862388;\ndouble longitude = 29.06755082;\nPoint point2 = Point.point(longitude, latitude);\nGARS gars2 = GARS.from(point2);\nString garsCoordinate = gars2.toString();\nString gars30m = gars2.coordinate(GridType.THIRTY_MINUTE);\nString gars15m = gars2.coordinate(GridType.FIFTEEN_MINUTE);\nString gars5m = gars2.coordinate(GridType.FIVE_MINUTE);\n\n```\n\n#### Draw Tile Template ####\n\nSee [gars-android](https://github.com/ngageoint/gars-android) for a concrete example\n\n```java\n\n// GridTile tile = ...;\n\nGrids grids = Grids.create();\n\nZoomGrids zoomGrids = grids.getGrids(tile.getZoom());\nif (zoomGrids.hasGrids()) {\n\n  for (Grid grid : zoomGrids) {\n\n    List\u003cGridLine\u003e lines = grid.getLines(tile);\n    if (lines != null) {\n      for (GridLine line : lines) {\n        Pixel pixel1 = line.getPoint1().getPixel(tile);\n        Pixel pixel2 = line.getPoint2().getPixel(tile);\n        // Draw line\n      }\n    }\n\n    List\u003cGridLabel\u003e labels = grid.getLabels(tile);\n    if (labels != null) {\n      for (GridLabel label : labels) {\n        PixelRange pixelRange = label.getBounds()\n            .getPixelRange(tile);\n        Pixel centerPixel = label.getCenter().getPixel(tile);\n        // Draw label\n      }\n    }\n\n  }\n}\n\n```\n\n#### Properties ####\n\nDefault grid properties including zoom ranges, styles, and labelers are defined in [gars.properties](https://github.com/ngageoint/gars-java/blob/master/src/main/resources/gars.properties). The defaults can be changed in code by modifying the [Grids](https://github.com/ngageoint/gars-java/blob/master/src/main/java/mil/nga/gars/grid/Grids.java).\n\n### Installation ###\n\nPull from the [Maven Central Repository](http://search.maven.org/#artifactdetails|mil.nga|gars|1.1.3|jar) (JAR, POM, Source, Javadoc)\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003emil.nga\u003c/groupId\u003e\n        \u003cartifactId\u003egars\u003c/artifactId\u003e\n        \u003cversion\u003e1.1.3\u003c/version\u003e\n    \u003c/dependency\u003e\n\n### Build ###\n\n[![Build \u0026 Test](https://github.com/ngageoint/gars-java/workflows/Build%20\u0026%20Test/badge.svg)](https://github.com/ngageoint/gars-java/actions/workflows/build-test.yml)\n\nBuild this repository using Eclipse and/or Maven:\n\n    mvn clean install\n\n### Remote Dependencies ###\n\n* [Grid Java](https://github.com/ngageoint/grid-java) (The MIT License (MIT)) - Grid Library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngageoint%2Fgars-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngageoint%2Fgars-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngageoint%2Fgars-java/lists"}