Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
653 views
in Technique[技术] by (71.8m points)

geometry - ogr2ogr Fail with ST Intersects

I imported a shapefile into MSSQL with geometry type.

ogr2ogr -f "MSSQLSpatial" "MSSQL:server=AAAAAA; database=BBBB; User Id=CCCC; Password=DDDDD;" "TEST.shp"

Insert into test2 select GEOGRAPHY::STGeomFromText(cast[ogr_geometry] as varchar (Max), 4326)

Intersect doesn't work and I get the following results

DECLARE @g geography;SET @g = geography::STGeomFromText('POLYGON((139.6340168 35.6073283,139.8998358 35.6073283,139.8998358 35.7219415,139.6340168 35.7219415,139.6340168 35.6073283))', 4326 );

SELECT  A.ogr_geography 

FROM [test2] A WITH (NOLOCK, INDEX=[spidx_test2]) WHERE A.ogr_geography.STIntersects( @g ) = 1 

enter image description here

question from:https://stackoverflow.com/questions/66057877/ogr2ogr-fail-with-st-intersects

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...