geoserver with MsSqlSpatial

Topics: Developer Forum, User Forum
Apr 20, 2010 at 3:00 PM
OK, I'm stumped. I've deployed MsSqlSpatial to my SQL Server 2005 database, including the -deploy_permission=EXTERNAL_ACCESS argument. I've used ST.AddGeometryColumn to add a column to a table that already has columns with lat and long, then ran a sql command to populate the new geometry column with the lat and long. In geoserver, I've defined my datastore and am trying to add a layer. When I point it at the table with the newly added geometry column, geoserver reports "Could not find mapping for 'the_geom', ignoring the column and setting the feature type read only". I found a post on a forum somewhere that suggests the problem is because the data type of the column is "VARBINARY(MAX)", so the simple feature/layer stuff in geoserver won't work. On my PostgreSQL database, the data type of the geometry column is "GEOMETRY", so that forum post made some sense. I'm hoping someone can, at least, confirm that this is the root of the issue. Even better if someone can point me to a fix! I've read that people can pull MsSqlSpatial source and get version 0.1.7, while only version 0.1.1 is available in binary form. I suspect the datatype issue has something to do with not being able to define an actual "GEOMETRY" data type in Sql Server 2005, so I wouldn't expect version 0.1.7 to resolve this. If anyone has any experience with geoserver/geotools, I would really appreciate a working example of using the geoserver app-schema plugin to define a complex mapping to a single SQL Server 2005 table with MsSqlSpatial extensions deployed. Thanks in advance! Eric