OGC API Features JSON iOS
OGC API Features JSON Lib
OGC API 库是在 国家地理情报局 (NGA) 与 BIT Systems 的合作下开发的。政府拥有“无限权利”并发布此软件,通过为开发者提供新的方向的机会来增加政府投资的效益。软件的使用、修改和分发权在 MIT 许可证 中规定。
请求拉取
如果您想为此项目做出贡献,请创建一个 pull request。我们将审查 pull request 并讨论更改。此项目的所有 pull request 贡献都将依据 MIT 许可证发布。
在 NGA 员工修改之前发布的开源许可软件,被认为是“联合作品”(见 17 USC § 101);部分版权保护,部分属于公共领域,作为整体受非政府作者的版权保护,并根据原始开源许可证的条款发布。
关于
OGC API Features JSON 是一个用于编写和读取 OGC API - Features JSON 的 iOS Objective-C 库。
使用方法
查看最新的 Appledoc
读取
OAFCollections *collections = [OAFFeaturesConverter jsonToCollections:collectionsContent];
OAFCollection *collection = [OAFFeaturesConverter jsonToCollection:collectionContent];
OAFFeatureCollection *featureCollection = [OAFFeaturesConverter jsonToFeatureCollection:featureCollectionContent];
写入
NSString *collectionsContent = [OAFFeaturesConverter objectToJSON:collections];
NSString *collectionContent = [OAFFeaturesConverter objectToJSON:collection];
NSString *featureCollectionContent = [OAFFeaturesConverter objectToJSON:featureCollection];
构建
使用 Xcode 和/或 CocoaPods 构建此库
pod repo update
pod install
在 Xcode 中打开 ogc-api-features-json-ios.xcworkspace 或从命令行构建
xcodebuild -workspace 'ogc-api-features-json-ios.xcworkspace' -scheme ogc-api-features-json-ios build
在 Xcode 或命令行中运行测试
xcodebuild test -workspace 'ogc-api-features-json-ios.xcworkspace' -scheme ogc-api-features-json-ios -destination 'platform=iOS Simulator,name=iPhone 14'
包含库
通过在 Podfile 中指定支持选项包含此库。
从 CocoaPods 拉取
pod 'ogc-api-features-json-ios', '~> 4.2.3'
从 GitHub 拉取
pod 'ogc-api-features-json-ios', :git => 'https://github.com/ngageoint/ogc-api-features-json-ios.git', :branch => 'master'
pod 'ogc-api-features-json-ios', :git => 'https://github.com/ngageoint/ogc-api-features-json-ios.git', :tag => '4.2.3'
作为本地项目包含
pod 'ogc-api-features-json-ios', :path => '../ogc-api-features-json-ios'
Swift
要从 Swift 中使用,请从 Swift 项目中导入 ogc-api-features-json-ios 桥接头
#import "ogc-api-features-json-ios-Bridging-Header.h"
远程依赖
- Simple Features GeoJSON (The MIT License (MIT)) - Simple Features GeoJSON 库