Skip to content

Instantly share code, notes, and snippets.

@jsta
Last active February 4, 2017 15:45
Show Gist options
  • Save jsta/6caaf04ca9f26a830985dcb5c9e9651b to your computer and use it in GitHub Desktop.
Save jsta/6caaf04ca9f26a830985dcb5c9e9651b to your computer and use it in GitHub Desktop.
Setup and test an ubuntu geopackage environment

Setup

docker pull ubuntu

docker run -it ubuntu bash

cat /etc/lsb-release

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=16.04

DISTRIB_CODENAME=xenial

DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

apt-get update

apt-get install wget

apt-get install software-properties-common

apt-get install unzip

GDAL 1*

apt-get install gdal-bin

ogr2ogr --version

GDAL 1.11.3, released 2015/09/16

ogr2ogr --formats | grep GPKG

-> "GPKG" (read/write)

GDAL 2*

add-apt-repository ppa:ubuntugis/ubuntugis-unstable

apt-get update

apt-get install gdal-bin

ogr2ogr --version

GDAL 2.1.2, released 2016/10/24

ogr2ogr --formats | grep GPKG

GPKG -raster,vector- (rw+vs): GeoPackage

wget ftp://ftp1.fgdl.org/pub/county/palmbeach/palmbeach_core/nhd24waterbody_may0650.zip

unzip nhd24waterbody_may0650.zip

ogr2ogr -f GPKG test.gpkg nhd24waterbody_may0650.shp

ogrinfo test.gpkg

INFO: Open of `test.gpkg'

 using driver `GPKG' successful.

1: nhd24waterbody_may0650 (3D Polygon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment