[gdal-dev] OGR MS SQL Spatial driver has been added

David Lowther dlowther at coordinatesolutions.com
Mon Sep 20 17:34:11 EDT 2010


LAYER

              NAME "SQL SPATIAL"

              CONNECTIONTYPE OGR

              CONNECTION
"MSSQL:server=coordinatesolutions.com\sqlexpress2008;database=xxx;uid=xxx;pw
d=xxx;tables=MetesAndBoundsHeader"

              DATA "MetesAndBoundsHeader"

              TYPE POLYGON

              PROJECTION #MSTM

                     proj=tmerc

                     lat_0=32.500000 #REF LAT

                     lon_0=-89.750000 #CENTRAL MERIDIAN

                     x_0=500000.000000 #FALSE EAST

                     y_0=1300000.000000 #FALSE NORTH

                     datum=NAD83

                     ellps=GRS80

                     no_defs

              END#PROJECTION

              STATUS DEFAULT

              CLASS

                     SIZE 10

               COLOR 255 0 0

              END

       END

 

 

David Lowther

 

Coordinate Solutions, Inc.

 

  _____  

From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of David Lowther
Sent: Monday, September 20, 2010 5:07 PM
To: 'Tamas Szekeres'; 'gdal-dev'
Subject: RE: [gdal-dev] OGR MS SQL Spatial driver has been added

 

CREATE TABLE [dbo].[MetesAndBoundsHeader](

      [PKey] [int] IDENTITY(1,1) NOT NULL,

      [SpatialDataKey] [int] NULL,

      [StartX] [decimal](18, 4) NULL,

      [StartY] [decimal](18, 4) NULL,

      [Feature] [geometry] NULL,

 CONSTRAINT [PK_MetesAndBoundsDescription] PRIMARY KEY CLUSTERED 

(

      [PKey] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

SET IDENTITY_INSERT [dbo].[MetesAndBoundsHeader] ON

INSERT [dbo].[MetesAndBoundsHeader] ([PKey], [SpatialDataKey], [StartX],
[StartY], [Feature]) VALUES (8, 7, CAST(463644.9082 AS Decimal(18, 4)),
CAST(1484517.3764 AS Decimal(18, 4)),
0xE60E00000104050000009A999999734C1C4100000000E5A636419A999999734C1C41000000
00F5CD36419A99999939B01B4100000000A4CE36419A99999939B01B410000000094A736419A
999999734C1C4100000000E5A6364101000000020000000001000000FFFFFFFF0000000003)

INSERT [dbo].[MetesAndBoundsHeader] ([PKey], [SpatialDataKey], [StartX],
[StartY], [Feature]) VALUES (9, 8, CAST(416571.3699 AS Decimal(18, 4)),
CAST(1465354.3699 AS Decimal(18, 4)),
0xE60E00000104050000009A999999ED6C1941000000000A5C36419A999999ED6C1941000000
001A8336419A999999B3D0184100000000C98336419A999999B3D0184100000000B95C36419A
999999ED6C1941000000000A5C364101000000020000000001000000FFFFFFFF0000000003)

SET IDENTITY_INSERT [dbo].[MetesAndBoundsHeader] OFF

 

 

David Lowther

 

Coordinate Solutions, Inc.

 

  _____  

From: Tamas Szekeres [mailto:szekerest at gmail.com] 
Sent: Monday, September 20, 2010 4:56 PM
To: David Lowther
Cc: gdal-dev
Subject: Re: [gdal-dev] OGR MS SQL Spatial driver has been added

 

 

2010/9/20 David Lowther <dlowther at coordinatesolutions.com>

  

It seems almost as if there is an index off in the field information.

 


David,

That's strange indeed. What is the database type of this field in the table?
Could you provide your test data to reproduce this? 

 

I am also not seeing any features when I render the layer in Mapserver
(though that could be any number of things as I am just getting started with
OGR MSSQL in Mapserver).

 


It would be helpful to see your mapfile to make sure about the problem.


Best regards,

Tamas

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100920/98e0aaac/attachment-0001.html


More information about the gdal-dev mailing list