Skip to content

Instantly share code, notes, and snippets.

View nygeog's full-sized avatar

Danny S. nygeog

View GitHub Profile
@zhm
zhm / gist:2005158
Last active February 28, 2022 17:11
Building GDAL 1.9 with ESRI FileGDB support on OS X Lion

Building GDAL 1.9.x with ESRI FileGDB support on OS X Lion

  • 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 with DYLD_LIBRARY_PATH, I updated the @rpath's using install_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:
@rburhum
rburhum / fabfile.py
Created June 19, 2012 17:31
Fabric script to compile FileGDB
from fabric.api import *
from fabric.contrib.console import confirm
import tempfile
import re
PROJ_VER='4.8.0'
GEOS_VER='3.3.3'
GDAL_VER='1.9.0'
PROJ_PATH='/usr/local/proj/' + PROJ_VER
@tmcw
tmcw / README.md
Created October 31, 2012 15:00
GIS with Python, Shapely, and Fiona Example 1 - CSV Files
@urschrei
urschrei / extract_from_gpx.py
Last active February 23, 2023 22:38
Extract basic GPS data (lat, lon, elevation, timestamp) from GPX, and dump it into a CSV file. Requires the gpxpy library.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Output Elevation, Lat, Long, and Timestamp series from GPX to CSV
Requires gpxpy
This script expects your input GPX to be located in a subdir named 'data'
"""
import os
@JosefJezek
JosefJezek / how-to-use-pelican.md
Last active May 12, 2024 11:19
How to use Pelican on GitHub Pages
@arjendk
arjendk / cartodb-install-ubuntu-1204.md
Last active May 20, 2021 13:33
Installing CartoDB on Ubuntu Server 12.04
@dlo
dlo / export_foursquare_checkins.py
Last active February 27, 2020 12:27
Download all your Foursquare checkins with Python.
# pip install requests
import requests
import json
url_template = 'https://api.foursquare.com/v2/users/self/checkins?limit=250&oauth_token={}&v=20131026&offset={}'
# If you navigate to https://developer.foursquare.com/docs/explore, Foursquare
# will generate an OAuth token for you automatically. Cut and paste that token
# below.
token = ""
@StatusReport
StatusReport / waze.py
Created December 7, 2013 16:46
Simple Waze wrapper for querying route cross time with / without real time data. More work is required with parsing the JSON returned from the server to extract the textual route information, but it should be pretty straightforward.
import json
import urllib
class WazeLocationNotFoundException(Exception):
pass
class Waze(object):
_BASE_URL = "http://www.waze.co.il/"
def __mozi(self, query):
@bertspaan
bertspaan / README.md
Created January 2, 2014 15:28
Python script to convert DBF database file to CSV
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #