[mapguide-users] SQL 2008 Geographic data type can't be selected
Dave Wilson
dave.wilson at autodesk.com
Fri Mar 6 18:15:25 EST 2009
Can you ensure your table has a primary key? I'm pretty sure it's required.
Dave
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Rodolfo Moreno
Sent: Friday, March 06, 2009 4:01 PM
To: mapguide-users at lists.osgeo.org
Subject: RE: [mapguide-users] SQL 2008 Geographic data type can't be selected
Hi Andrei,
sorry for my delay.
I have created a new sql table with geography sql type and I added two
simple polygons.
here is my sql script:
insert into test1
VALUES (1,geography::STGeomFromText('POLYGON ((0 0 ,1 0,1 1 , 0 1, 0 0 ))',
4326) )
insert into test1
VALUES (2,geography::STGeomFromText('POLYGON ((1 1 ,3 1,2 3 , 1 1 ))', 4326)
)
Next I have displayed the features with the ajax viewer of the MGOS (I am
using 2.0.1 version) and the result is the same.
It means that the features are shown but these can't be selected.
I guess that it is an issue of MGOS. have you ever had success with it?
Regards,
Rodolfo Moreno wrote:
>
> Thanks Andrei, I am goin to try your suggestion.
>
>
> miansi wrote:
>>
>> Hello Rodolfo,
>>
>> Make sure you set SRID while populating SQL:
>>
>> ...
>> , [Geo] = GEOMETRY::STGeomFromText([import].[Geo], @SRID)
>> ...
>>
>> Base on your map (WGS 84) your SRID should be something like 4326
>>
>>
>> Regards,
>>
>> Andrei
>>
>>
>> -----Original Message-----
>> From: mapguide-users-bounces at lists.osgeo.org
>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Rodolfo
>> Moreno
>> Sent: Monday, March 02, 2009 9:15 AM
>> To: mapguide-users at lists.osgeo.org
>> Subject: [mapguide-users] SQL 2008 Geographic data type can't be
>> selected
>>
>>
>> I have could select features from geometric data type (sql 2008 as data
>> source) however, for the case of geographic data type the selection of
>> the
>> features is not possible.
>> The error shown in the log is: "sys.geometry is incompatible with
>> sys.geography"
>> The map that contains this layer is set as WGS 84.
>>
>> any help will be appreciated, thanks
>>
>> -----
>> Rodolfo Moreno
>> CivilEng
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/SQL-2008-Geographic-data-type-can%27t-be-selected-t
>> p2410036p2410036.html
>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>> ----Notice Regarding Confidentiality----
>> This email, including any and all attachments, (this "Email") is intended
>> only for the party to whom it is addressed and may contain information
>> that is confidential or privileged. Sierra Systems Group Inc. and its
>> affiliates accept no responsibility for any loss or damage suffered by
>> any person resulting from any unauthorized use of or reliance upon this
>> Email. If you are not the intended recipient, you are hereby notified
>> that any dissemination, copying or other use of this Email is prohibited.
>> Please notify us of the error in communication by return email and
>> destroy all copies of this Email. Thank you.
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>
>
-----
Rodolfo Moreno
CivilEng
--
View this message in context: http://n2.nabble.com/SQL-2008-Geographic-data-type-can%27t-be-selected-tp2410036p2438599.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list