[fdo-users] AutoCAD Map3D and Oracle FDO Issues

Tony techswami at hotmail.com
Fri Jun 12 16:50:38 EDT 2009


I am using Oracle 10g2. I have recreated a problem using king fdo and AutoCAD
map 3d 2009. I have attached the screen shot as well as the error log.
http://n2.nabble.com/file/n3069879/error.jpeg  

The oracle table was created using fdo2fdo tool. I had polygon shape file
and from that the oracle table got created. Here is the geometry field 

MDSYS.SDO_GEOMETRY(2003,40977,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(6119518.834,2134201.296,6119554.319,2134156.643,6119546.565,2134150.46,6119389.706,2134025.378,6119382.413,2134034.59,6119379.786,2134037.909,6119317.085,2134117.112,6119320.085,2134119.504,6119470.657,2134239.573,6119473.657,2134241.965,6119481.527,2134248.241,6119518.834,2134201.296))

Now the issue is 
1. When I try to create new geometry using “new feature from geometry tool
“in AutoCAD map 3d I am getting the following error. 
2. I have true arcs in the closed polygon I have created in AutoCAD map .
3. I cannot check in the data into a table where the geometry type is multi
polygon 
4. Mdsys  schema : SDO_INDEX_METADATA_TABLE
a. XE	RTREE	0	0	64	-1	MDRT_372B$	PARCEL_PY_SIND	1	XE	"GEOMETRY"	4	4097	2	34
AAADcsAAEAAAI9OAAC	MDRS_372B$								2	MULTIPOLYGON	10				4	FALSE	VALID
MDRT_372B$	1000	0
MDSYS.SDO_GEOMETRY(2003,null,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(6089531.28,2115190.886,6145890.617,2180531.476))

5. Error log from AutoCAD map 3D 2009


 <?xml version="1.0" ?> 
- <Map3dErrorLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="AcMap3dErrorLog.xsd">
- <Session user="admin" start="6/12/2009 1:17:22 PM"
document="Drawing1.dwg">
- <Error code="200" type="5" dispensation="1" sId="2" occurrence="1">
  Feature was not saved in the target feature source. 
- <Parameters>
- <Parameter classId="0" position="0">
  <Message>2=ORA-29875: failed in the execution of the ODCIINDEXINSERT
routine ORA-13031: Invalid Gtype in the SDO_GEOMETRY object for point object
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 623 ORA-06512: at
"MDSYS.SDO_INDEX_METHOD_10I", line 227</Message> 
  <SQL /> 
  </Parameter>
- <Parameter classId="0" position="0">
  <Message>1=Failed to execute Fdo command.</Message> 
  <SQL /> 
  </Parameter>
- <Parameter classId="0" position="0">
  <Message>Failed to insert feature.</Message> 
  <SQL /> 
  </Parameter>
- <Parameter classId="0" position="0">
  <Message>KingOra:XE~PARCEL_PY_WC~GEOMETRY (), Rev# <0></Message> 
  <SQL /> 
  </Parameter>
  </Parameters>
  <Entry code="1" type="15" sId="3" occurrence="1">Failed to save some
features.</Entry> 
  <Entry code="1" type="15" sId="4" occurrence="1">Failed to save edit
set.</Entry> 
  </Error>
  </Session>
  </Map3dErrorLog>



