id summary reporter owner description type status priority milestone component version severity resolution keywords cc 2727 ogrinfo returns 'Corrupt data' error for wkt of length 1023 characters amayuk chaitanya "ogrinfo returns 'Error 1: GetNextRawFeatures(): Corrupt data' when used with a wkt feature which is of length 1023 characters. This was seen with data in a SQL server 2008 express database. To create a table and populate it with test data run the following script: {{{ CREATE TABLE [dbo].[snhd_wkt2]( [ID] [int] NULL, [XMIN] [float] NULL, [YMIN] [float] NULL, [XMAX] [float] NULL, [YMAX] [float] NULL, [WKT] [varchar](max) NULL ) ON [PRIMARY] INSERT INTO [dbo].[snhd_wkt2] VALUES ('1', '424137.474088898', '140734.844325094', '424381.173359863', '140870.555478181', 'Polygon ((424141.423 140736.164,424141.415 140736.164,424141.432 140736.174,424141.860 140736.574,424142.512 140737.224,424143.353 140738.223,424144.103 140739.283,424144.787 140740.403,424145.356 140741.582,424145.851 140742.792,424146.230 140744.052,424146.544 140745.311,424146.692 140746.611,424146.791 140747.921,424146.758 140749.230,424146.634 140750.530,424146.387 140751.829,424146.041 140753.089,424145.604 140754.309,424145.480 140754.589,424144.870 140755.568,424144.120 140757.328,424143.246 140759.127,424140.929 140763.916,424137.474 140770.954,424158.928 140773.253,424179.037 140778.462,424194.835 140782.231,424243.481 140812.932,424280.105 140836.445,424296.257 140847.032,424330.903 140864.627,424359.448 140870.555,424372.013 140868.036,424379.195 140862.118,424381.173 140848.472,424374.528 140833.036,424356.397 140826.748,424323.004 140824.059,424266.460 140798.386,424235.945 140782.051,424209.016 140767.695,424196.088 140751.180,424173.472 140739.683,424151.573 140734.844,424141.423 140736.164))') }}} Create an ODBC connection (in this case called 'SpatialTest' to the SQL Server database and run the following ogrinfo command (in this case with a user/password both of 'test'): {{{ ogrinfo -ro -so ""ODBC:test/test@spatialtest"" snhd_wkt2 }}} The following is returned: {{{ ERROR 1: Column Geometry requested for geometry, but it does not exist. INFO: Open of `ODBC:test/test@spatialtest' using driver `ODBC' successful. Layer name: SNHD_wkt2 Geometry: Unknown (any) ERROR 1: GetNextRawFeature(): Corrupt data Feature Count: 1 ERROR 1: GetNextRawFeature(): Corrupt data Layer SRS WKT: (unknown) ID: Integer (10.0) XMIN: Real (0.0) YMIN: Real (0.0) XMAX: Real (0.0) YMAX: Real (0.0) }}} If a blank character is entered into the WKT string (i.e. making is longer than 1023 characters) then ogrinfo works without any errors. " defect closed normal OGR_SF 1.5.3 normal fixed odbc warmerdam chaitanya