[mapguide-users] Spatial Context for ODBC data connection

sekko970 fabio.franceschini at techneteam.it
Tue Jun 30 08:40:22 EDT 2009


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&
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& m, MouseButtons
button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   in System.Windows.Forms.ToolStrip.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& 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:

  <SupplementalSpatialContextInfo>
    <Name>Default</Name>
    <CoordinateSystem>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"]]</CoordinateSystem>
  </SupplementalSpatialContextInfo>


but the spatial context info is still empty:

<?xml version="1.0"?>
<FdoSpatialContextList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:noNamespaceSchemaLocation="FdoSpatialContextList-1.0.0.xsd">
  <ProviderName />
</FdoSpatialContextList>


Can you help me?
Fabio

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


nasp wrote:
> 
> 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:
>> 
>> 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:
>>> 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
>>>   
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> 
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Spatial-Context-for-ODBC-data-connection-tp3048587p3182139.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list