[gdal-dev] Odd behavior with OGR2OGR and arcSDE - tries to copy multiple layers.

2012-09-05 Thread Phil Scadden
If I copy a set from sde to postgis with:

ogr2ogr -f PostgreSQL PG:host=myhost user=myuser dbname=mydb 
password=** port=5432 -nln postgis_name 
SDE:SDE,5151,,***,,sde_name

then the process works but then it comes with a message
FAILED: layer aready exists and -append not specified, but reports that 
it is trying to copy a completely different layer from the one specified
in SDE. It is a valid sde layer. If I put -overwrite switch in, then 
something even more curious happens. It appears to go through all the 
layers in sde and one by one replaces the postgis layer with each (I 
discovered by interrupting the process or looking at data in postgis).

I am using GDAL from stable version of MS4W, with the sde dlls for 
arcSDE 9.3

-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Odd behavior with OGR2OGR and arcSDE - tries to copy multiple layers.

2012-09-05 Thread Chaitanya kumar CH
Phil,

Try the same command with the ArcSDE layer name specified at the end for
ogr2ogr.

On Thu, Sep 6, 2012 at 4:41 AM, Phil Scadden p.scad...@gns.cri.nz wrote:

 If I copy a set from sde to postgis with:

 ogr2ogr -f PostgreSQL PG:host=myhost user=myuser dbname=mydb
 password=** port=5432 -nln postgis_name
 SDE:SDE,5151,,***,,sde_name

 then the process works but then it comes with a message
 FAILED: layer aready exists and -append not specified, but reports that
 it is trying to copy a completely different layer from the one specified
 in SDE. It is a valid sde layer. If I put -overwrite switch in, then
 something even more curious happens. It appears to go through all the
 layers in sde and one by one replaces the postgis layer with each (I
 discovered by interrupting the process or looking at data in postgis).

 I am using GDAL from stable version of MS4W, with the sde dlls for
 arcSDE 9.3

 --
 Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St,
 Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477
 5232

 Notice: This email and any attachments are confidential. If received in
 error please destroy and immediately notify us. Do not copy or disclose the
 contents.

 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Odd behavior with OGR2OGR and arcSDE - tries to copy multiple layers.

2012-09-05 Thread Phil Scadden


 Try the same command with the ArcSDE layer name specified at the end 
 for ogr2ogr.
You  mean?
ogr2ogr -f PostgreSQL PG:host=myhost user=myuser dbname=mydb 
password=** port=5432 -nln postgis_name 
SDE:SDE,5151,,***,,sde_name sde_name

I wonder why layer in the SDE format string seemed to be optional.


Notice: This email and any attachments are confidential. If received in error 
please destroy and immediately notify us. Do not copy or disclose the contents.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Odd behavior with OGR2OGR and arcSDE - tries to copy multiple layers.

2012-09-05 Thread Chaitanya kumar CH
Yes.

Perhaps the SDE driver is reading the other layers as well. In the docs it
says that specifying the layer name in the SDE string will make the driver
skip reading the summary metadata for other layers. But it may still report
the other layers to ogr2ogr.

So, specifying the layer to ogr2ogr will ensure that other layers are
skipped.

On Thu, Sep 6, 2012 at 10:41 AM, Phil Scadden p.scad...@gns.cri.nz wrote:


 
  Try the same command with the ArcSDE layer name specified at the end
  for ogr2ogr.
 You  mean?
 ogr2ogr -f PostgreSQL PG:host=myhost user=myuser dbname=mydb
 password=** port=5432 -nln postgis_name
 SDE:SDE,5151,,***,,sde_name sde_name

 I wonder why layer in the SDE format string seemed to be optional.


 Notice: This email and any attachments are confidential. If received in
 error please destroy and immediately notify us. Do not copy or disclose the
 contents.

 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev