Select to view content in your preferred language

SDE Fail to show oracle feature

3219
11
07-04-2012 11:27 PM
ArySucaya
Emerging Contributor
Heloo,

I have a simple parcel polygon in oracle spatial 11.2.0.0. The WKT is:

POLYGON ((100.378750779898 -0.310282546668259, 100.378772459506 -0.310271543916926, 100.378838852504 -0.310235840196097, 100.378845732154 -0.310224416657996, 100.378844002915 -0.31020930373441, 100.37871739762 -0.309977750136478, 100.378616547328 -0.310045414011517, 100.378548060368 -0.309924611880424, 100.378750779898 -0.310282546668259))

When i validate geometry, oracle said it is TRUE. However, arcgis server with direct sde connection can't render it. There are some record have the same problem as this, since oracle always said it true but sde can read this geometry, it become difficult to find the problematic record. I have to use a another software to show all record first and try a manual search to the problematic feature. Any idea how to solve this?
0 Kudos
11 Replies
VinceAngelo
Esri Esteemed Contributor
Keep in mind that ArcSDE builds transfer buffers to transport geometries.  When an invalid shape
is encountered, an error is raised as soon as the error is found, so it's not this feature (which is
valid at even twelve places of precision [which is probably 6-10 places too many]), but a later
feature which is causing the error.

The 'sdelayer' command has a utility to scan Oracle tables (no other database is supported)
to report invalid features:

C:\Temp>sdelayer -o feature_info

         Error: Table name and spatial column must be specified.

ArcSDE 10.1
Layer    Administration Utility
-----------------------------------------------------
sdelayer -o feature_info -l <table,column> [-V <version>]
                  [-r {valid | all | invalid}] [-w <"where_clause">]
                  [-T <output_table_name> [-k <config_keyword>]]
                  [-C <row_id_column>] [-c]
                  [-s <server_name>]  [-i <service>] [-D <database>]
                  [-u <DB_User_name>] [-p <DB_User_password>] [-N] [-q]
sdelayer -h
sdelayer -?


See the administration commands documentation for details.

- V
0 Kudos
ArySucaya
Emerging Contributor
How can you make sure that the invalid source is not this feature?
I tried to delete this feature and sde render my map correctly.
Attached you can see before this feature deleted and after deleted.
[ATTACH=CONFIG]Before deleted[/ATTACH]
[ATTACH=CONFIG]after deleted[/ATTACH]
the red circle is the location of this feature
0 Kudos
ArySucaya
Emerging Contributor
From my observation, sde fail to render taper/spiky shapes eventhough those are valid geometries within oracle or ogc simple feature. Here are two taper shape failed to render

The blue highlighted parcel are as follow:
MDSYS.SDO_GEOMETRY(2003, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), MDSYS.SDO_ORDINATE_ARRAY(100.382634289992,-0.308070099350103,100.382668114154,-0.308056470516177,100.382633120832,-0.307976856407857,100.382591368628,-0.307881865010286,100.382550438898,-0.307788744841094,100.382512319815,-0.307702019239331,100.382512088803,-0.307701469304664,100.382511875945,-0.307700911993982,100.382511681473,-0.307700347914541,100.3825115056,-0.307699777681015,100.382511348516,-0.307699201914676,100.382511210394,-0.307698621242771,100.382511091383,-0.307698036297965,100.382510991613,-0.307697447717634,100.382510911193,-0.307696856143038,100.382510850211,-0.307696262218696,100.382510808732,-0.307695666591746,100.382510786803,-0.307695069911141,100.382510784446,-0.307694472827003,100.382510801666,-0.307693875989817,100.382510838442,-0.307693280049889,100.382510894734,-0.307692685656439,100.382510970483,-0.307692093457236,100.382511065604,-0.307691504097433,100.382511179994,-0.307690918219102,100.382511313529,-0.307690336460607,100.382511466063,-0.307689759455882,100.38251163743,-0.30768918783352,100.382511827444,-0.307688622216243,100.382512035896,-0.307688063220433,100.382512262561,-0.307687511455151,100.382512507191,-0.307686967521405,100.382512769519,-0.307686432012066,100.38251304926,-0.307685905510324,100.382513346109,-0.307685388590054,100.382513659743,-0.307684881814369,100.382513989819,-0.307684385735345,100.382514335979,-0.307683900893572,100.382514697845,-0.307683427817342,100.382515075023,-0.307682967021917,100.382515467101,-0.307682519009541,100.382515873653,-0.307682084268252,100.382516294236,-0.307681663271711,100.382516728391,-0.307681256478563,100.382517175646,-0.307680864332168,100.382517635513,-0.307680487259604,100.382518107491,-0.307680125671855,100.382518591066,-0.307679779962804,100.382519085711,-0.30767945050906,100.382519590887,-0.307679137669689,100.382520106044,-0.307678841785575,100.38252063062,-0.307678563178969,100.382521164044,-0.307678302153402,100.382521705734,-0.307678058993409,100.382514267303,-0.307659786655168,100.38243995705,-0.307689039499036,100.382448554724,-0.30770661357426,100.382449078119,-0.307706436722125,100.382449606664,-0.307706276141426,100.38245013986,-0.307706131983651,100.382450677204,-0.307706004385003,100.382451218188,-0.307705893465954,100.382451762301,-0.307705799331145,100.382452309031,-0.307705722069474,100.38245285786,-0.307705661753928,100.38245340827,-0.307705618441391,100.382453959743,-0.307705592172739,100.382454511756,-0.30770558297284,100.38245506379,-0.307705590850368,100.382455615324,-0.307705615797811,100.382456165835,-0.30770565779165,100.382456714805,-0.307705716792351,100.382457261715,-0.307705792744108,100.38245780605,-0.307705885575186,100.382458347294,-0.307705995197939,100.382458884938,-0.307706121508985,100.382459418473,-0.307706264389108,100.382459947396,-0.307706423703178,100.382460471208,-0.307706599301046,100.382460989414,-0.307706791016835,100.382461501524,-0.307706998669461,100.382462007056,-0.307707222063106,100.382462505533,-0.307707460986665,100.382462996482,-0.307707715214653,100.382463479442,-0.307707984507016,100.382463953955,-0.307708268609693,100.382464419575,-0.307708567254233,100.382464875861,-0.307708880158892,100.382465322383,-0.307709207028091,100.38246575872,-0.307709547553402,100.382466184458,-0.30770990141329,100.382466599197,-0.307710268273639,100.382467002545,-0.30771064778813,100.38246739412,-0.307711039598503,100.382467773554,-0.307711443334831,100.382468140488,-0.307711858616062,100.382468494576,-0.307712285049927,100.382468835483,-0.307712722234122,100.382469162888,-0.307713169755667,100.382469476482,-0.307713627192177,100.382469775967,-0.307714094111772,100.382470061063,-0.307714570073701,100.382470331499,-0.307715054628543,100.38247058702,-0.307715547318905,100.382470827385,-0.307716047679715,100.382502738973,-0.307785166551491,100.382536670743,-0.30785866103729,100.382569467279,-0.30792969666186,100.38260288612,-0.308002080166792,100.382634289992,-0.308070099350103))

The green shape is the parcel marked as red circle in my previous post


However, oracle validation and sde validation gave different result:
select sdo_geom.validate_geometry(p.batas, 0.00000000000001) from persilpasif p where persilpasifid = 'AC8CD0C40412215DE0400B0A9A145576';

C:\Users\Administrator>sdelayer -o feature_info -l persilpasif,batas -r invalid
-w "persilpasifid = 'AC8CD0C40412215DE0400B0A9A145576'" -i sde:oracle11g -s xxxxxx
-u xxxx -p xxxx@xxxxx


ArcSDE 10.0  for Oracle11g Build 685 Fri May 14 12:05:43  2010
Layer    Administration Utility
-----------------------------------------------------
Row Id,FID,Entity Type,Annotation,Cad Data,Number of Points,Number of Parts,Numb
er of Subparts,Self-Touching Rings,Minimum Precision,Verification

420752,420752,A,F,F,110,1,1,F,Basic,-155

Total rows examined:           1
Total invalid shapes:          1


What causing the different?
0 Kudos
VinceAngelo
Esri Esteemed Contributor
First of all, what units are you using, in what projection? Please provide the output of 
'sdelayer -o describe_long' output for the layer.

Second, please provide the USER_SDO_GEOM_METADATA contents for the table.

The specified precision for your Oracle validation, 100 quadrillionths, is not appropriate.
If the units are decimal degrees, you're asserting that you've collected the locations of
parcels with a mass-spectometer (to the wavelength of ultraviolet light).  If you were
to use the inverse of the scale you specified when you registered the layer with ArcSDE
as the precision, Oracle too might have problems with the spiky geometries (the -155
error is SE_SELF_INTERSECTING, which Oracle should also detect).

As for the choice of 4326 as SRID, I find Paul's argument for using 8307 compelling.

- V
0 Kudos
ArySucaya
Emerging Contributor
Im using Lat-long projection and here is describe long response:


ArcSDE 10.0  for Oracle11g Build 685 Fri May 14 12:05:43  2010
Layer    Administration Utility
-----------------------------------------------------
Layer Description ....: <None>
Table Owner ..........: PETA
Table Name ...........: PERSILPASIF
Spatial Column .......: BATAS
Layer Id .............: 7
SRID .................: 5
Auth SRID.............: 4326
Minimum Shape Id .....: 1
Offset ...............:
  falsex:        -40.996170
  falsey:        -46.012603
System Units .........:    2467920.000000
Z Offset..............:          0.000000
Z Units ..............:          1.000000
Measure Offset .......: <None>
Measure Units ........: <None>
XY Cluster Tolerance .:          2.0
Spatial Index ........:
  parameter:    SPIDX_RTREE
  exist:        Yes
  array form:   -2,0,0
Layer Envelope .......:
  minx:       -40.99617,        miny:       -46.01260
  maxx:       133.03505,        maxy:        69.99191
