Hello,
I have multiple problem using geography operations on shape.
1°) I try to do Intersection or Difference (in code behind not javascript) on two features and I often get TopologyException.
Example :
Intersection between :
POLYGON((1.79656064565097 46.8639402673798,1.83007551902301 46.870635061081,1.84749914878375 46.8647403207506,1.83745695823199 46.8499191888186,1.82252241843707 46.8346964806187,1.79673230702792 46.8449961632359,1.79656064565097 46.8639402673798))
And
POLYGON((1.83215044313746 46.8445102822201,1.82252241843707 46.8346964806187,1.80707512447274 46.840865598022,1.80707512447274 46.840865598022,1.81174174121595 46.839001911953,1.81002821353875 46.8433018965015,1.81334684636317 46.852919098263,1.82044202948055 46.8518932946534,1.82136325172225 46.851312396552,1.82728034803554 46.8395462165267,1.83215044313746 46.8445102822201))
=> TopologyException : no outgoing dirEdge found [ (0,04656064565097, 0,0201902673798031, Non Numérique) ]
I'm using GeographyUnit.DecimalDegree. I have read that there is a problem of precision in geography library like i saw on the following post :
TopologyExceptions are an unfortunate fact of life with the current JTS
algorithms. They are caused by robustness issues in the overlay code,
which are in turn caused by the limited precision of floating point
numerics. This is a well known problem in Computational Geometry.
I want to know you know a workaround for that kind of problem because I really need to compute Intersection/Difference on feature. I also need to stay on GeographyUnit.DecimalDegree.
2°) When I create a shape using MapSuite tools, I often get an exception when I try to save it on SQL Server 2008 :
24200 : The specified input does not represent a valid geography instance.
I manage to avoid some of those using Buffer/Reduce but I have still a lot of error.
Are your shape valid with SQL Server 2008 geography type ? Is it the same problem of precision like I describe above ? Do you know other workaround (want to stay in geography type).
Example of shapes that generate the error :
POLYGON((1.83215044313746 46.8445102822201,1.82252241843707 46.8346964806187,1.80707512447274 46.840865598022,1.80707512447274 46.840865598022,1.81174174121595 46.839001911953,1.81002821353875 46.8433018965015,1.82044202948055 46.8518932946534,1.82136325172225 46.851312396552,1.82728034803554 46.8395462165267,1.83215044313746 46.8445102822201,1.83215044313746 46.8445102822201))
POLYGON ((1.8225224167108536 46.834696479141712, 1.8321504443883896 46.844510279595852, 1.8272803472355008 46.839546226896346, 1.8213632556157606 46.851312398444861, 1.8204420281108469 46.851893298095092, 1.8100282102823257 46.843301899731159, 1.8117417260073125 46.839001922402531, 1.8070751279592514 46.840865597128868, 1.8225224167108536 46.834696479141712))
Thanks you in advance for your answer.