Repository navigation
Description
Hi, I was trying to import a multipolygon in WTK format. But it throws an exception:com.esri.core.geometry.GeometryException' exception. Cannot evaluate com.esri.core.geometry.MultiPathImpl.toString()
Here is the WTK I am using:
MULTIPOLYGON (((-1.4337158203098852 53.42590083930004, -1.4346462383651897 53.42590083930004, -1.4349713164114632 53.42426406667512, -1.4344808816770183 53.42391134176576, -1.4337158203098852 53.424339319373516, -1.4337158203098852 53.42590083930004, -1.4282226562499147 53.42590083930004, -1.4282226562499147 53.42262754610009, -1.423659941537096 53.42262754610009, -1.4227294921872726 53.42418897437618, -1.4199829101572732 53.42265258737483, -1.4172363281222147 53.42418897437334, -1.4144897460898278 53.42265258737625, -1.4144897460898278 53.42099079900008, -1.4117431640598568 53.42099079712516, -1.4117431640598568 53.41849780932388, -1.4112778948070286 53.41771711805022, -1.4114404909237805 53.41689867267529, -1.411277890108579 53.416080187950215, -1.4117431640598568 53.4152995338453, -1.4117431657531654 53.40953184824072, -1.41723632610001 53.40953184402311, -1.4172363281199125 53.406257299700044, -1.4227294921899158 53.406257299700044, -1.4227294921899158 53.40789459668797, -1.4254760767598498 53.40789460061099, -1.4262193642339867 53.40914148401417, -1.4273828468095076 53.409531853100034, -1.4337158203098852 53.409531790075235, -1.4337158203098852 53.41280609140024, -1.4392089843723568 53.41280609140024, -1.439208984371362 53.41608014067522, -1.441160015802268 53.41935368587538, -1.4427511170075604 53.41935368587538, -1.4447021484373863 53.42099064750012, -1.4501953124999432 53.42099064750012, -1.4501953124999432 53.43214683850347, -1.4513643355446106 53.434108816701794, -1.4502702625278232 53.43636597733034, -1.4494587195580948 53.437354845300334, -1.4431075935937656 53.437354845300334, -1.4372459179209045 53.43244635455021, -1.433996276212838 53.42917388040006, -1.4337158203098852 53.42917388040006, -1.4337158203098852 53.42590083930004)))
The final goal is to use the simplify method to fix RING_SELF_INTERSECTION error in my WTK obj.
Thank you very much!
Activity
stolstov commentedon Mar 10, 2016
@qitang You have a space in the middle of a number between characters 999 - 1010. After -1.42547 before 60767... I've copied the text from your e-mail and you can see it here:
stolstov commentedon Mar 10, 2016
@gitang What Software do you get the RING_SELF_INTERSECTION error from?
I can see that this polygon consists of a single ring that is self-touching, and it looks like there is a hole in it, but it is not (filled with red on the image). This polygon is valid for the geodatabase, because it is not a true self-intersection. However, it is not a valid feature for the OGC specification. If you call OperatorSimplify.execute on it it will not fix the self-touching ring. If you want to fix it to OGC spec, use OperatorSimplifyOGC, then it will split the single one ring into two rings - an exterior and a hole.
qitang commentedon Mar 10, 2016
@stolstov the error RING_SELF_INTERSECTION is from another lib I was using. The exact error I have is: InvalidShapeException: Self-intersection at or near point. And here is the link:
pelias-deprecated/quattroshapes#16
I am trying to import my shapefile data into Elastic Search and had error like this. And then I am trying to use the OperatorSimplify.execute to fix it but got an error when I am trying to import the WTK.
stolstov commentedon Mar 10, 2016
@qitang I see... The problem point is (-1.4337158203098852 53.42590083930004), and OperatorSimplify will not fix this ring. Use OperatorSimplifyOGC instead.
qitang commentedon Mar 10, 2016
Nvm, I am an idiot. The error is from my IDE.. When I am debugging it, it tries to call the toString method on MultiPathImpl to print out messages. Thanks a lot!
Update MultiVertexGeometryImpl.java
stolstov commentedon Mar 10, 2016
@qitang Thanks, I've installed a fix so that your IDE would not crash (dev1.2.2 branch)