Entities .............: na+
Layer Type ...........: In-Line Spatial Type/SDO_GEOMETRY
Creation Date ........: 07/02/12 15:55:26
I/O Mode .............: NORMAL
Autolocking ..........: Enabled
Precision.............: High
User Privileges ......: SELECT, UPDATE, INSERT, DELETE
Coordinate System ....: GEOGCS["WGS 84",DATUM["World Geodetic System 1984 (EPSG
ID 6326)",SPHEROID["WGS 84 (EPSG ID 7030)",6378137.0,298.257223563]],PRIMEM["Gre
enwich",0.0],UNIT["Degree",0.0174532925199433]]

Layer Configuration ..: DEFAULTS

and the value of user_sdo_geom_metadata record is

TABLE_NAME: PERSILPASIF
COLUMN_NAME: BATAS
DIMINFO(SDO_DIMNAME, SDO_LB, SDO_UB, SDO_TOLERANCE): SDO_DIM_ARRAY(SDO_DIM_ELEMENT('LONGITUDE', -180, 180, 1.0000E-12), SDO_DIM_ELEMENT('LATITUDE', -90, 90, 1.0000E-12))
SRID: 4326

And about the precision, oracle still consider its a valid geometry >= 0.05,
select sdo_geom.validate_geometry(p.batas, 0.05) from persilpasif p where persilpasifid = 'AC8CD0C40412215DE0400B0A9A145576';  -- return TRUE

I'm wondering what number of precision ESRI using?

And for the first shape, esri said its an invalid geometry
C:\Users\Administrator>sdelayer -o feature_info -l persilpasif,batas -r invalid
-w "persilpasifid = 'AE0D704A239A9570E0400B0A9A145EA4'" -i sde:oracle11g -s xxxxxx -u xxxx -p xxxx@xxxxx


ArcSDE 10.0  for Oracle11g Build 685 Fri May 14 12:05:43  2010
Layer    Administration Utility
-----------------------------------------------------
Row Id,FID,Entity Type,Annotation,Cad Data,Number of Points,Number of Parts,Numb
er of Subparts,Self-Touching Rings,Minimum Precision,Verification

801079,801079,A,F,F,9,1,1,F,Basic,-155

Total rows examined:           1
Total invalid shapes:          1

but oracle said its a valid geom even if i give precision = 1
select sdo_geom.validate_geometry(p.batas, 1) from persilpasif p where persilpasifid = 'AE0D704A239A9570E0400B0A9A145EA4'; -- return TRUE

So, does it really a precission matter?


Thanks
0 Kudos
VinceAngelo
Esri Esteemed Contributor
When using geodetic coordinate systems, modern Oracle releases use meters for precision,
so your USER_SDO_GEOM_METADATA is requesting an index precision at the wavelength
of gamma rays.

You should always specify the X/Y units when registering on Oracle layer (-x flag), to avoid
letting ArcSDE choose on its own, especially when your metadata values are wrong.

If you want the layer metadata to be correct, you'll need to drop the table (via Catalog),
and start over with appropriate values (8307 w/ 0.05 meters and a 1000000 xyscale). 

This won't correct the self-intersecting polygon, which is still topologically invalid, even
if Oracle chooses not to complain.

- V
0 Kudos
ArySucaya
Emerging Contributor
Well, following your suggestion i change the precission to 0.005 so now even measuring tape can afford this precision. I didn't change the srid to 8307 for the moment because it require extra effort to update the srid. but if you think changing the srid is the panacea then i will consider it. And what happen then? See picture 1, sde still can not generate bitmap of some area but you see picture 2 the map completely rendered. Guess from what layer it come from? it come from queried layer. Both sde and queried layer read the same table which validated by oracle. I still thinking that sde can't render some geometry perfectly 

[ATTACH=CONFIG]15924[/ATTACH]
[ATTACH=CONFIG]15925[/ATTACH]
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Please keep in mind that ArcSDE doesn't render anything.  Its job is to standardize
access to databases, and part of the way it does this is by enforcing topology.

By the terms of Clementini topology rules (which are also used by OGC), the rings
that form a polygon must be simple lines which close (first and last vertex at the
same location).  "Simple lines" are lines that do not intersect themselves and can
only touch at the ends.  Databases can't enforce rules like this, because SQL functions
are the only tools they have to correct improper geometries.  Many systems can't
distinguish "crossing" conditions due to the vaguarities of floating point representation,
but the SgShape library within ArcSDE uses integer representation (as defined by
the offsets and scales of the coordinate reference).

The SDO_GEOMETRY you provided above is not the invalid shape with the spike in it.
If you provide that shape in SDO_GEOMETRY or OGC Well-Known Text format, I can
show you why ArcSDE returns an error at a scale factor of 2467920.0.

- V
0 Kudos
ArySucaya
Emerging Contributor
select sdo_geom.validate_geometry(MDSYS.SDO_GEOMETRY(2003, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), MDSYS.SDO_ORDINATE_ARRAY(100.36844435724,-0.296813884255462,100.368328299525,-0.296772296608714,100.368314955897,-0.296767515107598,100.368196021667,-0.296724896700935,100.368195363458,-0.296724649096053,100.368194713265,-0.296724380884748,100.368194071724,-0.296724092329497,100.368193439463,-0.296723783712683,100.368192817101,-0.296723455336398,100.368192205246,-0.296723107522007,100.368191604498,-0.296722740609861,100.368191015444,-0.29672235495922,100.368190438661,-0.296721950947339,100.368189874714,-0.296721528969744,100.368189324154,-0.296721089439418,100.368188787521,-0.296720632786524,100.368188265339,-0.296720159458054,100.36818775812,-0.296719669917096,100.36818726636,-0.296719164642927,100.36818679054,-0.296718644130021,100.368186331127,-0.296718108887773,100.368185888568,-0.296717559440139,100.368185463299,-0.296716996324735,100.368185055735,-0.296716420092742,100.368184666274,-0.296715831308186,100.368184295299,-0.296715230547209,100.368183943172,-0.296714618397893,100.368183610237,-0.296713995459267,100.368183296821,-0.296713362341117,100.368183003231,-0.296712719662911,100.368182729753,-0.296712068053881,100.368182476656,-0.296711408151497,100.368182244186,-0.2967107406019,100.368182032573,-0.296710066058205,100.368181842022,-0.296709385180668,100.36818167272,-0.296708698635786,100.368181524833,-0.296708007095299,100.368181398506,-0.296707311236198,100.368181293862,-0.296706611739356,100.368181211003,-0.296705909289545,100.368181150012,-0.296705204574147,100.368181110947,-0.296704498282996,100.368181093846,-0.29670379110719,100.368181098727,-0.296703083738995,100.368181125585,-0.296702376870686,100.368181174393,-0.296701671193994,100.368181245104,-0.296700967399738,100.368181337648,-0.296700266176574,100.368181451935,-0.296699568210802,100.368181587853,-0.296698874185738,100.368181745269,-0.296698184780357,100.368181924029,-0.296697500669655,100.368182123958,-0.296696822522926,100.368156759529,-0.296751786970024,100.368157148672,-0.296751331969646,100.368157548896,-0.296750886817404,100.368157959955,-0.296750451786891,100.368158381596,-0.296750027145102,100.368158813561,-0.296749613153059,100.368159255584,-0.29674921006491,100.368159707394,-0.296748818128387,100.368160168712,-0.296748437584069,100.368160639257,-0.296748068665754,100.368161118739,-0.296747711600008,100.368161606863,-0.296747366606246,100.368162103329,-0.296747033896292,100.368162607833,-0.296746713674544,100.368163120065,-0.296746406137722,100.368163639709,-0.296746111474673,100.368164166448,-0.296745829866283,100.368164699957,-0.296745561485753,100.368165239908,-0.296745306497778,100.368165785971,-0.29674506505892,100.368166337809,-0.296744837317682,100.368166895083,-0.296744623413711,100.368167457452,-0.296744423478603,100.36816802457,-0.296744237634993,100.368168596089,-0.296744065997206,100.368169171657,-0.296743908670511,100.368169750921,-0.296743765751596,100.368170333525,-0.296743637328276,100.368170919111,-0.296743523479415,100.368171507321,-0.296743424274836,100.368172097791,-0.296743339775673,100.368172690161,-0.296743270033658,100.368173284065,-0.296743215091747,100.368173879139,-0.296743174983584,100.368174475018,-0.296743149733944,100.368175071335,-0.296743139358199,100.368175667725,-0.296743143862768,100.368176263821,-0.29674316324484,100.368176859256,-0.296743197492564,100.368177453666,-0.296743246584952,100.368178046684,-0.2967433104917,100.368178637947,-0.296743389173733,100.368179227092,-0.296743482582655,100.368179813756,-0.296743590661032,100.36818039758,-0.296743713342467,100.368180978205,-0.296743850551713,100.368181555274,-0.296744002204463,100.368182128432,-0.296744168207556,100.368182697328,-0.296744348458967,100.368183261612,-0.296744542848074,100.368278303331,-0.296779916251848,100.368375838704,-0.296816217763482,100.368428527746,-0.296836942600945,100.368490410717,-0.296861283800885,100.368599839406,-0.296895718583079,100.368623182665,-0.296854214913313,100.368669240998,-0.296745644781028,100.36869600213,-0.296682562608874,100.368660952475,-0.296692300471225,100.368574974797,-0.296866937393698,100.368517187395,-0.296843465794089,100.36844435724,-0.296813884255462)), 0.05) from dual;

