{"action":"closed","issue":{"url":"https://api.github.com/repos/Esri/geometry-api-java/issues/71","labels_url":"https://api.github.com/repos/Esri/geometry-api-java/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/Esri/geometry-api-java/issues/71/comments","events_url":"https://api.github.com/repos/Esri/geometry-api-java/issues/71/events","html_url":"https://github.com/Esri/geometry-api-java/issues/71","id":47648168,"number":71,"title":"OperatorClip is returning a clipped geometry that is not contained in the original geometry. ","user":{"login":"alocke","id":4031186,"avatar_url":"https://avatars.githubusercontent.com/u/4031186?v=3","gravatar_id":"","url":"https://api.github.com/users/alocke","html_url":"https://github.com/alocke","followers_url":"https://api.github.com/users/alocke/followers","following_url":"https://api.github.com/users/alocke/following{/other_user}","gists_url":"https://api.github.com/users/alocke/gists{/gist_id}","starred_url":"https://api.github.com/users/alocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alocke/subscriptions","organizations_url":"https://api.github.com/users/alocke/orgs","repos_url":"https://api.github.com/users/alocke/repos","events_url":"https://api.github.com/users/alocke/events{/privacy}","received_events_url":"https://api.github.com/users/alocke/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Esri/geometry-api-java/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Esri/geometry-api-java/labels/verified%20fixed","name":"verified fixed","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"alocke","id":4031186,"avatar_url":"https://avatars.githubusercontent.com/u/4031186?v=3","gravatar_id":"","url":"https://api.github.com/users/alocke","html_url":"https://github.com/alocke","followers_url":"https://api.github.com/users/alocke/followers","following_url":"https://api.github.com/users/alocke/following{/other_user}","gists_url":"https://api.github.com/users/alocke/gists{/gist_id}","starred_url":"https://api.github.com/users/alocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alocke/subscriptions","organizations_url":"https://api.github.com/users/alocke/orgs","repos_url":"https://api.github.com/users/alocke/repos","events_url":"https://api.github.com/users/alocke/events{/privacy}","received_events_url":"https://api.github.com/users/alocke/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Esri/geometry-api-java/milestones/1","html_url":"https://github.com/Esri/geometry-api-java/milestones/1.2.1","labels_url":"https://api.github.com/repos/Esri/geometry-api-java/milestones/1/labels","id":785200,"number":1,"title":"1.2.1","description":"A milestone for a future release","creator":{"login":"stolstov","id":3373377,"avatar_url":"https://avatars.githubusercontent.com/u/3373377?v=3","gravatar_id":"","url":"https://api.github.com/users/stolstov","html_url":"https://github.com/stolstov","followers_url":"https://api.github.com/users/stolstov/followers","following_url":"https://api.github.com/users/stolstov/following{/other_user}","gists_url":"https://api.github.com/users/stolstov/gists{/gist_id}","starred_url":"https://api.github.com/users/stolstov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stolstov/subscriptions","organizations_url":"https://api.github.com/users/stolstov/orgs","repos_url":"https://api.github.com/users/stolstov/repos","events_url":"https://api.github.com/users/stolstov/events{/privacy}","received_events_url":"https://api.github.com/users/stolstov/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":4,"state":"open","created_at":"2014-09-10T17:28:28Z","updated_at":"2015-03-12T22:35:16Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2014-11-03T21:40:33Z","updated_at":"2015-03-12T22:35:16Z","closed_at":"2015-03-12T22:35:16Z","body":"The input polygon that will be clipped looks like this:\r\n![input_geometry](https://cloud.githubusercontent.com/assets/4031186/4890493/8f8aec24-639f-11e4-8761-f27ad50720e4.jpg)\r\nThe envelope that is used as the clipper is the rectangle with the black boundary.\r\n![input_geometries](https://cloud.githubusercontent.com/assets/4031186/4890497/985a09e8-639f-11e4-9711-44c32e399ade.jpg)\r\nThe clipped geometry that is output from OperatorClip is purple with a red boundary. It has an extra line.\r\n![output_geometry](https://cloud.githubusercontent.com/assets/4031186/4890501/a1ffc0be-639f-11e4-872d-bab38e519287.jpg)\r\n\r\nThe JSON representation of the input geometry is at the bottom of this page. To reproduce this issue, copy the JSON into a text file called input_geometry.txt and put it in your C:\\temp directory. Then run the following code:\r\n```\r\nMapGeometry geom = OperatorFactoryLocal.loadGeometryFromJSONFileDbg(\"C:\\\\temp\\\\input_geometry.txt\");\r\nSpatialReference sr = geom.getSpatialReference();\r\nEnvelope2D env = new Envelope2D(-180.0, -0.0001, -59.999899999999997, 90.0);\r\n\r\nGeometry output_geom = OperatorClip.local().execute(geom.getGeometry(), env, sr, null);\r\n\r\nOperatorFactoryLocal.saveJSONToTextFileDbg(\"C:\\\\temp\\\\output_geometry.txt\", output_geom, sr);\r\n```\r\nThe JSON representation of the input geometry:\r\n{\"rings\":[[[-180,-90],[-180,-0.0001],[-180,0.0001],[-180,9.3581730025091776],[-179.59919502515584,9.233470321756803],[-178.63412869755791,8.9339395820775263],[-177.66977241656889,8.6345458574134213],[-176.70607167611092,8.3353739287291564],[-175.74297212622855,8.0365083580689678],[-174.7804196206057,7.7380334837654532],[-173.81836026339613,7.4400334156343995],[-172.85674045538178,7.1425920301155275],[-171.89550693948297,6.8457929653180605],[-170.93460684563649,6.549719615932446],[-169.97398773506052,6.2544551279696101],[-169.01359764392294,5.9600823932900786],[-168.05338512642822,5.6666840438867228],[-167.0932992973369,5.374342445885234],[-166.13328987392993,5.083139693228178],[-165.1733072174278,4.7931576010088008],[-164.21330237387338,4.504477698422324],[-163.25322711448484,4.2171812213035285],[-162.29303397548165,3.9313491042203808],[-161.3326762973868,3.6470619720946398],[-160.37210826380215,3.3644001313221166],[-159.41128493965573,3.08344356036574],[-158.4501623089136,2.8042718997966225],[-157.48869731174705,2.5269644417591093],[-156.52684788114379,2.2516001188377182],[-155.56457297894826,1.9782574923048779],[-154.60183263131307,1.7070147397303037],[-153.63858796354123,1.4379496419340165],[-152.67480123429505,1.1711395692668976],[-151.7104358691455,0.90666146720439855],[-150.74545649343111,0.64459184124042379],[-149.77982896439494,0.38500674107058946],[-148.81352040256263,0.12798174405565171],[-148.32739881289166,0.0001],[-148.32663855592423,-0.0001],[-147.84649922232347,-0.12640806204209282],[-146.87873516167247,-0.37808809705462021],[-145.91019931107007,-0.62698430713941911],[-144.94086414137007,-0.87302318424733505],[-143.97070353076856,-1.1161317863259228],[-142.99969279072036,-1.3562377582550855],[-142.02780869076855,-1.5932693535095117],[-141.05502948223113,-1.8271554565400114],[-140.08133492068498,-2.0578256058638016],[-139.10670628718776,-2.2852100178511625],[-138.1311264081761,-2.5092396111930935],[-137.15457967397538,-2.7298460320332145],[-136.17705205585764,-2.9469616797432829],[-135.1985311215833,-3.1605197333202999],[-134.21900604935888,-3.3704541783800819],[-133.23846764014706,-3.5766998347195997],[-132.25690832826206,-3.7791923844182786],[-131.27432219018488,-3.9778684004455456],[-130.29070495153451,-4.1726653757392205],[-129.30605399213096,-4.3635217527177792],[-128.32036834908843,-4.5503769531856193],[-127.33364871787876,-4.7331714085895973],[-126.34589745130597,-4.9118465905816393],[-125.35711855633838,-5.0863450418403753],[-124.36731768874404,-5.2566104071027357],[-123.37650214548262,-5.4225874643540912],[-122.38468085480679,-5.5842221561234195],[-121.39186436403247,-5.7414616208286056],[-120.39806482494282,-5.8942542241146878],[-119.40329597679215,-6.042549590126848],[-118.40757312688515,-6.1862986326576008],[-117.41091312871026,-6.3254535861076384],[-116.41333435761146,-6.4599680361975045],[-115.41485668399127,-6.5897969503667992],[-114.41550144404096,-6.714896707797477],[-113.4152914080048,-6.8352251289959929],[-112.41425074598783,-6.9507415048700452],[-111.41240499132732,-7.0614066252349712],[-110.40978100155246,-7.1671828066846661],[-109.4064069169674,-7.2680339197633348],[-108.40231211689809,-7.363925415373882],[-107.39752717365047,-7.4548243503600933],[-106.39208380423793,-7.5406994122012723],[-105.3860148199409,-7.621520942758468],[-104.3793540737696,-7.6972609610136997],[-103.37213640591051,-7.7678931847453336],[-102.36439758723918,-7.8333930510843297],[-101.35617426099657,-7.893737735899184],[-100.34750388272482,-7.9489061719592646],[-99.338424658571967,-7.9988790658292723],[-98.328975482075975,-8.0436389134503123],[-97.319195869547343,-8.0831700143666243],[-96.309125894174485,-8.1174584845598368],[-95.298806118979883,-8.1464922678564733],[-94.288277528760545,-8.170261145877932],[-93.277581461150248,-8.1887567465059696],[-92.26675953694587,-8.2019725508408534],[-91.255853589837898,-8.2099038986330601],[-90.244905595696082,-8.2125479921916487],[-89.233957601554152,-8.2099038986330601],[-88.223051654446294,-8.2019725508408534],[-87.212229730241916,-8.1887567465059696],[-86.201533662631618,-8.170261145877932],[-85.191005072412281,-8.1464922678564768],[-84.180685297217565,-8.1174584845598368],[-83.170615321844821,-8.0831700143666243],[-82.160835709316189,-8.0436389134503123],[-81.151386532820197,-7.9988790658292723],[-80.142307308667341,-7.9489061719592646],[-79.133636930395596,-7.893737735899184],[-78.125413604152982,-7.8333930510843297],[-77.117674785481654,-7.7678931847453336],[-76.110457117622559,-7.6972609610136997],[-75.103796371451381,-7.6215209427584707],[-74.097727387154237,-7.5406994122012723],[-73.09228401774169,-7.4548243503600933],[-72.087499074494076,-7.363925415373882],[-71.083404274424765,-7.2680339197633348],[-70.080030189839704,-7.1671828066846661],[-69.077406200064843,-7.0614066252349712],[-68.075560445404335,-6.9507415048700452],[-67.074519783387359,-6.8352251289959929],[-66.074309747351322,-6.7148967077974797],[-65.074954507400889,-6.5897969503668055],[-64.076476833780589,-6.4599680361975045],[-63.078898062681901,-6.3254535861076384],[-62.08223806450701,-6.1862986326576008],[-61.086515214600013,-6.042549590126848],[-60.091746366449343,-5.8942542241146878],[-60.000100000000003,-5.8802404662104415],[-59.999899999999997,-5.880209866843864],[-59.097946827359692,-5.7414616208286056],[-58.105130336585376,-5.5842221561234195],[-57.113309045909546,-5.4225874643540912],[-56.12249350264824,-5.2566104071027393],[-55.132692635053786,-5.0863450418403797],[-54.143913740086191,-4.9118465905816393],[-53.156162473513405,-4.7331714085895973],[-52.169442842303738,-4.5503769531856193],[-51.183757199261208,-4.3635217527177792],[-50.199106239857656,-4.1726653757392205],[-49.215489001207288,-3.9778684004455456],[-48.232902863130107,-3.7791923844182786],[-47.2513435512451,-3.5766998347195997],[-46.270805142033396,-3.3704541783800881],[-45.291280069808863,-3.1605197333203048],[-44.312759135534407,-2.9469616797432829],[-43.335231517416787,-2.7298460320332145],[-42.358684783215949,-2.5092396111930935],[-41.383104904204401,-2.2852100178511625],[-40.408476270707183,-2.0578256058638082],[-39.434781709160916,-1.8271554565400114],[-38.462002500623612,-1.5932693535095164],[-37.490118400671804,-1.3562377582550855],[-36.519107660623604,-1.1161317863259292],[-35.54894705002198,-0.87302318424732861],[-34.579611880322091,-0.62698430713941911],[-33.611076029719698,-0.37808809705461383],[-32.643311969068691,-0.12640806204209282],[-32.163172635467937,-0.0001],[-32.162412378500527,0.0001],[-31.676290788829647,0.12798174405564691],[-30.709982226997226,0.38500674107058946],[-29.744354697960944,0.64459184124041746],[-28.779375322246665,0.90666146720439855],[-27.815009957097118,1.1711395692668913],[-26.851223227850937,1.4379496419340165],[-25.887978560079091,1.7070147397303004],[-24.925238212443901,1.978257492304881],[-23.962963310248369,2.251600118837715],[-23.001113879645118,2.5269644417591164],[-22.039648882478559,2.8042718997966225],[-21.078526251736548,3.0834435603657337],[-20.117702927590017,3.3644001313221166],[-19.157134894005367,3.6470619720946327],[-18.196777215910515,3.9313491042203847],[-17.23658407690732,4.2171812213035258],[-16.276508817518788,4.5044776984223276],[-15.316503973964473,4.7931576010087973],[-14.356521317462125,5.0831396932281807],[-13.396511894055266,5.374342445885234],[-13.336124685712662,5.3926982017502647],[-13.336089067128825,5.3927090334165735],[-13.305071956659667,5.4021395162608279],[-13.274093768728733,5.4118151722210692],[-12.745323361579551,5.5771551039470619],[-11.787403563549788,5.877486071505122],[-10.829318861060187,6.1788156816086532],[-9.8710155737604168,6.4810597395809371],[-8.9124394734546399,6.7841337907565054],[-7.9535358282519155,7.087953125406159],[-6.9942494472995236,7.3924327833878261],[-6.0345247261162172,7.6974875585618481],[-5.0743056925482506,8.0030320030102189],[-4.1135360533688754,8.308980431100462],[-3.1521592415451778,8.6152469234355031],[-2.1901184641972122,8.9217453307318522],[-1.2273567512721115,9.2283892776700025],[-0.26381700496136773,9.5350921667602115],[0.70055795011580813,9.8417671822699617],[1.6658253159363881,10.148327294257555],[2.6320422692798502,10.454685262759899],[3.5992659090929351,10.760753642180392],[4.5675532029892452,11.066444785926421],[5.5369609328611205,11.371670851343941],[6.5075456395846913,11.676343804999634],[7.4793635667970761,11.980375428359606],[8.4524706037316264,12.283677323915972],[9.4269222270958153,12.586160921811768],[10.402773441981367,12.88773748701572],[11.380078721799237,13.188318127098627],[12.358891947234724,13.487813800663149],[13.339266344223915,13.786135326479606],[14.32125442095446,14.083193393379078],[15.304907903902176,14.378898570957304],[16.290277672915863,14.673161321139983],[17.277413695372047,14.965892010662495],[18.2663649594258,15.257000924514754],[19.257179406389582,15.546398280402181],[20.249903862280917,15.833994244273097],[21.24458396858472,16.119698946961694],[22.241264112285194,16.403422501995173],[23.239987355229857,16.685075024611535],[24.240795362896336,16.964566652034431],[25.243728332641126,17.241807565048408],[26.248824921520111,17.516708010917167],[27.256122173776646,17.789178327684837],[28.265655448106486,18.059128969897674],[29.277458344815784,18.326470535782132],[30.291562632999444,18.591113795910605],[31.307998177877607,18.852969723385062],[32.326792868436883,19.111949525563688],[33.347972545535185,19.367964677352916],[34.371560930637202,19.620926956083018],[35.397579555359812,19.870748477981117],[36.426047692014436,20.117341736250765],[37.45698228534485,20.360619640762874],[38.490397885668528,20.600495559356624],[39.52630658363654,20.836883360745023],[40.564717946838982,21.069697459012399],[41.60563895848702,21.298852859686125],[42.649073958414363,21.52426520735872],[43.695024586642887,21.745850834828623],[44.743489729767703,21.963526813723252],[45.794465470416753,22.17721100655849],[46.847945040048899,22.386822120184188],[47.903918775352281,22.59227976055552],[48.962374078509185,22.793504488764373],[50.023295381592845,22.990417878256455],[51.086664115358531,23.182942573152136],[52.152458682691304,23.371002347582444],[53.220654436964537,23.554522165942135],[54.291223665560722,23.733428243956286],[55.364135578794219,23.907648110447948],[56.43935630446947,24.077110669687695],[57.51684888829368,24.241746264198859],[58.596573300350485,24.401486737885094],[59.678486447827026,24.556265499341333],[59.999899999999997,24.601513625533201],[60.000100000000003,24.601541558739619],[60.762542194166485,24.706017585201824],[61.848691384803715,24.850679723374537],[62.936881879614646,24.990190396005495],[64.027058592195203,25.124489902011931],[65.119163536053748,25.25352041901958],[66.213135877781269,25.377226064535865],[67.308911997232769,25.495552956188121],[68.406425554726752,25.608449270854265],[69.505607565240325,25.715865302512064],[70.60638647954454,25.817753518633381],[71.708688272197662,25.91406861494956],[72.812436536278256,26.004767568416735],[73.917552584710165,26.089809688211123],[75.023955557998306,26.169156664588808],[76.131562538163564,26.242772615447674],[77.240288668630967,26.310624130435329],[78.350047279797195,26.372680312452481],[79.460750019971272,26.428912816407731],[80.572306991353344,26.479295885089016],[81.684626890691618,26.523806382023992],[82.797617154226941,26.562423821211933],[83.911184106515009,26.595130393620508],[85.025233112691126,26.621910990350131],[86.139668733724363,26.642753222381945],[87.254394884189026,26.657647436835941],[88.369314992069576,26.666586729679441],[89.484332160099768,26.669566954841422],[90.599349328129904,26.666586729679445],[91.714269436010511,26.657647436835941],[92.828995586475173,26.642753222381945],[93.943431207508411,26.621910990350131],[95.057480213684528,26.595130393620508],[96.171047165972595,26.562423821211933],[97.284037429507919,26.523806382023992],[98.396357328846193,26.479295885089016],[99.507914300228265,26.428912816407731],[100.61861704040228,26.372680312452488],[101.72837565156857,26.310624130435329],[102.83710178203597,26.242772615447674],[103.94470876220123,26.169156664588808],[105.05111173548937,26.089809688211123],[106.15622778392128,26.004767568416735],[107.25997604800187,25.91406861494956],[108.362277840655,25.817753518633381],[109.46305675495921,25.715865302512064],[110.56223876547267,25.608449270854269],[111.65975232296682,25.495552956188121],[112.75552844241827,25.377226064535872],[113.84950078414579,25.25352041901958],[114.94160572800433,25.124489902011931],[116.03178244058495,24.990190396005495],[117.11997293539582,24.850679723374537],[118.20612212603305,24.706017585201824],[119.29017787237251,24.556265499341333],[120.37209101984899,24.401486737885101],[121.45181543190586,24.241746264198859],[122.52930801573001,24.077110669687702],[123.60452874140532,23.907648110447948],[124.67744065463881,23.733428243956286],[125.748009883235,23.554522165942135],[126.81620563750823,23.371002347582444],[127.88200020484101,23.182942573152136],[128.94536893860663,22.990417878256455],[130.00629024169035,22.793504488764373],[131.06474554484726,22.59227976055552],[132.12071928015058,22.386822120184206],[133.17419884978278,22.17721100655849],[134.22517459043183,21.963526813723252],[135.27363973355665,21.745850834828623],[136.31959036178523,21.52426520735872],[137.36302536171252,21.298852859686125],[138.40394637336055,21.069697459012399],[139.442357736563,20.836883360745023],[140.47826643453101,20.600495559356624],[141.51168203485463,20.360619640762888],[142.5426166281851,20.117341736250765],[143.57108476483967,19.870748477981124],[144.59710338956233,19.620926956083018],[145.62069177466435,19.367964677352916],[146.64187145176265,19.111949525563688],[147.66066614232193,18.852969723385062],[148.67710168720009,18.591113795910605],[149.69120597538375,18.326470535782132],[150.70300887209305,18.059128969897674],[151.71254214642283,17.789178327684837],[152.71983939867937,17.516708010917181],[153.72493598755841,17.241807565048408],[154.72786895730314,16.964566652034431],[155.72867696496974,16.685075024611535],[156.72740020791434,16.403422501995173],[157.72408035161482,16.119698946961694],[158.71876045791862,15.833994244273097],[159.71148491380995,15.546398280402181],[160.70229936077374,15.257000924514754],[161.69125062482749,14.965892010662511],[162.67838664728367,14.673161321139983],[163.66375641629725,14.378898570957318],[164.64740989924508,14.083193393379078],[165.62939797597562,13.786135326479606],[166.60977237296481,13.487813800663149],[167.5885855984003,13.188318127098627],[168.56589087821817,12.88773748701572],[169.54174209310372,12.586160921811768],[170.51619371646791,12.283677323915972],[171.4893007534024,11.980375428359606],[171.79865345965379,11.883712801176182],[171.83027891190133,11.873823972365573],[171.86198143206843,11.864170550652773],[172.6481593133675,11.624406737738052],[173.62087070566304,11.326856619556949],[174.59243632793266,11.028757991878079],[175.56291013525379,10.730197202010272],[176.53234633392117,10.431260421361655],[177.50079932771416,10.132033639189364],[178.46832366500098,9.8326026566903106],[179.43497398666614,9.5330530813861127],[180,9.3581730025091776],[180,0.0001],[180,-0.0001],[180,-90],[166.6949272859664,-90],[-13.336089067128825,-90],[-59.999899999999997,-90],[-60.000100000000003,-90],[-180,-90]]],\"spatialReference\":{\"wkid\":4326}}\r\n"}}