As can be seen from the following, the result of the polygon of geography is different from geometry geometry. I want a yellow square, but what I get is a green square. Is there any way to achieve this?
If I create a geography polygon, it returns the expected area, but with curves that I don't want. Why is the result of my geometry geometry different from my geographic range? Is it possible to create a geometric polygon that intersects a date?
I know that geography polygons should be counterclockwise. I tried both clockwise and counterclockwise for my geometric polygon, and the result was the same. How to set the direction of a geometric polygon?
declare @maxLat varchar(50);
declare @minLong varchar(50);
declare @minLat varchar(50);
declare @maxLong varchar(50);
set @maxLat ='-17.041470974676777'
set @minLong ='107.1076781691894'
set @minLat ='-41.6281068235708'
set @maxLong='-169.2204468308106'
declare @boundingRectGeography varchar(1000)
SET @boundingRectGeography = 'POLYGON((' + @minLong + ' ' + @minLat + ', ' +
@maxLong + ' ' + @minLat + ', ' +
@maxLong + ' ' + @maxLat + ', ' +
@minLong + ' ' + @maxLat + ', ' +
@minLong + ' ' + @minLat + '))'
DECLARE @BoundsGeography AS Geography =GEOGRAPHY::STPolyFromText(@boundingRectGeography,4326)
select @BoundsGeography
DECLARE @boundingRectGeometry varchar(1000)
SET @boundingRectGeometry = 'POLYGON((' + @minLong + ' ' + @minLat + ', ' +
@maxLong + ' ' + @minLat + ', ' +
@maxLong + ' ' + @maxLat + ', ' +
@minLong + ' ' + @maxLat + ', ' +
@minLong + ' ' + @minLat + '))'
DECLARE @BoundsGeometry AS geometry =geometry::STPolyFromText(@boundingRectGeometry,4326)
select @BoundsGeometry


, (, ), Google Maps. , . , , , .
/ ( , ) / ( , ) Google , . , , , .
@dotMorten +360 maxLong. , , :
set @maxLat ='69.00668202899128'
set @minLong ='158.5892594884939'
set @minLat ='-17.38989745726571'
set @maxLong='133.2767594884939'
set @maxLong=convert(VARCHAR(20), convert(float,@maxLong) +360 )

