Oracle Spatial:SDO_RELATE返回不在内部的Polygon

时间:2017-08-02 16:47:31

标签: oracle spatial-query

我遇到了SDO_RELATE的问题,它正在返回那些几何形状 不在里面

.geom不在myGeom()中,但它仍然返回8个结果。

有没有人有任何想法?

查询:

select  t.geom from GEOM_TABLE t where SDO_RELATE(t.geom, MDSYS.ST_GEOMETRY( mygeom() ).geom,'mask=INSIDE')= 'TRUE';

表GEOM_TABLE有8个GEOM:

MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.0869771096384677,51.5024165642481,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.0858793201373357,51.5028736400019,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.0859194148542997,51.5026045168702,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.08585886464887,51.5028197752593,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.08585886464887,51.5028197752593,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.0869771096384677,51.5024165642481,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.0858791695113971,51.5028772345772,NULL),NULL,NULL)
MDSYS.SDO_GEOMETRY(2001,4326,MDSYS.SDO_POINT_TYPE(-0.0859418928233853,51.5026354585244,NULL),NULL,NULL)

函数mygeom()返回一个多字形:

create or replace FUNCTION mygeom
RETURN SDO_GEOMETRY
AS
sdo_thing SDO_GEOMETRY;
BEGIN
sdo_thing := sdo_geometry('MULTIPOLYGON (((-0.0865288603107932 51.5039564260449, -0.0865060010910315 51.5039483194539, -0.0865141682574544 51.5039391004243, -0.0863253073372686 51.5038727110367, -0.0863124617498804 51.5038869794842, -0.0861795514907842 51.5038402074052, -0.0861346869924903 51.5038139363237, -0.0861936192356698 51.503748622705, -0.085952644781669 51.5036639366557, -0.0859381361413453 51.503680066363, -0.0858665730544053 51.5036547982402, -0.0857786527152011 51.5036038140749, -0.0858085678942227 51.5035707600203, -0.0855573745654051 51.5034823992445, -0.0855562489936357 51.5034817513896, -0.0855144898673776 51.503460476679, -0.0854816214774265 51.5034436635341, -0.0855221133560601 51.5033989120031, -0.0854580732722616 51.5033763742846, -0.0855274309380533 51.5032995408303, -0.0855420337567935 51.5032811645641, -0.0855009965077738 51.5032667359951, -0.085398333387543 51.5032306184033, -0.0854158650244525 51.5032111209312, -0.0855116600641411 51.5031051334827, -0.0855172589057151 51.503098750221, -0.0855484999942321 51.5031096916138, -0.0856632327265146 51.5031500527559, -0.0857510227333684 51.5030528371038, -0.0858171960176657 51.5030760389644, -0.0858605661541136 51.5030279171151, -0.0861706892907778 51.5031369327097, -0.0862031684355457 51.503101132696, -0.0862676908339 51.5030296154548, -0.0863597181173557 51.5029275225779, -0.0865600765882216 51.5029979663451, -0.086777901902547 51.5030745398974, -0.0866356488383303 51.5032302187971, -0.0863604562944733 51.5031334647858, -0.0862507570730499 51.5032549630447, -0.0864188824541957 51.5033140899477, -0.0864641795598904 51.5033300265126, -0.0865275076607135 51.5033523722106, -0.0865625842463539 51.5033646348715, -0.0865635733667962 51.5033651006388, -0.0867131904394105 51.5032125095177, -0.0869205046762469 51.5032854941311, -0.0870304148828612 51.5033240666651, -0.0870314190610705 51.5033241729708, -0.0870459460195229 51.5033075937999, -0.087056389498824 51.5032956241626, -0.0867378739881255 51.5031873732771, -0.0869961007463528 51.5029048122902, -0.0869420693368078 51.5030733511776, -0.0871457009621967 51.503096636268, -0.087287236796925 51.5031128832374, -0.0873377146831273 51.5031186524167, -0.0873088241159957 51.5032167399355, -0.0874407581118753 51.503231751007, -0.0877460537025708 51.5033357377504, -0.0878978480003227 51.5033892006805, -0.0876010933439077 51.5037178967794, -0.0875796551637441 51.5037102631995, -0.087541274963729 51.5037528017192, -0.0874832826670801 51.5037612982195, -0.0873375890289662 51.5037100924754, -0.0873665978138789 51.5036780124315, -0.0873188860315623 51.5036612275065, -0.0872403069325914 51.5037484329227, -0.087335734416622 51.5037819129539, -0.0874311582792707 51.5038154827731, -0.0874110589611976 51.5038378162924, -0.0873156388304757 51.5038041565922, -0.0872200710856096 51.5037705843314, -0.0871112779121759 51.5038911089731, -0.0871521760104861 51.503905444775, -0.0871712110818985 51.5038844428283, -0.0872419301226673 51.5039092467519, -0.0872727648646231 51.5038748584409, -0.0873251646654072 51.5038932485791, -0.0873951713635406 51.5039178609403, -0.0873787009196911 51.5039361170481, -0.0874631918861763 51.5039658215792, -0.0874486836756725 51.5039819514772, -0.087345784810058 51.5040959179464, -0.0872135694017501 51.5042424089491, -0.0867076236586411 51.5040643759442, -0.0866881299671788 51.5040859998153, -0.0866326075158272 51.5040664793368, -0.0865461857038368 51.5040278400461, -0.0865151018581603 51.5040131246071, -0.0865572637661047 51.5039663316798, -0.0865288603107932 51.5039564260449)), ((-0.0875356956274903 51.502805432305955, -0.0875796524044413 51.50266064913526, -0.0875796524047242 51.50266064913432, -0.0875937076629999 51.502614026979536, -0.0875985455101144 51.50259827892592, -0.0875985455103903 51.50259827892503, -0.0876057263963508 51.50257474593212, -0.0877224361428347 51.502588519150784, -0.0877174357167263 51.50260471361209, -0.0877174356972497 51.50260471370696, -0.0877174356964275 51.5026047138038, -0.0877174357142906 51.50260471389898, -0.0877174357501689 51.502604713988944, -0.0877174358027163 51.502604714070294, -0.0877174358699615 51.50260471413999, -0.0877174359493814 51.502604714195414, -0.0877174360379964 51.50260471423449, -0.0877174361324819 51.502604714255746, -0.0878167688166939 51.50261712495759, -0.0877824452897606 51.50272456524463, -0.0877579362979249 51.50272146788525, -0.0877579361990961 51.50272146788261, -0.0877579361016798 51.50272146789947, -0.087757936009485 51.50272146793517, -0.0877579359261164 51.50272146798831, -0.0877579358548333 51.50272146805681, -0.0877579357984226 51.502721468138006, -0.08775793575909 51.50272146822871, -0.0877284344790737 51.502813520862006, -0.0877284344585182 51.50281352095726, -0.0877284344568288 51.50281352105469, -0.0877284344740695 51.5028135211506, -0.0877284345095857 51.50281352124134, -0.0877284345620283 51.502813521323475, -0.0877284346294053 51.50281352139387, -0.0877284347091577 51.502813521449866, -0.0877284347982561 51.50281352148932, -0.0877284348933168 51.50281352151075, -0.0878130053573931 51.50282407290225, -0.0878130054562405 51.50282407290473, -0.0878130055536435 51.50282407288771, -0.0878130056457923 51.50282407285186, -0.0878130057290832 51.50282407279857, -0.0878130058002589 51.50282407272993, -0.0878130058565359 51.50282407264863, -0.0878130058957132 51.50282407255784, -0.0878372259787406 51.50274803051843, -0.0878567746459156 51.50268720009297, -0.0879175512757668 51.502694755562416, -0.0879201274364463 51.50269515718285, -0.087919639251137 51.50269649753589, -0.0879196392447881 51.50269649755444, -0.0879005789247029 51.50275598746124, -0.0879005789041521 51.50275598755652, -0.0879005789024769 51.50275598765398, -0.0879005789197416 51.50275598774991, -0.08790057895529 51.502755987840665, -0.0879005790077712 51.502755987922804, -0.0879005790751907 51.5027559879932, -0.0879005791549865 51.502755988049174, -0.0879005792441261 51.5027559880886, -0.087900579339222 51.50275598810999, -0.0879897380150376 51.502767063746774, -0.087977295169382 51.50280615788909, -0.0879719916039587 51.50282270769781, -0.0879719915833543 51.502822707793506, -0.0879719915817896 51.50282270789138, -0.0879719915993254 51.50282270798769, -0.0879719916352893 51.50282270807873, -0.087971991688303 51.50282270816103, -0.0879719917563345 51.50282270823141, -0.087971991836776 51.50282270828719, -0.0879719919265444 51.502822708326235, -0.0879719920221989 51.50282270834703, -0.0880499954356839 51.502831803612374, -0.0881510871247728 51.50284352334698, -0.0881698484254638 51.50286001551683, -0.0881366408628612 51.502947690871785, -0.0881300260745374 51.50295082027087, -0.0881232784087366 51.50295367781014, -0.0881161100569678 51.502956258713674, -0.0881088127538357 51.502958477814225, -0.0881012349937299 51.50296051249066, -0.0880935320485161 51.502962095498056, -0.0880855486436176 51.50296349408193, -0.0880774400524054 51.50296444099676, -0.0880693389837578 51.5029652081824, -0.0880611127337426 51.50296552369855, -0.0880528977637351 51.50296556962145, -0.0880432579250784 51.5029652326112, -0.0880432578330748 51.50296523261648, -0.0880432577436031 51.502965232638566, -0.0880432576597028 51.50296523267669, -0.0880432575842239 51.50296523272956, -0.0880432575197305 51.50296523279538, -0.0880432574684133 51.50296523287193, -0.0880432574320158 51.50296523295659, -0.0880432574320151 51.50296523295659, -0.0880399489463089 51.50297543016591, -0.0879813242499659 51.50296808969798, -0.0878864350578846 51.50295620115383, -0.087607205567424 51.502921433069126, -0.0876072054686676 51.50292143306667, -0.0876072053713546 51.50292143308367, -0.0876072052792838 51.502921433119475, -0.087607205196049 51.50292143317268, -0.0876072051248994 51.50292143324121, -0.0876072050686124 51.50292143332239, -0.0876072050293848 51.50292143341306, -0.0875718887157261 51.503031915503655, -0.0874139305526745 51.503012163835656, -0.0874503905578022 51.50289846329147, -0.0874503905783742 51.50289846319622, -0.0874503905800788 51.50289846309879, -0.0874503905628519 51.50289846300287, -0.0874503905273476 51.50289846291212, -0.0874503904749147 51.50289846282998, -0.0874503904075448 51.50289846275957, -0.0874503903277971 51.50289846270356, -0.0874503902387006 51.50289846266409, -0.0874503901436394 51.502898462642655, -0.0872184674116834 51.502869500950254, -0.0872184673129662 51.50286950094775, -0.0872184672156828 51.5028695009647, -0.0872184671236279 51.50286950100044, -0.0872184670403919 51.502869501053574, -0.0872184669692217 51.50286950112203, -0.0872184669128932 51.502869501203136, -0.0872184668736036 51.50286950129373, -0.0871632778659572 51.50304161843133, -0.0871632778453859 51.503041618526595, -0.0871632778436852 51.50304161862404, -0.0871632778609196 51.50304161871996, -0.0871632778964344 51.50304161881072, -0.0871632779488802 51.50304161889286, -0.0871632780162645 51.503041618963266, -0.0871632780960272 51.50304161901927, -0.087163278185138 51.50304161905873, -0.0871632782802113 51.50304161908016, -0.0873043249390598 51.5030592068739, -0.0872872364452774 51.50311288269375, -0.0871457010190011 51.503096635771236, -0.0869420699989376 51.50307335075006, -0.0869961012224836 51.502904812442836, -0.0869961012429601 51.50290481234835, -0.086996101244867 51.50290481225168, -0.0869961012281337 51.50290481215645, -0.086996101193386 51.50290481206623, -0.0869961011419231 51.50290481198438, -0.0869961010756693 51.502904811913965, -0.0869961009971019 51.50290481185762, -0.0869961009091587 51.502904811817444, -0.0869961008151279 51.50290481179495, -0.0869961007185255 51.50290481179097, -0.0869961006229636 51.502904811805664, -0.0869961005320154 51.50290481183847, -0.0869961004490816 51.502904811888165, -0.0869961003772632 51.502904811952895, -0.0869961003772638 51.502904811952895, -0.0867378736251001 51.50318737293316, -0.0867131900823951 51.503212509167646, -0.0865635732584604 51.503365100035126, -0.0865625844593643 51.50336463441914, -0.0865625844113606 51.50336463439952, -0.0865625844113595 51.50336463439952, -0.0865275084998493 51.50335237197429, -0.0865569707631191 51.50331634336844, -0.0865580238599093 51.50331528145787, -0.0865580238742154 51.50331528144284, -0.0866356492074414 51.50323021913438, -0.0867779022716042 51.503074540234735, -0.0869440113232145 51.50289281212284, -0.0869440113825742 51.5028928120433, -0.0869440114250535 51.5028928119536, -0.0869440114489787 51.50289281185728, -0.0869440114534074 51.50289281175812, -0.0869440114381649 51.502892811660054, -0.0869440114038518 51.50289281156692, -0.0869440113518201 51.50289281148241, -0.08694401128412 51.502892811409836, -0.0869440112034189 51.50289281135206, -0.0869440111128965 51.50289281131137, -0.0869440110161193 51.50289281128936, -0.0867535136294299 51.502869020709156, -0.0867535135307322 51.50286902070665, -0.0867535134334669 51.50286902072359, -0.0867535133414263 51.50286902075931, -0.086753513258199 51.50286902081242, -0.08675351318703 51.50286902088085, -0.0867535131306943 51.50286902096193, -0.0867535130913884 51.5028690210525, -0.0867535130913892 51.5028690210525, -0.0867361132841826 51.50292323184697, -0.0865755715891166 51.5029032570434, -0.08661123081924 51.50279152204951, -0.0866112308192409 51.50279152204951, -0.0866112308396728 51.5027915219543, -0.0866112308412605 51.50279152185693, -0.086611230823944 51.5027915217611, -0.08661123078838 51.50279152167044, -0.0866112307359177 51.5027915215884, -0.0866112306685471 51.50279152151808, -0.0866112305888239 51.50279152146216, -0.0866112304997722 51.50279152142274, -0.08661123040477 51.50279152140134, -0.0862643484968622 51.50274827239438, -0.0861933979432667 51.50273938102363, -0.0862159507984379 51.502668798544875, -0.0862675494329679 51.50267530583977, -0.0862675495327692 51.50267530584231, -0.0862675496310856 51.50267530582497, -0.0862675497239978 51.50267530578845, -0.0862675498078017 51.50267530573419, -0.0862675498791563 51.502675305664376, -0.0862675499352169 51.50267530558177, -0.0862675499737486 51.50267530548967, -0.0862675499737491 51.50267530548967, -0.0862864221619717 51.502613475094726, -0.0864636391294531 51.50263435187476, -0.0864584566148763 51.502651442574404, -0.0864584565958719 51.50265144266945, -0.0864584565955644 51.502651442766386, -0.0864584566139652 51.50265144286155, -0.0864584566503828 51.50265144295138, -0.0864584567034484 51.5026514430325, -0.0864584567711677 51.50265144310185, -0.0864584568509958 51.50265144315683, -0.0864584569399326 51.502651443195376, -0.0864584570346352 51.50265144321604, -0.0865863498614521 51.50266656917524, -0.0865863499607894 51.502666569177045, -0.0865863500585232 51.502666569159175, -0.0865863501507945 51.50266656912234, -0.0865863502339599 51.50266656906798, -0.0865863503047357 51.50266656899825, -0.0865863503603274 51.502666568915906, -0.0865863503985399 51.502666568824196, -0.0865863503985394 51.502666568824196, -0.0866079062863844 51.502595699255, -0.0866079062865531 51.50259569925444, -0.0866296437350284 51.502523933384815, -0.086652883914772 51.50244724650904, -0.0867326025617493 51.50245664037642, -0.086859202806476 51.50247165502762, -0.0868592028997648 51.502471655029915, -0.0868592029918553 51.50247165501484, -0.0868592030795397 51.502471654982905, -0.0868592031597639 51.502471654935235, -0.0868592032297335 51.502471654873496, -0.0868592032870111 51.50247165479983, -0.0868592033296019 51.50247165471679, -0.0868592033560221 51.50247165462729, -0.0868592033653516 51.502471654534446, -0.0868592033572658 51.50247165444148, -0.0868528769693414 51.50243692978998, -0.0868528769400813 51.502436929689964, -0.0868528768907263 51.50243692959819, -0.0868528768234195 51.50243692951863, -0.0868528767410847 51.50243692945476, -0.0868528766472981 51.502436929409335, -0.0868528765461335 51.502436929384345, -0.0868528764419848 51.502436929380856, -0.0867582179164935 51.50244365828668, -0.0867533985511748 51.50241768200776, -0.086848056910661 51.50241095311324, -0.0868480570129885 51.502410953095136, -0.0868480571093647 51.50241095305628, -0.0868480571956267 51.50241095299833, -0.0868480572680485 51.50241095292381, -0.0868480573235019 51.50241095283593, -0.0868480573595916 51.50241095273848, -0.0868480573747587 51.50241095263568, -0.0868480573683483 51.50241095253196, -0.0868467897319104 51.50240337862254, -0.086882485684042 51.5024008136219, -0.0868952409154868 51.50247125278963, -0.0868705290308604 51.50247300783496, -0.0868705289320335 51.50247300785206, -0.0868705288386083 51.50247300788855, -0.086870528754344 51.50247300794294, -0.0868705286826312 51.502473008013055, -0.0868705286263554 51.502473008096075, -0.086870528587781 51.50247300818866, -0.0868705285877801 51.50247300818866, -0.0868603301224643 51.50250665393327, -0.0868591603609484 51.502510501661945, -0.0867976360834365 51.50271344978054, -0.0867976360644753 51.50271344987524, -0.0867976360640724 51.502713449971814, -0.0867976360822429 51.50271345006666, -0.0867976361183088 51.50271345015625, -0.0867976361709248 51.50271345023723, -0.0867976362381278 51.50271345030659, -0.0867976363174107 51.50271345036173, -0.0867976364058159 51.502713450400606, -0.0867976365000449 51.50271345042176, -0.0870887587648387 51.50274976332186, -0.0870887588636049 51.50274976332434, -0.087088758960931 51.50274976330736, -0.0870887590530172 51.50274976327156, -0.0870887591362682 51.50274976321836, -0.0870887592074336 51.502749763149836, -0.0870887592637349 51.50274976306865, -0.0870887593029734 51.50274976297798, -0.087107495062796 51.502691167161174, -0.0871074950832851 51.50269116706593, -0.0871074950849163 51.502691166968525, -0.087107495067628 51.50269116687265, -0.0871074950320765 51.50269116678195, -0.0871074949796116 51.50269116669986, -0.0871074949122248 51.50269116662951, -0.0871074948324745 51.502691166573555, -0.0871074947433881 51.502691166534134, -0.0871074946483475 51.50269116651273, -0.0868590865092216 51.50266022667813, -0.0868862760683493 51.502575241258995, -0.0869064809091434 51.50251253324487, -0.0870429409450917 51.50252950700925, -0.0871308074125347 51.502540472364245, -0.0872781585375605 51.50255888250305, -0.0875226937707183 51.50258939859043, -0.0874754490222109 51.50273700477435, -0.0872379344796241 51.502707412413336, -0.0872379343808678 51.50270741241087, -0.0872379342835534 51.50270741242786, -0.0872379341914797 51.50270741246366, -0.0872379341082407 51.502707412516855, -0.0872379340370859 51.50270741258539, -0.0872379339807927 51.50270741266656, -0.0872379339415587 51.502707412757225, -0.0872191983413225 51.502766008596325, -0.0872191983208338 51.502766008691566, -0.0872191983192026 51.502766008788974, -0.0872191983364905 51.50276600888485, -0.0872191983720415 51.50276600897555, -0.0872191984245058 51.50276600905763, -0.0872191984918918 51.50276600912799, -0.0872191985716413 51.50276600918394, -0.0872191986607269 51.502766009223365, -0.0872191987557667 51.502766009244766, -0.0875356950872509 51.502805432656864, -0.0875356951870528 51.50280543265925, -0.0875356952853399 51.502805432641765, -0.087535695378194 51.5028054326051, -0.0875356954619136 51.50280543255072, -0.0875356955331612 51.5028054324808, -0.0875356955890967 51.502805432398105, -0.0875356956274903 51.502805432305955)), ((-0.0855485008688955 51.50310969139146, -0.0856062200954659 51.50304579788976, -0.0856874375681486 51.503074460995705, -0.0856874376631632 51.50307446101908, -0.0856874377609106 51.50307446102351, -0.0856874378576485 51.503074461008815, -0.085687437949672 51.50307446097556, -0.0856874380334571 51.50307446092502, -0.085687438105795 51.50307446085913, -0.0856874381057963 51.50307446085913, -0.0857465212997724 51.50300897032288, -0.0858146799473403 51.503032923893315, -0.0858146800421549 51.503032923916535, -0.0858146801396751 51.50303292392089, -0.0858146802361831 51.50303292390622, -0.0858146803280004 51.50303292387307, -0.0858146804116271 51.503032923822715, -0.0858146804838757 51.50303292375707, -0.0858146804838741 51.50303292375707, -0.0858616680546854 51.5029809943903, -0.0862031675592498 51.50310113291776, -0.08617068914348 51.50313693212792, -0.0858605663199289 51.50302791664339, -0.0858605662249457 51.50302791662014, -0.0858605661272542 51.50302791661582, -0.0858605660305901 51.50302791663059, -0.0858605659386506 51.5030279166639, -0.0858605658549525 51.50302791671447, -0.085860565782697 51.50302791678036, -0.0858605657826987 51.50302791678036, -0.0858171958690526 51.50307603838245, -0.0857510228988054 51.503052836631966, -0.0857510228039528 51.50305283660881, -0.0857510227064081 51.50305283660453, -0.0857510226098914 51.50305283661929, -0.0857510225180834 51.50305283665252, -0.0857510224344848 51.50305283670297, -0.0857510223622835 51.503052836768695, -0.0856632325784847 51.50315005217379, -0.0855485008688955 51.50310969139146)), ((-0.0864156223899973 51.5028656671258, -0.0866159834223306 51.50293602057272, -0.0865600764400518 51.502997965763, -0.0863597189922888 51.50292752235551, -0.0864156223899973 51.5028656671258)))', 4326);
RETURN sdo_thing;
END;

0 个答案:

没有答案