Nicolas ,

Interesting problem, I'll take a look at it. Would you create a ticket for
this issue?

Best regards,

Tamas


2012/4/18 Nicolas Garel <nga...@micromine.com>

> Hi,****
>
> ** **
>
> I’m relaunching the following thread:****
>
> http://lists.osgeo.org/pipermail/gdal-dev/2011-June/029034.html****
>
> This time with GDAL 1.9 and the problem remains.****
>
> ** **
>
> Further explanation of what I’m trying to achieve:****
>
> ** **
>
> I would like to write and read 3d spatial data. ****
>
> ** **
>
> I have a 3d point(*-1092.7172471465196* *122.9009469897652* *
> -150.11442565917974)* and 3d line (-1363.889169860787 -5.255646621772087
> -150.1144256591798,-1109.9664261063763 142.60863989620026
> -17.396886979865542)****
>
> I’ve have the passed the DIM=3D parameter when creating the layer and made
> sure that the parameter is being read properly into gdal.****
>
> ** **
>
> It seems that writing the LINESTRING into the spatial database is correct
> because I’ve been debugging OGRMSSQLSpatialTableLayer::CreateFeature and
> the SQL statement seems alright for the line:****
>
> INSERT INTO [dbo].[test01] (ogr_geometry) VALUES
> (geometry::STGeomFromText('LINESTRING *(-1363.889169860787
> -5.255646621772087 -150.1144256591798,-1109.9664261063763
> 142.60863989620026 -17.396886979865542*)',0)****
>
> ** **
>
> Now if I want to read the data back *the Z component seems to be mixed up
> with other components of other points*. Here is the output of ogrinfo
> when reading ****
>
> ** **
>
> >ogrinfo -al
> "MSSQL:server=mm00786\mm00786;database=Spatial;tables=dbo.test01;trusted_connection=yes"
> ****
>
> ** **
>
> INFO: Open of
> `MSSQL:server=mm00786\mm00786;database=Spatial;tables=dbo.test01;trusted_connection=yes'
> ****
>
>       using driver `MSSQLSpatial' successful.****
>
> ** **
>
> Layer name: test01****
>
> Geometry: Unknown (any)****
>
> Feature Count: 2****
>
> Extent: (-1363.889170, -150.114426) - (142.608640, 122.900947)****
>
> Layer SRS WKT:****
>
> (unknown)****
>
> FID Column = ogr_fid****
>
> Geometry Column = ogr_geometry****
>
> OGRFeature(test01):1****
>
>   POINT (-1092.7172471465196 122.9009469897652 -150.11442565917974)****
>
> ** **
>
> OGRFeature(test01):2****
>
>   LINESTRING *(-1363.889169860787 -5.255646621772087
> -1109.9664261063763,142.60863989620026 -150.1144256591798
> -17.396886979865542)*****
>
> ** **
>
> Coordinates of the lines are WRONG. Check above with the example given
> above. ****
>
> ** **
>
> However IF I specify a different geometry format other than native the X
> and Y coordinates are read properly but Z is omitted. See below ogrinfo
> ouput:****
>
> ** **
>
> >ogrinfo -al
> "MSSQL:server=mm00786\mm00786;database=Spatial;tables=dbo.test01;trusted_connection=yes;
> *GeometryFormat=wkt;"*****
>
> INFO: Open of
> `MSSQL:server=mm00786\mm00786;database=Spatial;tables=dbo.test01;trusted_connection=yes;GeometryFormat=wkt;'
> ****
>
>       using driver `MSSQLSpatial' successful.****
>
> ** **
>
> Layer name: test01****
>
> Geometry: Unknown (any)****
>
> Feature Count: 2****
>
> Extent: (-1363.889170, -5.255647) - (-1092.717247, 142.608640)****
>
> Layer SRS WKT:****
>
> (unknown)****
>
> FID Column = ogr_fid****
>
> Geometry Column = ogr_geometry****
>
> OGRFeature(test01):1****
>
>   POINT (-1092.7172471465196 122.9009469897652)****
>
> ** **
>
> OGRFeature(test01):2****
>
>   LINESTRING *(-1363.889169860787 -5.255646621772087,-1109.9664261063763
> 142.60863989620026*)****
>
> ** **
>
> Can you *please* tell me if the problem is from the writing or reading of
> GDAL or maybe I’m simply missing some information during writing or
> reading?!****
>
> ** **
>
> Please reply to me. ****
>
> ** **
>
> *Nicolas Garel **|* Junior Software Engineer****
>
> *M*icromine Product
> *Email **|** *nga...@micromine.com****
>
> ** **
>
> http://www.micromine.com****
>
> ** **
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>

<<mm_corp_emailsig_perth.gif>>

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

Reply via email to