[gdal-dev] ogr2ogr different behaviour on different OS platforms (Windows 7 vs XP)

Even Rouault even.rouault at mines-paris.org
Fri Oct 21 16:33:40 EDT 2011


Le vendredi 21 octobre 2011 22:26:07, hdam99 at gmail.com a écrit :
> Hi,
> 
> I use the same ogr2ogr 1.8.1 running on both Windows 7 (64-bit) and XP.  I
> got the expected result from Windows 7, but XP gave me warning and errors.
> The ogr2ogr command is:
> 
> ogr2ogr.exe -f PostgreSQL "PG:dbname=name user=user password=pwd
> host=host_name port=5432" OCI:name/pwd at serviceID:table_name -overwrite -nlt
> POLYGON -nln new_table_name -sql "select * from table_name where column_n
> like '%somePattern%'"
> 
> The XP warns of the conflict of using both -nln and -sql at the same time.
> It also issue error in creating the table.
> 
> Why are there error/warning from XP version, and how can I fix it?
> 

This is very surprising. I've reviewed the code of ogr2ogr and can't see any 
warning telling about a conflict of using both -nln and -sql at the same time

The only somehow related message is "layer names ignored in combination with -
sql", but this is not related with the use of -nln. It is issued if you try to 
do this : ogr2ogr destdatasource srcdatasource srclayername -sql "something"

If it is the above error message, then it would suggest you perhaps didn't 
issue the exact same command line on both systems, and on one of them, you 
could have forgotten to specify "-nln". This is my best bet actually ;-)

Provided it is not the above error message, could you paste *verbatim* the 
error message you got ?

> Thanks - H
> 
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/ogr2ogr-different-behaviour-on-diff
> erent-OS-platforms-Windows-7-vs-XP-tp6918436p6918436.html Sent from the
> GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list