Database Reference
In-Depth Information
Once we have verified that GDAL can correctly read the features from the virtual
driver,wecaneasilyimporttheminPostGISusingthepopular
ogr2ogr
command-
line utility. The
ogr2ogr
command has a plethora of options, so refer to its docu-
mentation at
http://www.gdal.org/ogr2ogr.html
for a more in-depth discussion.
In this recipe, you have just seen some of these options, such as:
•
-where option
: Used toexport just a selection of the original feature class
•
-t_srs option
:Usedtoreprojectthedatatoadifferentspatialreferencesys-
tem
•
-lco layer creation option
: Used to provide the schema where we would
wanttostorethetable(withoutit,thenewspatialtablewouldbecreatedin
the
public
schema) and the name of the geometry field in the output layer