{"id":21819955,"url":"https://github.com/ngageoint/projections-ios","last_synced_at":"2025-04-14T02:43:11.248Z","repository":{"id":56933024,"uuid":"379936550","full_name":"ngageoint/projections-ios","owner":"ngageoint","description":"Projections iOS Library","archived":false,"fork":false,"pushed_at":"2024-04-09T16:14:55.000Z","size":21884,"stargazers_count":9,"open_issues_count":0,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T16:48:49.323Z","etag":null,"topics":["cocoapods","coordinate-reference-system","coordinate-reference-systems","coordinate-transformation","coordinate-transformations","crs","ios","ios-lib","nga","objective-c","objective-c-library","ogc","proj","proj4","projections","swift","well-known-text","wkt","wkt-crs","xcode"],"latest_commit_sha":null,"homepage":"https://ngageoint.github.io/projections-ios/","language":"Objective-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/ngageoint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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:36:33.000Z","updated_at":"2025-03-14T13:38:35.000Z","dependencies_parsed_at":"2024-04-09T16:02:29.749Z","dependency_job_id":"fe5ff2db-c7a9-4d7c-b5cb-b3e311025d8b","html_url":"https://github.com/ngageoint/projections-ios","commit_stats":{"total_commits":171,"total_committers":3,"mean_commits":57.0,"dds":0.3508771929824561,"last_synced_commit":"a9946e2d0329b4a01d09ae02f0858db54bcb2ce8"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fprojections-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fprojections-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fprojections-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngageoint%2Fprojections-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngageoint","download_url":"https://codeload.github.com/ngageoint/projections-ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248812506,"owners_count":21165442,"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":["cocoapods","coordinate-reference-system","coordinate-reference-systems","coordinate-transformation","coordinate-transformations","crs","ios","ios-lib","nga","objective-c","objective-c-library","ogc","proj","proj4","projections","swift","well-known-text","wkt","wkt-crs","xcode"],"created_at":"2024-11-27T16:27:27.807Z","updated_at":"2025-04-14T02:43:11.228Z","avatar_url":"https://github.com/ngageoint.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Projections iOS\n\n#### Projections Lib ####\n\nThe Projections 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[Projections](http://ngageoint.github.io/projections-ios/) is an iOS library for performing projection conversions between coordinates.\n\nFor conversions between geometries, see [Simple Features Projections](https://ngageoint.github.io/simple-features-proj-ios/).\n\n### Usage ###\n\nView the latest [Appledoc](http://ngageoint.github.io/projections-ios/docs/api/)\n\n```objectivec\n\n// CLLocationCoordinate2D coordinate = ...\n\nPROJProjection *projection1 = [PROJProjectionFactory projectionWithAuthority:PROJ_AUTHORITY_EPSG\n                                                                  andIntCode:PROJ_EPSG_WEB_MERCATOR];\nPROJProjection *projection2 = [PROJProjectionFactory projectionWithName:@\"EPSG:4326\"];\nNSString *params = @\"+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 +towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs\";\nPROJProjection *projection3 = [PROJProjectionFactory projectionWithAuthority:PROJ_AUTHORITY_EPSG\n                                                                  andIntCode:3123\n                                                                   andParams:params];\nNSMutableString *definition = [NSMutableString string];\n[definition appendString:@\"PROJCS[\\\"Lambert_Conformal_Conic (1SP)\\\",\"];\n[definition appendString:@\"GEODCRS[\\\"GCS_North_American_1983\\\",\"];\n[definition appendString:@\"DATUM[\\\"North_American_Datum_1983\\\",\"];\n[definition appendString:@\"SPHEROID[\\\"GRS_1980\\\",6371000,0]],\"];\n[definition appendString:@\"PRIMEM[\\\"Greenwich\\\",0],\"];\n[definition appendString:@\"UNIT[\\\"Degree\\\",0.017453292519943295]],\"];\n[definition appendString:@\"PROJECTION[\\\"Lambert_Conformal_Conic_1SP\\\"],\"];\n[definition appendString:@\"PARAMETER[\\\"latitude_of_origin\\\",25],\"];\n[definition appendString:@\"PARAMETER[\\\"central_meridian\\\",-95],\"];\n[definition appendString:@\"PARAMETER[\\\"scale_factor\\\",1],\"];\n[definition appendString:@\"PARAMETER[\\\"false_easting\\\",0],\"];\n[definition appendString:@\"PARAMETER[\\\"false_northing\\\",0],\"];\n[definition appendString:@\"PARAMETER[\\\"standard_parallel_1\\\",25],\"];\n[definition appendString:@\"UNIT[\\\"Meter\\\",1],AUTHORITY[\\\"EPSG\\\",\\\"9801\\\"]]\"];\nPROJProjection *projection4 = [PROJProjectionFactory projectionByDefinition:definition];\n\nPROJProjectionTransform *transform = [projection1 transformationWithProjection:projection2];\nPROJProjectionTransform *inverseTransform = [transform inverseTransformation];\n\nCLLocationCoordinate2D transformed = [transform transform:coordinate];\nCLLocationCoordinate2D inverseTransformed = [inverseTransform transform:transformed];\n\n[transform destroy];\n[inverseTransform destroy];\n\n```\n\n### Build ###\n\n[![Build \u0026 Test](https://github.com/ngageoint/projections-ios/workflows/Build%20\u0026%20Test/badge.svg)](https://github.com/ngageoint/projections-ios/actions/workflows/build-test.yml)\n\n**IMPORTANT** -\nBe sure your Mac has the `autoconf`, `automake`, and `glibtoolize` utilities.  These are required to build\nthe [PROJ](https://github.com/ngageoint/PROJ) dependency.  Without them, `pod install` will fail.  The easiest way to get these is to [`brew install`](https://brew.sh/) them:\n```\nbrew install automake\nbrew install libtool\n```\n\nBuild this repository using Xcode and/or CocoaPods:\n\n    pod repo update\n    pod install\n\nOpen proj-ios.xcworkspace in Xcode or build from command line:\n\n    xcodebuild -workspace 'proj-ios.xcworkspace' -scheme proj-ios build\n\nRun tests from Xcode or from command line:\n\n    xcodebuild test -workspace 'proj-ios.xcworkspace' -scheme proj-ios -destination 'platform=iOS Simulator,name=iPhone 15'\n\n### Include Library ###\n\nSee the [above note](https://github.com/ngageoint/projections-ios#build) about `automake` and `glibtoolize`.\n\nInclude this repository by specifying it in a Podfile using a supported option.\n\nPull from [CocoaPods](https://cocoapods.org/pods/proj-ios):\n\n    pod 'proj-ios', '~\u003e 2.0.3'\n\nIf you use `use_modular_headers!` in your Podfile, disable modular headers for the [PROJ](https://github.com/ngageoint/PROJ) dependency:\n\n    pod 'proj-ios', '~\u003e 2.0.3'\n    pod 'PROJ', :modular_headers =\u003e false\n\nPull from GitHub:\n\n    pod 'proj-ios', :git =\u003e 'https://github.com/ngageoint/projections-ios.git', :branch =\u003e 'master'\n    pod 'proj-ios', :git =\u003e 'https://github.com/ngageoint/projections-ios.git', :tag =\u003e '2.0.3'\n\nInclude as local project:\n\n    pod 'proj-ios', :path =\u003e '../projections-ios'\n\n### Swift ###\n\nTo use from Swift, import the proj-ios bridging header from the Swift project's bridging header\n\n    #import \"proj-ios-Bridging-Header.h\"\n\n```swift\n\n// CLLocationCoordinate2D coordinate = ...\n\nlet projection1 : PROJProjection = PROJProjectionFactory.projection(withAuthority: PROJ_AUTHORITY_EPSG, andIntCode: PROJ_EPSG_WEB_MERCATOR)\nlet projection2 : PROJProjection = PROJProjectionFactory.projection(withName: \"EPSG:4326\")\nlet projection3 : PROJProjection = PROJProjectionFactory.projection(withAuthority: PROJ_AUTHORITY_EPSG, andIntCode: 3123,\n    andParams: \"+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +y_0=0 +ellps=clrk66 \"\n        + \"+towgs84=-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06 +units=m +no_defs\")\nlet projection4 : PROJProjection = PROJProjectionFactory.projection(byDefinition: \"PROJCS[\\\"Lambert_Conformal_Conic (1SP)\\\",\"\n    + \"GEODCRS[\\\"GCS_North_American_1983\\\",\"\n    + \"DATUM[\\\"North_American_Datum_1983\\\",\"\n    + \"SPHEROID[\\\"GRS_1980\\\",6371000,0]],\"\n    + \"PRIMEM[\\\"Greenwich\\\",0],\"\n    + \"UNIT[\\\"Degree\\\",0.017453292519943295]],\"\n    + \"PROJECTION[\\\"Lambert_Conformal_Conic_1SP\\\"],\"\n    + \"PARAMETER[\\\"latitude_of_origin\\\",25],\"\n    + \"PARAMETER[\\\"central_meridian\\\",-95],\"\n    + \"PARAMETER[\\\"scale_factor\\\",1],\"\n    + \"PARAMETER[\\\"false_easting\\\",0],\"\n    + \"PARAMETER[\\\"false_northing\\\",0],\"\n    + \"PARAMETER[\\\"standard_parallel_1\\\",25],\"\n    + \"UNIT[\\\"Meter\\\",1],AUTHORITY[\\\"EPSG\\\",\\\"9801\\\"]]\")\n\nlet transform : PROJProjectionTransform = projection1.transformation(with: projection2)\nlet inverseTransform : PROJProjectionTransform = transform.inverseTransformation()\n\nlet transformed : CLLocationCoordinate2D = transform.transform(coordinate)\nlet inverseTransformed : CLLocationCoordinate2D = inverseTransform.transform(transformed)\n\ntransform.destroy()\ninverseTransform.destroy()\n\n```\n\n### Remote Dependencies ###\n\n* [PROJ](https://proj.org/) (The MIT License (MIT)) - Cartographic projection software\n* [Coordinate Reference Systems](https://github.com/ngageoint/coordinate-reference-systems-ios) (The MIT License (MIT)) - Coordinate Reference Systems Library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngageoint%2Fprojections-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngageoint%2Fprojections-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngageoint%2Fprojections-ios/lists"}