Orest Halustchak wrote:
> 
> Hi Mike,
> 
> I'd like to clarify what issues are happening here.
> 
> 1. Both Oracle and PostGIS are mentioned. Is the problem the same with
> both of these or are we talking about different problems?
> 
> 2. So, you have a geometry that is defined as just Multi-Polygon. If
> Oracle, how did you define it as just multi-polygon? What does your schema
> look like.
> 
> 3. In PostGIS, you used MULTIGEOMETRY when you added the geometry column?
> 
> 4. In Map3D's display manager, when you ask to create a new feature, which
> geometry type options does it show?
> 
> 5. You mentioned arcs. Is this a separate issue that you are having? As
> Dan mentioned, Oracle doesn't support arcs in geometry that is lat/long.
> 
> Thanks,
> Orest.
> 
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Mike Toews
> Sent: Friday, June 12, 2009 2:21 PM
> To: FDO Users Mail List; FDO Internals Mail List
> Subject: Re: [fdo-users] AutoCAD Map3D and Oracle FDO Issues
> 
> This issue requires a database-end workaround, which varies depending on 
> DB software.
> 
> That said, who is at fault? Is it an issue with AutoCAD Map3D or FDO? If 
> it is an AutoCAD issue, should FDO be responsible for inserting/updating 
> the same geometry type as the feature source? Is AutoCAD intentionally 
> mixing single and mixed geometries, and is this allowed among some or 
> all providers? I never bothered submitting at ticket on this issue since 
> I wasn't sure what exactly the issue was and who to blame.
> 
> -Mike
> 
> Martin Morrison wrote:
>> It's not an AutoCAD/FDO function, it's an Oracle database function.  Read
>> up on the triggers in the Oracle docs.
>>
>> Martin
>>
>> -----Original Message-----
>> From: fdo-users-bounces at lists.osgeo.org
>> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Tony
>> Sent: Friday, June 12, 2009 1:59 AM
>> To: fdo-users at lists.osgeo.org
>> Subject: Re: [fdo-users] AutoCAD Map3D and Oracle FDO Issues
>>
>>
>> Mike 
>> thanks in millions for answer. could you tell me how to implement the
>> trigger from autocad insert. 
>> i am new to autocad . 
>>
>> thanks
>> tony
>>
>>
>> Mike Toews wrote:
>>   
>>> Tony,
>>>
>>> I think I had a similar problem, although I'm using Map3D 2008/2010 with 
>>> a PostgreSQL/PostGIS database. The issue was Map3D was creating and 
>>> sending a [single] POLYGON object to a MULTIPOLYGON column, which it 
>>> shouldn't, since the column has check constraints to ensure they are all 
>>> MULTIPOLYGON geometries. I fixed it by writing a simple BEFORE INSERT OR 
>>> UPDATE trigger to check and correct if the polygon is a multi object.
>>>
>>> I'm no pro with Oracle spatial, but the guts of my PL/pgSQL (with 
>>> PostGIS) trigger function look somthing like this:
>>>
>>>   IF ST_GeometryType(NEW.geometry) IN('POLYGON','LINESTRING') THEN
>>>     NEW.geometry := ST_Multi(NEW.geometry);
>>>   END IF;
>>>
>>> I think most of this is portable to your situation, except that 
>>> ST_GeometryType() returns different values. I'm not sure if there is a 
>>> generic ST_Multi() function, but there are similar casts that you can
>>> use.
>>>
>>> Hope this helps,
>>>
>>> -Mike
>>>
>>> Tony wrote:
>>>     
>>>> i am using fdo (autodesk) as well as used king fdo for getting the CAD
>>>> data
>>>> write to oracle.   
>>>> here is the whole story : i have a polygon shape file i have used
>>>> FDO2FDO
>>>> to
>>>> create  oracle table , I want to edit some of geometries in AutoCADmap
>>>> 3D
>>>> as
>>>> well as i want to add new polygons there. 
>>>>
>>>> the issue:  i have createa a closed polygon in autocadmap that have Arc
>>>> and
>>>> line and i was trying to write this to the above created table.  i am
>>>> getting error saying  that geometry type does not match, 
>>>> after reading the logs i found out that though my Oracle table has
>>>> mpolygon
>>>> geometry type i can not write  and polygon with Arc(true arc) in it. 
>>>>
>>>> any idea how to solve this issue. i have wote to autodesk and still
>>>> wating
>>>> to get the answer. i wrote to  king fdo no reply yet ... 
>>>>
>>>> please let me know how to solve this 
>>>>
>>>>
>>>>   
>>>>       
>>> _______________________________________________
>>> fdo-users mailing list
>>> fdo-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>>
>>>
>>>     
>>
>>   
> 
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/AutoCAD-Map3D-and-Oracle-FDO-Issues-tp3065246p3069879.html
Sent from the FDO Users mailing list archive at Nabble.com.



More information about the fdo-users mailing list