Thanks David

Yes geometry seems to work and that's fine for me too afaikt.

I was trying to use the sql view feature (2.1) which was giving me the byte[], 
but I switched to actual views in the database and could use geometry columns. 
I also have to avoid the nvarchar type or geoserver skips these columns, but 
otherwise it seems to be working ok.

charles

On Mar 3, 2011, at 8:31 PM, David Collins wrote:

> Charles,
> 
> 1. I am using SQL Server 2008 SP2 with Geoserver for internal use only.  I 
> only use the Geometry data type, possibly because of what you have found - I 
> can't remember now - but for me, I think Geometry is probably good enough.
> 
> 2. I do have a number of SQL Server 2008 views being delivered by Geoserver, 
> sometimes to remove records with a null geometry field.  These views do NOT 
> have any special options.   One of the views that I use a lot is a fairly 
> complex query joining many tables.  Maybe you could try restarting the 
> Geoserver service - I think that might be required when database tables or 
> views are changed in any way.
> 
> Regards,
> David
> 
> On Fri, Mar 4, 2011 at 4:01 AM, Charles Galpin <[email protected]> wrote:
> I have been using postgresql as a data store and although I am very happy 
> with it, I need to use sql server if at all possible.
> 
> I have run into a couple of problems that I am hoping there are solutions for
> 
> 1. Geography vs Geometry types. Afaik geography is preferred in sql server so 
> I initially setup a table with the type being geography, but when I create a 
> layer from it in geoserver the resulting type shows as byte[] and geoserver 
> doesn't know what to do with it, what SRID etc.  I don't have a problem using 
> geometry, but I find this odd, and perhaps it's related to #2
> 
> 2. Sql views show a similar problem. I can make a layer out of a table with a 
> geometry type and geoserver displays it. But if I make a view that is simply 
> 'select * from mytable' the data type returned is byte[] which isn't working.
> 
> Any thoughts on this appreciated.
> 
> charles
> (Geoserver 2.1RC2)

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to