- Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
- Extract the SDK, and put the contents of the directory in a known location, I used
~/local/filegdb
. Here's an example path to one of the files:~/local/filegdb/lib/libFileGDBAPI.dylib
- I use
~/local/filegdb
so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different. - Go into the directory containing the FileGDB SDK, e.g.
~/local/filegdb
- ESRI built these dylib's using
@rpath
's, so to avoid needing to mess withDYLD_LIBRARY_PATH
, I updated the@rpath
's usinginstall_name_tool
. There might be a more elegant way to handle this. If so, comments are welcome! - Here are the commands I used to patch the dylibs, this is not required if you want to use
DYLD_LIBRARY_PATH
yourself:
This file contains hidden or 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
-- change 18 to whatever the max zoom level you want in your MBTiles | |
DELETE FROM images WHERE | |
tile_id IN (SELECT tile_id FROM map WHERE zoom_level > 18) AND | |
tile_id NOT IN (SELECT tile_id FROM map WHERE zoom_level <= 18); | |
DELETE FROM map WHERE zoom_level > 18; | |
UPDATE metadata SET value = '18' WHERE name = 'maxzoom'; |
This file contains hidden or 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
$ install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib | |
$ install_name_tool -change "@rpath/libfgdbunixrtl.dylib" "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libFileGDBAPI.dylib | |
$ install_name_tool -id "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libfgdbunixrtl.dylib |
This file contains hidden or 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
OSMUSER="coleman"; curl -s "www.overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%3B%28node%28user%3A%22$OSMUSER%22%29%3Bway%28user%3A%22$OSMUSER%22%29%3Brelation%28user%3A%22$OSMUSER%22%29%3B%29%3Bout%3B" | ruby -e "require 'json'; osm = JSON.parse(STDIN.read); nodes = osm['elements'].select {|e| e['type'] == 'node'}; ways = osm['elements'].select {|e| e['type'] == 'way'}; relations = osm['elements'].select {|e| e['type'] == 'relation'}; puts ''; puts 'stats for $OSMUSER:'; puts 'nodes: ' + nodes.count.to_s; puts 'ways: ' + ways.count.to_s; puts 'relations: ' + relations.count.to_s; puts ''" |
This file contains hidden or 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
dnl *************************************************************************** | |
dnl $Id: configure.in 24333 2012-04-28 12:18:28Z rouault $ | |
dnl | |
dnl Project: GDAL | |
dnl Purpose: Configure source file. | |
dnl Author: Frank Warmerdam, [email protected] | |
dnl | |
dnl *************************************************************************** | |
dnl Copyright (c) 2000, Frank Warmerdam | |
dnl |
This file contains hidden or 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
./configure \ | |
--with-local=yes \ | |
--prefix=$HOME/local \ | |
--with-threads \ | |
--with-libtool \ | |
--with-libtiff=internal \ | |
--with-geotiff=internal \ | |
--with-pcraster=internal \ | |
--with-pcidsk=internal \ | |
--with-libz=/usr \ |
This file contains hidden or 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
install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib | |
install_name_tool -change "@rpath/libfgdbunixrtl.dylib" "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libFileGDBAPI.dylib | |
install_name_tool -id "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libfgdbunixrtl.dylib |
This file contains hidden or 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
./configure \ | |
--with-local=yes \ | |
--prefix=/Users/zacmcc/local \ | |
--with-threads \ | |
--with-libtool \ | |
--with-libtiff=internal \ | |
--with-geotiff=internal \ | |
--with-pcraster=internal \ | |
--with-pcidsk=internal \ | |
--with-bsb \ |
This file contains hidden or 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
dnl *************************************************************************** | |
dnl $Id: configure.in 23690 2012-01-03 18:56:17Z rouault $ | |
dnl | |
dnl Project: GDAL | |
dnl Purpose: Configure source file. | |
dnl Author: Frank Warmerdam, [email protected] | |
dnl | |
dnl *************************************************************************** | |
dnl Copyright (c) 2000, Frank Warmerdam | |
dnl |
This file contains hidden or 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
(lldb) po [[NSManagedObjectContext defaultContext] objectWithID:[self projectObjectID]] | |
(id) $33 = 0x0048b520 <SNProject: 0x48b520> (entity: Project; id: 0x489040 <x-coredata://29AA8056-CC37-4157-A6DC-1D1A535BC425/Project/p1> ; data: { | |
accountID = 4f31fbfb14414036cc000006; | |
attributes = "(...not nil..)"; | |
createdAt = "2012-02-08 18:56:03 +0000"; | |
defaultFormID = nil; | |
deletedAt = nil; | |
downloadRecordFilterNELatitude = nil; | |
downloadRecordFilterNELongitude = nil; | |
downloadRecordFilterSWLatitude = nil; |