return TRUE but ArcSDE seem to be return invalid geometry.


or if you need in WKT:

POLYGON ((100.36844435724 -0.296813884255462, 100.368328299525 -0.296772296608714, 100.368314955897 -0.296767515107598, 100.368196021667 -0.296724896700935, 100.368195363458 -0.296724649096053, 100.368194713265 -0.296724380884748, 100.368194071724 -0.296724092329497, 100.368193439463 -0.296723783712683, 100.368192817101 -0.296723455336398, 100.368192205246 -0.296723107522007, 100.368191604498 -0.296722740609861, 100.368191015444 -0.29672235495922, 100.368190438661 -0.296721950947339, 100.368189874714 -0.296721528969744, 100.368189324154 -0.296721089439418, 100.368188787521 -0.296720632786524, 100.368188265339 -0.296720159458054, 100.36818775812 -0.296719669917096, 100.36818726636 -0.296719164642927, 100.36818679054 -0.296718644130021, 100.368186331127 -0.296718108887773, 100.368185888568 -0.296717559440139, 100.368185463299 -0.296716996324735, 100.368185055735 -0.296716420092742, 100.368184666274 -0.296715831308186, 100.368184295299 -0.296715230547209, 100.368183943172 -0.296714618397893, 100.368183610237 -0.296713995459267, 100.368183296821 -0.296713362341117, 100.368183003231 -0.296712719662911, 100.368182729753 -0.296712068053881, 100.368182476656 -0.296711408151497, 100.368182244186 -0.2967107406019, 100.368182032573 -0.296710066058205, 100.368181842022 -0.296709385180668, 100.36818167272 -0.296708698635786, 100.368181524833 -0.296708007095299, 100.368181398506 -0.296707311236198, 100.368181293862 -0.296706611739356, 100.368181211003 -0.296705909289545, 100.368181150012 -0.296705204574147, 100.368181110947 -0.296704498282996, 100.368181093846 -0.29670379110719, 100.368181098727 -0.296703083738995, 100.368181125585 -0.296702376870686, 100.368181174393 -0.296701671193994, 100.368181245104 -0.296700967399738, 100.368181337648 -0.296700266176574, 100.368181451935 -0.296699568210802, 100.368181587853 -0.296698874185738, 100.368181745269 -0.296698184780357, 100.368181924029 -0.296697500669655, 100.368182123958 -0.296696822522926, 100.368156759529 -0.296751786970024, 100.368157148672 -0.296751331969646, 100.368157548896 -0.296750886817404, 100.368157959955 -0.296750451786891, 100.368158381596 -0.296750027145102, 100.368158813561 -0.296749613153059, 100.368159255584 -0.29674921006491, 100.368159707394 -0.296748818128387, 100.368160168712 -0.296748437584069, 100.368160639257 -0.296748068665754, 100.368161118739 -0.296747711600008, 100.368161606863 -0.296747366606246, 100.368162103329 -0.296747033896292, 100.368162607833 -0.296746713674544, 100.368163120065 -0.296746406137722, 100.368163639709 -0.296746111474673, 100.368164166448 -0.296745829866283, 100.368164699957 -0.296745561485753, 100.368165239908 -0.296745306497778, 100.368165785971 -0.29674506505892, 100.368166337809 -0.296744837317682, 100.368166895083 -0.296744623413711, 100.368167457452 -0.296744423478603, 100.36816802457 -0.296744237634993, 100.368168596089 -0.296744065997206, 100.368169171657 -0.296743908670511, 100.368169750921 -0.296743765751596, 100.368170333525 -0.296743637328276, 100.368170919111 -0.296743523479415, 100.368171507321 -0.296743424274836, 100.368172097791 -0.296743339775673, 100.368172690161 -0.296743270033658, 100.368173284065 -0.296743215091747, 100.368173879139 -0.296743174983584, 100.368174475018 -0.296743149733944, 100.368175071335 -0.296743139358199, 100.368175667725 -0.296743143862768, 100.368176263821 -0.29674316324484, 100.368176859256 -0.296743197492564, 100.368177453666 -0.296743246584952, 100.368178046684 -0.2967433104917, 100.368178637947 -0.296743389173733, 100.368179227092 -0.296743482582655, 100.368179813756 -0.296743590661032, 100.36818039758 -0.296743713342467, 100.368180978205 -0.296743850551713, 100.368181555274 -0.296744002204463, 100.368182128432 -0.296744168207556, 100.368182697328 -0.296744348458967, 100.368183261612 -0.296744542848074, 100.368278303331 -0.296779916251848, 100.368375838704 -0.296816217763482, 100.368428527746 -0.296836942600945, 100.368490410717 -0.296861283800885, 100.368599839406 -0.296895718583079, 100.368623182665 -0.296854214913313, 100.368669240998 -0.296745644781028, 100.36869600213 -0.296682562608874, 100.368660952475 -0.296692300471225, 100.368574974797 -0.296866937393698, 100.368517187395 -0.296843465794089, 100.36844435724 -0.296813884255462))

again and again, this is spiky feature

[ATTACH=CONFIG]16113[/ATTACH]
0 Kudos