<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
The ODBC provider is a bit different from the other providers.<br>
The &lt;SupplementalSpatialContextInfo&gt; seems to be ignored
completely,<br>
and the SpatialContext is always empty, even when the provider works.<br>
<br>
For backwards compatibility, Maestro will try to read the
SupplementalSpatialContextInfo,<br>
and set the coordinate system "the ODBC provider way" instead.<br>
This is what fails in your case.<br>
<br>
Try removing the SupplementalSpatialContextInfo tag in the xml, and
then set the coordinate system using the GUI,<br>
and it should work correctly.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
sekko970 skrev:
<blockquote cite="mid:1246365622508-3182139.post@n2.nabble.com"
 type="cite">
  <pre wrap="">Dear Kenneth,
using the last preview version of Maestro, when we set the coordinate system
override for ODBC data connection, the following error appears:

System.Net.WebException: Errore del server remoto: (559)
MgCoordinateSystemConversionFailedException.
   in System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest&amp;
request)
   in System.Net.WebClient.DownloadData(Uri address)
   in System.Net.WebClient.DownloadData(String address)
   in
OSGeo.MapGuide.MaestroAPI.HttpCoordinateSystem.ConvertWktToCoordinateSystemCode(String
wkt)
   in
OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditorODBC.Save(String
savename)
   in
OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditorODBC.ValidateResource(Boolean
recurse)
   in
OSGeo.MapGuide.Maestro.ResourceEditors.FeatureSourceEditorBase.ValidateResource(Boolean
recurse)
   in OSGeo.MapGuide.Maestro.EditorInterface.Save(String resid)
   in OSGeo.MapGuide.Maestro.FormMain.SaveResource()
   in OSGeo.MapGuide.Maestro.FormMain.SaveResourceButton_Click(Object
sender, EventArgs e)
   in System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   in System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   in System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
ToolStripItemEventType met)
   in System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met)
   in System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   in System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons
button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message&amp; m)
   in System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
   in System.Windows.Forms.ToolStrip.WndProc(Message&amp; m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)



As you can see in following xml editor substring, with our current Maestro
version (1.0.9.15910), we save the coordinate system override for ODBC data
connection without any problem:

  &lt;SupplementalSpatialContextInfo&gt;
    &lt;Name&gt;Default&lt;/Name&gt;
    &lt;CoordinateSystem&gt;PROJCS["Monte Mario / Italy zone 1",GEOGCS["Monte
Mario",DATUM["Monte_Mario",SPHEROID["International
1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6265"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4265"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3003"]]&lt;/CoordinateSystem&gt;
  &lt;/SupplementalSpatialContextInfo&gt;


but the spatial context info is still empty:

&lt;?xml version="1.0"?&gt;
&lt;FdoSpatialContextList xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xsi:noNamespaceSchemaLocation="FdoSpatialContextList-1.0.0.xsd"&gt;
  &lt;ProviderName /&gt;
&lt;/FdoSpatialContextList&gt;


Can you help me?
Fabio

-------------------------------------------------------------------------------------------


nasp wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Thank you very much.
I'm going to download last preview version of Maestro. 
I will post results after testing my application.

Regards, 
Naspi


Kenneth Skovhede, GEOGRAF A/S wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">I you are using Maestro, you must use the latest preview version.
ODBC handles projection a little different than the
other providers, and this has been adressed recently.

Regards, Kenneth Skovhede, GEOGRAF A/S



nasp skrev:
      </pre>
      <blockquote type="cite">
        <pre wrap="">Hi,
I don't know how to set spatial context in my ODBC data connection to
SQL
server.

For this reason I can't set coordinate system overrides. 
As a conseguences I can't make a buffer for a point resource belonging
to
ODBC data connection.

Please, could someone help me?

Regards, Naspi
  
        </pre>
      </blockquote>
      <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


      </pre>
    </blockquote>
    <pre wrap="">
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>