{"id":21819962,"url":"https://github.com/ngageoint/coordinate-reference-systems-java","last_synced_at":"2025-04-14T02:41:26.538Z","repository":{"id":57736800,"uuid":"379937676","full_name":"ngageoint/coordinate-reference-systems-java","owner":"ngageoint","description":"Coordinate Reference Systems Java Library","archived":false,"fork":false,"pushed_at":"2024-04-02T17:25:28.000Z","size":4904,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-27T16:41:42.076Z","etag":null,"topics":["coordinate-reference-system","coordinate-reference-systems","crs","java","java-api","java-libraries","java-library","java-sdk","nga","ogc","proj","proj4","projection","projections","well-known","well-known-text","wkt","wkt-crs"],"latest_commit_sha":null,"homepage":"https://ngageoint.github.io/coordinate-reference-systems-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":"2021-06-24T13:40:30.000Z","updated_at":"2023-09-23T09:16:33.000Z","dependencies_parsed_at":"2024-12-01T06:46:57.641Z","dependency_job_id":null,"html_url":"https://github.com/ngageoint/coordinate-reference-systems-java","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fcoordinate-reference-systems-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fcoordinate-reference-systems-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fcoordinate-reference-systems-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fcoordinate-reference-systems-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngageoint","download_url":"https://codeload.github.com/ngageoint/coordinate-reference-systems-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381759,"owners_count":21094525,"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":["coordinate-reference-system","coordinate-reference-systems","crs","java","java-api","java-libraries","java-library","java-sdk","nga","ogc","proj","proj4","projection","projections","well-known","well-known-text","wkt","wkt-crs"],"created_at":"2024-11-27T16:27:30.485Z","updated_at":"2025-04-14T02:41:26.515Z","avatar_url":"https://github.com/ngageoint.png","language":"Java","readme":"# Coordinate Reference Systems Java\n\n#### Coordinate Reference Systems Lib ####\n\nThe Coordinate Reference Systems 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[Coordinate Reference Systems](http://ngageoint.github.io/coordinate-reference-systems-java/) is a Java library implementation of OGC's 'Geographic information — Well-known text representation of coordinate reference systems' ([18-010r7](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html)) specification.\n\nFor projection conversions between coordinates, see [Projections](https://ngageoint.github.io/projections-java/) (backed by [proj4j](https://github.com/locationtech/proj4j)).\n\n### Usage ###\n\nView the latest [Javadoc](http://ngageoint.github.io/coordinate-reference-systems-java/docs/api/)\n\n```java\n\n// String wkt = ...\n\nCRS crs = CRSReader.read(wkt);\n\nCRSType type = crs.getType();\nCategoryType category = crs.getCategoryType();\n\nString text = CRSWriter.write(crs);\nString prettyText = CRSWriter.writePretty(crs);\n\nswitch (category) {\n\ncase CRS:\n\n  CoordinateReferenceSystem coordRefSys = (CoordinateReferenceSystem) crs;\n\n  switch (type) {\n  case BOUND:\n    BoundCoordinateReferenceSystem bound = (BoundCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case COMPOUND:\n    CompoundCoordinateReferenceSystem compound = (CompoundCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case DERIVED:\n    DerivedCoordinateReferenceSystem derived = (DerivedCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case ENGINEERING:\n    EngineeringCoordinateReferenceSystem engineering = (EngineeringCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case GEODETIC:\n  case GEOGRAPHIC:\n    GeoCoordinateReferenceSystem geo = (GeoCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case PARAMETRIC:\n    ParametricCoordinateReferenceSystem parametric = (ParametricCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case PROJECTED:\n    ProjectedCoordinateReferenceSystem projected = (ProjectedCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case TEMPORAL:\n    TemporalCoordinateReferenceSystem temporal = (TemporalCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  case VERTICAL:\n    VerticalCoordinateReferenceSystem vertical = (VerticalCoordinateReferenceSystem) coordRefSys;\n    // ...\n    break;\n  default:\n  }\n\n  // ...\n  break;\n\ncase METADATA:\n\n  CoordinateMetadata metadata = (CoordinateMetadata) crs;\n\n  // ...\n  break;\n\ncase OPERATION:\n\n  Operation operation = (Operation) crs;\n\n  switch (type) {\n  case CONCATENATED_OPERATION:\n    ConcatenatedOperation concatenatedOperation = (ConcatenatedOperation) operation;\n    // ...\n    break;\n  case COORDINATE_OPERATION:\n    CoordinateOperation coordinateOperation = (CoordinateOperation) operation;\n    // ...\n    break;\n  case POINT_MOTION_OPERATION:\n    PointMotionOperation pointMotionOperation = (PointMotionOperation) operation;\n    // ...\n    break;\n  default:\n  }\n\n  // ...\n  break;\n\n}\n\n```\n\n#### PROJ ####\n\n```java\n\n// String wkt = ...\n\nCRS crs = CRSReader.read(wkt);\n\nProjParams projParamsFromCRS = ProjParser.params(crs);\nString projTextFromCRS = ProjParser.paramsText(crs);\nProjParams projParamsFromWKT = ProjParser.params(wkt);\nString projTextFromWKT = ProjParser.paramsText(wkt);\n\n```\n\n### Installation ###\n\nPull from the [Maven Central Repository](http://search.maven.org/#artifactdetails|mil.nga|crs|1.1.5|jar) (JAR, POM, Source, Javadoc)\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003emil.nga\u003c/groupId\u003e\n    \u003cartifactId\u003ecrs\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.5\u003c/version\u003e\n\u003c/dependency\u003e\n\n```\n\n### Build ###\n\n[![Build \u0026 Test](https://github.com/ngageoint/coordinate-reference-systems-java/workflows/Build%20\u0026%20Test/badge.svg)](https://github.com/ngageoint/coordinate-reference-systems-java/actions/workflows/build-test.yml)\n\nBuild this repository using Eclipse and/or Maven:\n\n    mvn clean install\n\n### Pretty ###\n\nThe jar includes a pretty Well-Known Text main class utility that can be run from command line.\n\nParse OGC Coordinate Reference System Well-Known Text (1|2) and pretty print Coordinate Reference System Well-Known Text 2 and PROJ params. Download [pretty.zip](https://github.com/ngageoint/coordinate-reference-systems-java/releases/latest/download/pretty.zip) and follow the [instructions](script/pretty/).\n\nOr run against the jar:\n\n    java -jar crs-*.jar [well-known_text]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngageoint%2Fcoordinate-reference-systems-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngageoint%2Fcoordinate-reference-systems-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngageoint%2Fcoordinate-reference-systems-java/lists"}