OGR C++ open-source library
File type: Source code and script file
An .ogr file is associated with source code for the OGR C++ open-source library, which provides access to vector geospatial data and command-line tools.
File type category:
Source code and script file
Date updated: November 19, 2026
OGR is an open-source C++ library and set of command-line tools for reading and, where supported, writing vector geospatial data. It is the vector-data component of GDAL. An .ogr file is associated with the library's source code; the extension does not identify a standard geospatial dataset or compiled-library format.
Drivers provide access to vector data sources including ESRI Shapefiles, S-57, SDTS, PostGIS, Oracle Spatial, and MapInfo MID/MIF and TAB. Read and write support varies by driver. The C API can be called from languages able to use DLL functions, including Visual Basic and Delphi.
The OGR/PHP extension provides PHP access to OGR functionality. DM Solutions Group developed and maintains it. Lars V. Nielsen and Hvenegaard & Meklenborg funded its initial development and allowed it to remain open source. It can be built into PHP or loaded as a dynamic library, such as a .dll on Windows or a .so on Unix.
Use Visual C++ or C++ Builder to open the .ogr file as source code. If the IDE does not recognize the extension, open it as a text file.
An .ogr source-code file is not a vector dataset, so it is not converted with a geospatial data-format converter. To reuse its code elsewhere, adapt or port it for the target environment.
Software applications that handle other tasks involving ogr files:
Microsoft Windows