November 1, 2013 at 10:28 am
with reference to http://technet.microsoft.com/en-us/library/bb895372.aspx
DECLARE @g1 geometry = 'LINESTRING(1 4, 3 4, 2 4, 2 0)';
DECLARE @G2 geometry = 'LINESTRING(1 1, 1 1)';
SELECT @g1.STIsValid(), @G2.STIsValid();
00
why is the above invalid? based on these facts
Valid Instances
For a LineString instance to be valid it must meet the following criteria.
The LineString instance must be accepted.
If a LineString instance is not empty then it must contain at least two distinct points.
The LineString instance cannot overlap itself over an interval of two or more consecutive points.
how can the above query be invalid? can some one kindly explain to me what is the meaning of
The LineString instance cannot overlap itself over an interval of two or more consecutive points.
thanks
November 1, 2013 at 11:09 am
@g1 is overlapping itself as it's going from 2 4 to 3 4 twice.
@G2 does not have at least two distinct points. It's a single point referenced twice.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply