Skip to content

Instantly share code, notes, and snippets.

View gislars's full-sized avatar

Lars Lingner gislars

  • mapwebbing
  • Berlin
View GitHub Profile
@gislars
gislars / filegdb2shp
Created July 26, 2013 13:45
Howto use gdal/ogr to access a FileGDB and convert it to shapefile
get the FileGDB API http://www.esri.com/apps/products/download/
extract it somewhere on your system and remember the path :)
mkdir build #directory where we are playing around
cd build
git clone https://github.com/OSGeo/gdal.git
cd gdal
./configure --with-fgdb=/path/to/your/FileGDB_API
make
(make install) optional, I'm just using it locally
@gislars
gislars / gist:6048109
Created July 21, 2013 09:54
vrt file
<OGRVRTDataSource>
<OGRVRTLayer name="mylines">
<SrcDataSource>berlin-small.osm</SrcDataSource>
<LayerSRS>WGS84</LayerSRS>
<Field name="other_tags"/>
<Field name="highway"/>
<Field name="osm_id"/>
</OGRVRTLayer>
</OGRVRTDataSource>
MAP
FONTSET "fonts.lst"
IMAGETYPE png
MAXSIZE 25000
SIZE 800 800
EXTENT -20000000 -20000000 20000000 20000000
UNITS meters
WEB
METADATA
"ows_enable_request" "*"
@gislars
gislars / gist:6048063
Created July 21, 2013 09:35
ogrinfo -al -so berlin-small.osm
Had to open data source read-only.
INFO: Open of `berlin-small.osm'
using driver `OSM' successful.
Layer name: points
Geometry: Point
Feature Count: -1
Extent: (13.425000, 52.465700) - (13.460100, 52.481200)
Layer SRS WKT:
GEOGCS["WGS 84",