Last active
June 13, 2019 20:06
-
-
Save rkolka/8985e17e8dadb5d93b695b281db5f991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('LINESTRING(1 -2, 2 3)'), 1, VectorMakeX2(5,5))) | |
nvarchar: LINESTRING(1 -2, 5 5) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('LINESTRING(1 -2, 2 3)'), 0, VectorMakeX2(5,5))) | |
nvarchar: LINESTRING(5 5, 2 3) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('MULTIPOINT ((10 40), (40 30), (20 20), (30 10))'), 0, VectorMakeX2(5,5))) | |
nvarchar: MULTIPOINT(5 5, 40 30, 20 20, 30 10) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('MULTIPOINT ((10 40), (40 30), (20 20), (30 10))'), 2, VectorMakeX2(5,5))) | |
nvarchar: MULTIPOINT(10 40, 40 30, 5 5, 30 10) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 2, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((30 10, 40 40, 5 5, 10 20, 30 10)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 6, VectorMakeX2(5,5))) | |
nvarchar: <NULL> | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 5, VectorMakeX2(5,5))) | |
nvarchar: <NULL> | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 4, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((30 10, 40 40, 20 40, 10 20, 5 5, 30 10)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('MULTIPOINT (10 40, 40 30, 20 20, 30 10)'), 2, VectorMakeX2(5,5))) | |
nvarchar: MULTIPOINT(10 40, 40 30, 5 5, 30 10) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('MULTIPOINT ((10 40), (40 30), (20 20), (30 10))'), 2, VectorMakeX2(5,5))) | |
nvarchar: MULTIPOINT(10 40, 40 30, 5 5, 30 10) | |
> VALUE @a VARCHAR = 'MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))'; | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 2, VectorMakeX2(5,5))) | |
nvarchar: MULTILINESTRING((10 10, 20 20, 5 5),(40 40, 30 30, 40 20, 30 10)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 3, VectorMakeX2(5,5))) | |
nvarchar: MULTILINESTRING((10 10, 20 20, 10 40),(5 5, 30 30, 40 20, 30 10)) | |
> VALUE @a VARCHAR = 'MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))'; | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 2, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((30 20, 45 40, 5 5, 30 20),(15 5, 40 10, 10 20, 5 10, 15 5)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 3, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((30 20, 45 40, 10 40, 5 5, 30 20),(15 5, 40 10, 10 20, 5 10, 15 5)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 4, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((30 20, 45 40, 10 40, 30 20),(5 5, 40 10, 10 20, 5 10, 15 5, 5 5)) | |
> VALUE @a VARCHAR = 'MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 10 30, 10 10, 30 5, 45 20, 20 35),(30 20, 20 15, 20 25, 30 20)))' | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 4, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((40 40, 20 45, 45 30, 40 40),(5 5, 10 30, 10 10, 30 5, 45 20, 20 35, 5 5),(30 20, 20 15, 20 25, 30 20)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 4, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((30 10, 40 40, 20 40, 10 20, 5 5, 30 10)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 5, VectorMakeX2(5,5))) | |
nvarchar: <NULL> | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 4, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((30 10, 40 40, 20 40, 10 20, 5 5, 30 10)) | |
> ?GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 0, VectorMakeX2(5,5))) | |
nvarchar: POLYGON((5 5, 40 40, 20 40, 10 20, 30 10, 5 5)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FUNCTION GeomUpdateCoord(@geom GEOM, @index INT32, @newCoord FLOAT64x2) GEOM AS SCRIPT FILE 'MfdGeomDisplace.dll' ENTRY 'Script.GeomUpdateCoord' | |
GeomWkt(GeomUpdateCoord(StringWktGeom('POINT(1 -2)'), 1, VectorMakeX2(5,5))) | |
GeomWkt(GeomUpdateCoord(StringWktGeom('LINESTRING(1 -2, 2 3)'), 0, VectorMakeX2(5,5))) | |
GeomWkt(GeomUpdateCoord(StringWktGeom('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))'), 0, VectorMakeX2(5,5))) | |
GeomWkt(GeomUpdateCoord(StringWktGeom('MULTIPOINT ((10 40), (40 30), (20 20), (30 10))'), 2, VectorMakeX2(5,5))) | |
GeomWkt(GeomUpdateCoord(StringWktGeom('MULTIPOINT (10 40, 40 30, 20 20, 30 10)'), 2, VectorMakeX2(5,5))) | |
VALUE @a VARCHAR = 'MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))'; | |
GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 3, VectorMakeX2(5,5))) | |
VALUE @a VARCHAR = 'MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))'; | |
GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 4, VectorMakeX2(5,5))) | |
VALUE @a VARCHAR = 'MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 10 30, 10 10, 30 5, 45 20, 20 35),(30 20, 20 15, 20 25, 30 20)))'; | |
GeomWkt(GeomUpdateCoord(StringWktGeom(@a), 4, VectorMakeX2(5,5))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment