O'Reilly logo

Web Mapping Illustrated by Tyler Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

OGR Simple Features Library

OGR is part of the FWTools package that's available at http://fwtools.maptools.org. The OGR project home page (http://www.gdal.org/ogr) describes OGR as:

... a C++ open source library (and command line tools) providing read (and sometimes write) access to a variety of vector file formats including ESRI Shapefiles, S-57, SDTS, PostGIS, Oracle Spatial, and Mapinfo mid/mif and TAB formats.

Tip

The historical definition of the acronym OGR is irrelevant today, but it's used throughout the code base, making it difficult to change.

OGR supports more than 16 different vector formats and has utilities similar to GDAL's raster utilities.

Vector Formats Supported by OGR

The following list of the vector data formats supported by OGR was taken from the OGR formats web page at http://www.gdal.org/ogr/ogr_formats.html. The web page also shows which formats can be written or only read by OGR.

Arc/Info Binary Coverage
ESRI shapefile
DODS/OPeNDAP
FMEObjects Gateway
GML
IHO S-57 (ENC)
Mapinfo file
Microstation DGN
OGDI vectors
ODBC
Oracle Spatial
PostgreSQL
SDTS
UK .NTF
U.S. Census TIGER/Line
VRT: Virtual Datasource

OGR is part of the GDAL/OGR project and is packaged with GDAL. GDAL deals with raster or image data, and OGR deals with vector data. GDAL is to painting as OGR is to connect-the-dot drawings. These data access and conversion libraries cover the breadth of mapping data.

OGR Utilities and Examples

Like GDAL, OGR consists of a set of libraries that can be used in applications. It also ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required