[Gdal-dev] OGR2OGR WKT MSSQL

Sture Dingsøyr candalt at online.no
Thu May 24 08:41:07 EDT 2007


Hi!!

Have some simple linestringdata (WKT) saved in an MS SQL table. I use these in an Mapserver application (reading via OGR).

But i noticed that some of my records just wont show in my map, so i used OGR2OGR to export data from the MS SQL table to a ESRI SHapefile.

What happens is that most of my records are OK in the OGR2OGR dump...but some records are just displayed as "NullShapes" (using the shpdump tool) e.g:

Shape:389 (NullShape)  nVertices=0, nParts=0
  Bounds:(       0.000,       0.000, 0, 0)
      to (       0.000,       0.000, 0, 0)

The "problem" records are not any more "complicated" than any of the other records in my dataset. Here is an example:

LINESTRING(12.08215200000000100000 63.86936800000000100000,12.07480500000000000000 63.88801300000000100000,12.06554500000000000000 63.89666299999999700000,12.04424800000000000000 63.91947499999999800000,12.00620500000000000000 63.94377200000000300000,11.98011700000000000000 63.95999299999999700000,11.99817799999999900000 63.98335999999999800000,12.00431700000000000000 63.99201200000000300000,12.10164000000000000000 64.05365000000000500000,12.13236000000000000000 64.06338200000000400000,12.17374200000000100000 64.07348799999999800000,12.18377699999999900000 64.07448800000000200000,12.18374500000000000000 64.07431499999999900000,12.18355200000000100000 64.07441199999999500000,12.18407200000000000000 64.07432000000000000000,12.18895700000000000000 64.07544000000000000000,12.31264500000000000000 64.10805700000000200000,12.32343300000000000000 64.11144799999999600000,12.32346199999999900000 64.11141800000000000000,12.32546200000000000000 64.11242199999999500000,12.39786200000000000000 64.13625700000000100000)

Any idea why some (very few) records in my MS SQL table is not possible to dump to shapefile via OGR2OGR?

All help appriciated :-)

Cheers
Sture


More information about the Gdal-dev mailing list