Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-23 Thread Benjamin
gt;> > >>>> > >>>> http://www.gdal.org/ogr/classOGRDataSource.html#aa6acc228db6513784a56ce12334a8c33 >>>> > SQLExecute() . >>>> > [code] >>>> > string request = "*SELECT * FROM MY_TABLE WHERE CHART_ID = 'ID'*&quo

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-20 Thread Benjamin
; > serverLayer.GetLayerDefn().GetFieldCount(); //return 3 >>> > serverLayer.GetLayerDefn().GetFieldDefn(0).GetName(); //return "D" >>> > serverLayer.GetLayerDefn().GetFieldDefn(1).GetName(); //return >>> "CHART_ID" >>

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-18 Thread Chaitanya kumar CH
0; i < memFeature.GetFieldCount(); i++) > > namesColumnsArray[i] = memFeature.GetFieldDefnRef(i).GetName(); > > Geometry memGeometry = memFeature.GetGeometryRef(); > > [/code] > > ** ** > > Results :**** > > namesColumnsArray = { D , CHART_ID, WKB_GEOM

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-18 Thread Benjamin LUX
namesColumnsArray = { D , CHART_ID, WKB_GEOMETRY } memGeometry = null I don’t see what I can add to this :/ If you want more details said me. Link to the thread : http://osgeo-org.1560.n6.nabble.com/gdal-dev-Ogr-ExecuteSQL-with-MSSQL-and-geometry-column-tp4988831.

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-18 Thread Chaitanya kumar CH
xt.Encoding.UTF8.GetBytes(memFeature.GetFieldAsString("WKB_GEOMETRY")); > > Geometry memGeom = Geometry.CreateFromWkb(memWkb); > > [/code] > > Because I can't use memFeature.GetGeometryRef() > > [code] > > memFeature.GetLayerCount();

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-18 Thread Chaitanya kumar CH
n't know if I have to use UTF8, ASCII, Unicode or other. > If you know what encoding is use, or better an other trick to have a > geometry in my memLayer or serverLayer I heard you with interest ! > > > Sorry for my spelling, English isn't my native tongue language. > > Be

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-18 Thread Benjamin
r an other trick to have a geometry in my memLayer or serverLayer I heard you with interest ! Sorry for my spelling, English isn't my native tongue language. Benjamin Ps : link to the thread: http://osgeo-org.1560.n6.nabble.com/gdal-dev-Ogr-ExecuteSQL-with-MSSQL-and-geometry-column-tp49

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-18 Thread Even Rouault
Selon Benjamin : > "You can access the geometry like with any other ogr feature." > Hopefully, memFeature.GetGeometryRef() should do it ! ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-18 Thread Benjamin
etry.CreateFromWkb(memWkb); [/code] It's UTF8, ASCII, Unicode ? -- View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-Ogr-ExecuteSQL-with-MSSQL-and-geometry-column-tp4988831p4988966.html Sent from the GDAL - Dev mail

Re: [gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-17 Thread Chaitanya kumar CH
rverLayer ( or a layer provide by a Memory Driver) have any > method "ChoseGeometryField" or "SetGeometryColumn" (or I have missed it). > > > If I call serverDataSource.GetLayerByName("MY_TABLE").GetGeometryColumn() > it > work fine and result "

[gdal-dev] Ogr: ExecuteSQL with MSSQL and geometry column

2012-07-17 Thread Benjamin
quot;MY_TABLE").GetGeometryColumn() it work fine and result "WKB_GEOMETRY". Any suggests ? Regards, Benjamin. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-Ogr-ExecuteSQL-with-MSSQL-and-geometry-column-tp4988831.html Sent from the GDAL - Dev maili