[mapguide-users] SQL 2008 Geographic data type can't be selected

Rodolfo Moreno rmoreno at voxiva.com
Fri Mar 13 15:03:08 EDT 2009


In sql 2008 there are two types of spatial data: Geometry (flat Earth model)
and Geography (ellipsoidal model).
The issue is with geography data type. The features are displayed but these
can't be selected.
Regards,  


Martin Morrison wrote:
> 
> Maybe I am misunderstanding what the issue is.  Early on you stated:
> 
> " for the case of geographic data type the 
> selection of the features is not possible."
> 
> So what exactly is the issue that you are having?
> 
> Martin
> 
> -----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 13, 2009 11:18 AM
> To: mapguide-users at lists.osgeo.org
> Subject: RE: [mapguide-users] SQL 2008 Geographic data type can't be
> selected
> 
> 
> That's right. geometry type in sql 2008 is working correctly. It means you
> can display and select the features.
> 
> 
> Martin Morrison wrote:
>> 
>> I just want to note that I am using SQL 2008 to display geometry without
>> any issues...
>> 
>> Martin
>> 
>> 
>> 
>> -----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 13, 2009 10:55 AM
>> To: mapguide-users at lists.osgeo.org
>> Subject: RE: [mapguide-users] SQL 2008 Geographic data type can't be
>> selected
>> 
>> 
>> Hi all,
>> I was reviewing others theards with relation to it.
>> http://n2.nabble.com/Layer%27s-selection-Problem-td2352146.html
>> It seems to be an issue with geography data type in sql 2008. I would
>> like
>> to post a ticket but I don't know exactly in where is the error in
>> mapguide
>> or FDO.
>> Any opinion?
>> Regards
>> 
>> 
>> Rodolfo Moreno wrote:
>>> 
>>> Yes, my table has primary key (as integer) and spatial index with
>>> geographic grid.
>>> 
>>> Regards,
>>> 
>>> 
>>> Dave Wilson wrote:
>>>> 
>>>> 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
>>>> _______________________________________________
>>>> 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-tp2410036p2473836.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
>> 
>> _______________________________________________
>> 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-tp2410036p2473971.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
> 
> _______________________________________________
> 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-tp2410036p2475222.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list