[gdal-dev] Ogr2ogr Pgeo to SQL?

Dane Springmeyer blake at hailmail.net
Wed Apr 23 14:55:46 EDT 2008


Hi Frank,

Thanks for the feedback. I am ultimately importing the data with  
Geodjango python bindings to OGR and have not gotten them to work with  
GML yet, but did try that.

I had not considered SQLite, which is a great idea since Django  
supports that format as an alternative to PostgreSQL.

Thanks!

Dane



On Apr 23, 2008, at 9:11 AM, Frank Warmerdam wrote:

> Dane Springmeyer wrote:
>> Hi,
>> I've been using the PGeo driver on a windows machine to convert  
>> ESRI geodatabases/Access Databases (.mdb) to shapefiles (I have not  
>> got the driver working yet on linux). Now, I'd like to send  
>> directly to PostgreSQL (so all of my column names are not  
>> truncated), but I run my Postgres Server on a separate, non  
>> networked linux machine. As such, I'd like to use Ogr2ogr to create  
>> intermediate output, ideally a sql insert statement like shp2pgsql  
>> does.
>> My sense is that the ogr2ogr utility is not built this way (there  
>> is no SQL format specifically) and I'd be best off to actually  
>> spend the time to network my machines. Anyone have suggestions  
>> about other approaches? Perhaps there is a crafty way to capture  
>> the insert statement ogr2ogr is making and write it to a file?
>
> Dane,
>
> There is no mechanism provided for capturing the Postgres insert  
> statements.
>
> I would suggest solving the networking problem.
>
> But if that is impractical, you could also look at using more  
> expressive
> intermediate file formats like GML, SQLite for the intermediate files.
>
> 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    | President OSGeo, http://osgeo.org
>



More information about the gdal-dev mailing list