View file.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (WarpResultC*)warpImageWithGeoTransformMBTiles:(NSArray<NSNumber*>*)geoTransformArray sourceFile:(NSString*)inFilepath destinationFile:(NSString*)outFilepath | |
{ | |
char *argv[] = { strdup("gdal_translate"), | |
strdup("-of"), strdup("MBTILES"), | |
strdup(inFilepath.UTF8String), strdup(outFilepath.UTF8String), | |
NULL }; | |
int argc = sizeof(argv) / sizeof(char*) - 1; | |
GDALDatasetH hDataset, hOutDS; |
View gist:9d73aa4358f3dafe2fd6808f7d4e9f41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (WarpResultC*)warpImageWithGeoTransform:(NSArray<NSNumber*>*)geoTransformArray sourceFile:(NSString*)inFilepath destinationFile:(NSString*)outFilepath | |
{ | |
GDALAllRegister(); | |
GDALDriverH hDriver; | |
GDALDataType eDT; | |
GDALDatasetH hDstDS; | |
GDALDatasetH hSrcDS; | |
// Open the source file. |
View gist:5677324
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface RKObjectManager (ModifyJSONRepsonse) | |
- (void)getObjectsAtPath:(NSString *)path | |
parameters:(NSDictionary *)parameters | |
modifyResponseBlock:(id (^)(id deserializedResponseBody))modifyResponseBlock | |
success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success | |
failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure; | |
- (void)getObjectsAtPathForRelationship:(NSString *)relationshipName | |
ofObject:(id)object |
View gist:5670284
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// { | |
// "category": "MyCategory" | |
// "items": [ | |
// { "id": 1, "name": "A" }, | |
// { "id": 2, "name": "B" }, | |
// { "id": 3, "name": "C" } | |
// ] | |
// } | |
// Current mapping, but missing "category" object that should be mapped to each "Item" |