[Gdal-dev] (no subject)
Frank Warmerdam
warmerdam at pobox.com
Fri Jan 27 09:09:46 EST 2006
On 1/27/06, Marc Jacquin <marc.jacquin at magellium.fr> wrote:
> I am trying to use ogr2ogr to export a layer from PostGis to MapInfo file (in fact I was testing the shapefile output).
>
> The command line I am using looks like :
>
> ogr2ogr -f "ESRI Shapefile" country PG:"user=xxx dbname=postgres host=localhost port=5432 password=xxxx" country.shp
Marc,
I'm not exactly sure why there is no error, but your request
above is really asking for country.shp to be translate into
shapefile format and put in your postgis database.
To dump the table country from postgres to shape you would use:
ogr2ogr country.shp PG:"user=..." country
To dump to mapinfo format you would do:
ogr2ogr country.mif PG:"user=..." country
The key is:
ogr2ogr -f format <dest> <source> layernames...
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list