Can anyone help with this error? It’s not an issue with the WKT itself as I can easily convert the spatial to java using the JTS api without error.
From: Michael Gangl <michael.e.ga...@jpl.nasa.gov<mailto:michael.e.ga...@jpl.nasa.gov>> Date: Thursday, November 5, 2015 at 3:40 PM To: "solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>" <solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>> Subject: SolrSpatial conversion error I’m processing some satellite coverage data and storing it in solr to search by geographical regions. I can create the correct WKT and pass ‘invalid’ tests when its created, but when I output to WKT and then ingested in solr, it looks like some string to digit conversion errors are happening: 2015-11-05 23:24:03.272 ERROR (qtp1125757038-18) [ x:l2ssCore] o.a.s.c.SolrCore org.apache.solr.common.SolrException: Couldn't parse shape 'POLYGON ((39.42654 86.82489, -22.74477 87.94481, -51.87799 87.34623, -70.80492 86.02579, -80.82939 84.22955, -87.55906 81.48592, -91.99886 77.37768, -94.95214 71.18504, -109.15262 71.1237, -122.03073 70.07185, -132.71886 68.30231, -143.40538 65.33532, -159.34148 70.66631, -180 73.53569, -180 90, 180 90, 180 73.53569, 157.67432 73.89309, 154.67627 78.65489, 149.71222 82.05602, 142.35925 84.34942, 131.24057 85.93911, 89.5779 87.4869, 39.42654 86.82489))' because: com.vividsolutions.jts.geom.TopologyException: side location conflict [ (39.42653999999999, 86.82489, NaN) ] The conflict point ( (39.42653999999999, 86.82489, NaN) isn’t in the original WKT, so it looks like that’s being created or synthesized somewhere within solr. Has anyone run into this issue before? Are there configuration options that can help prevent this situation? Full stack trace: l2ss-solr_1 | 2015-11-05 23:24:03.270 INFO (qtp1125757038-18) [ x:l2ssCore] o.a.s.u.p.LogUpdateProcessor [l2ssCore] webapp=/solr path=/update params={wt=javabin&version=2} {} 0 157 l2ss-solr_1 | 2015-11-05 23:24:03.272 ERROR (qtp1125757038-18) [ x:l2ssCore] o.a.s.c.SolrCore org.apache.solr.common.SolrException: Couldn't parse shape 'POLYGON ((39.42654 86.82489, -22.74477 87.94481, -51.87799 87.34623, -70.80492 86.02579, -80.82939 84.22955, -87.55906 81.48592, -91.99886 77.37768, -94.95214 71.18504, -109.15262 71.1237, -122.03073 70.07185, -132.71886 68.30231, -143.40538 65.33532, -159.34148 70.66631, -180 73.53569, -180 90, 180 90, 180 73.53569, 157.67432 73.89309, 154.67627 78.65489, 149.71222 82.05602, 142.35925 84.34942, 131.24057 85.93911, 89.5779 87.4869, 39.42654 86.82489))' because: com.vividsolutions.jts.geom.TopologyException: side location conflict [ (39.42653999999999, 86.82489, NaN) ] l2ss-solr_1 | at org.apache.solr.schema.AbstractSpatialFieldType.parseShape(AbstractSpatialFieldType.java:236) l2ss-solr_1 | at org.apache.solr.schema.AbstractSpatialFieldType.createFields(AbstractSpatialFieldType.java:201) l2ss-solr_1 | at org.apache.solr.update.DocumentBuilder.addField(DocumentBuilder.java:48) l2ss-solr_1 | at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:123) l2ss-solr_1 | at org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:83) l2ss-solr_1 | at org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:237) l2ss-solr_1 | at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:163) l2ss-solr_1 | at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.FieldNameMutatingUpdateProcessorFactory$1.processAdd(FieldNameMutatingUpdateProcessorFactory.java:79) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.FieldMutatingUpdateProcessor.processAdd(FieldMutatingUpdateProcessor.java:117) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:955) l2ss-solr_1 | at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:1110) l2ss-solr_1 | at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:706) l2ss-solr_1 | at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:104) l2ss-solr_1 | at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51) l2ss-solr_1 | at org.apache.solr.update.processor.AbstractDefaultValueUpdateProcessorFactory$DefaultValueUpdateProcessor.processAdd(AbstractDefaultValueUpdateProcessorFactory.java:94) l2ss-solr_1 | at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:250) l2ss-solr_1 | at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:177) l2ss-solr_1 | at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:98) l2ss-solr_1 | at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74) l2ss-solr_1 | at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143) l2ss-solr_1 | at org.apache.solr.core.SolrCore.execute(SolrCore.java:2068) l2ss-solr_1 | at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:669) l2ss-solr_1 | at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:462) l2ss-solr_1 | at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:214) l2ss-solr_1 | at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179) l2ss-solr_1 | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) l2ss-solr_1 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) l2ss-solr_1 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) l2ss-solr_1 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) l2ss-solr_1 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) l2ss-solr_1 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) l2ss-solr_1 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) l2ss-solr_1 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) l2ss-solr_1 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) l2ss-solr_1 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) l2ss-solr_1 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) l2ss-solr_1 | at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) l2ss-solr_1 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) l2ss-solr_1 | at org.eclipse.jetty.server.Server.handle(Server.java:499) l2ss-solr_1 | at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) l2ss-solr_1 | at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) l2ss-solr_1 | at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) l2ss-solr_1 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) l2ss-solr_1 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) l2ss-solr_1 | at java.lang.Thread.run(Thread.java:745) l2ss-solr_1 | Caused by: java.text.ParseException: com.vividsolutions.jts.geom.TopologyException: side location conflict [ (39.42653999999999, 86.82489, NaN) ] l2ss-solr_1 | at com.spatial4j.core.io.WktShapeParser.parseIfSupported(WktShapeParser.java:118) l2ss-solr_1 | at com.spatial4j.core.io.WktShapeParser.parse(WktShapeParser.java:86) l2ss-solr_1 | at com.spatial4j.core.context.SpatialContext.readShapeFromWkt(SpatialContext.java:294) l2ss-solr_1 | at org.apache.solr.schema.AbstractSpatialFieldType.parseShape(AbstractSpatialFieldType.java:231) l2ss-solr_1 | ... 56 more l2ss-solr_1 | Caused by: com.vividsolutions.jts.geom.TopologyException: side location conflict [ (39.42653999999999, 86.82489, NaN) ] l2ss-solr_1 | at com.vividsolutions.jts.geomgraph.EdgeEndStar.propagateSideLabels(EdgeEndStar.java:300) l2ss-solr_1 | at com.vividsolutions.jts.geomgraph.EdgeEndStar.computeLabelling(EdgeEndStar.java:139) l2ss-solr_1 | at com.vividsolutions.jts.geomgraph.DirectedEdgeStar.computeLabelling(DirectedEdgeStar.java:127) l2ss-solr_1 | at com.vividsolutions.jts.operation.overlay.OverlayOp.computeLabelling(OverlayOp.java:373) l2ss-solr_1 | at com.vividsolutions.jts.operation.overlay.OverlayOp.computeOverlay(OverlayOp.java:173) l2ss-solr_1 | at com.vividsolutions.jts.operation.overlay.OverlayOp.getResultGeometry(OverlayOp.java:127) l2ss-solr_1 | at com.vividsolutions.jts.operation.overlay.OverlayOp.overlayOp(OverlayOp.java:66) l2ss-solr_1 | at com.vividsolutions.jts.operation.overlay.snap.SnapIfNeededOverlayOp.getResultGeometry(SnapIfNeededOverlayOp.java:96) l2ss-solr_1 | at com.vividsolutions.jts.operation.overlay.snap.SnapIfNeededOverlayOp.overlayOp(SnapIfNeededOverlayOp.java:58) l2ss-solr_1 | at com.vividsolutions.jts.geom.Geometry.intersection(Geometry.java:1342) l2ss-solr_1 | at com.spatial4j.core.shape.jts.JtsGeometry.cutUnwrappedGeomInto360(JtsGeometry.java:472) l2ss-solr_1 | at com.spatial4j.core.shape.jts.JtsGeometry.<init>(JtsGeometry.java:85) l2ss-solr_1 | at com.spatial4j.core.context.jts.JtsSpatialContext.makeShape(JtsSpatialContext.java:203) l2ss-solr_1 | at com.spatial4j.core.io.jts.JtsWktShapeParser.makeShapeFromGeometry(JtsWktShapeParser.java:252) l2ss-solr_1 | at com.spatial4j.core.io.jts.JtsWktShapeParser.parsePolygonShape(JtsWktShapeParser.java:133) l2ss-solr_1 | at com.spatial4j.core.io.jts.JtsWktShapeParser.parseShapeByType(JtsWktShapeParser.java:89) l2ss-solr_1 | at com.spatial4j.core.io.WktShapeParser.parseIfSupported(WktShapeParser.java:114) l2ss-solr_1 | ... 59 more l2ss-solr_1 |