Hi,<br><br>The MSSQL 2008 driver only compatible with the Geometry data type at the moment. In case if the Geography data type is used the spatial filter should also be specifyed as Geography which is not the case in the current implementation. You might want to submit a ticket describing the issue and we could probably get it implemented in a future release.<br>
<br>Best regards,<br><br>Tamas<br><br> <br><br><br><div class="gmail_quote">2009/4/2 joncoign <span dir="ltr">&lt;<a href="mailto:jncoign@knology.net">jncoign@knology.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
To clarify I have a column in SQL 2008 of type geography that I would like to use in map server. I have been able to do this using the OGR ODBC driver. However, when trying to use the Native SQL 2008 driver that has been added to MS4W 2.3.1 I get the error message &quot;sys.geometry is incompatible with sys.geography&quot; when executing the query captured by profiling the database request.<br>

<br>
It appears as though the SQL 2008 driver either assumes that it will always (and only) be used against geometry columns or there is a configuration setting I that I can use to tell it that the internal datatype is geography and as such  builds the WHERE clause using the geomertry type for the bounding box filter.<br>

<br>
SQL Excerpt:<br>
<br>
the_geom.STIntersects(Geometry::STGeomFromText(&#39;POLYGON(...)&#39;) = 1<br>
<br>
where in this case the_geom is a Geography column that cannot be used in an STIntersects call with a Geometry object.<br>
<br>
 I am hoping someone can tell me about the configuration option to change this behavior or confirm that it does not exist so we can discuss the possibility of adding such an option.<br>
<br>
Let me know if you need additional details.<br>
<div class="im"><br>
<br>
There are two ways to define an object spatially in 2008 one as type geometry and one as geography.<br>
<br>
</div><font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/Using-the-SQL-Server-2008-Plugin-with-a-Geography-column-tp2565867p2575468.html" target="_blank">http://n2.nabble.com/Using-the-SQL-Server-2008-Plugin-with-a-Geography-column-tp2565867p2575468.html</a><br>

</font><div><div></div><div class="h5">Sent from the Mapserver - User mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br>