Hi @Zolotoy ,
Welcome to Microsoft Q&A!
You could try to firstly converts SVG (Scalable Vector Graphics) into WKT (Well-Known Text), a markup language for representing vector geometry on maps implemented by spatially-enabled databases like SQL Server and MySQL.
Please refer a little library called SVG-to-WKT that does the conversion.
Example:
SVGtoWKT.convert('<svg><polygon points="1,2 3,4 5,6" /><line x1="7" y1="8" x2="9" y2="10" /></svg>');
>>> "GEOMETRYCOLLECTION(POLYGON((1 -2,3 -4,5 -6,1 -2)),LINESTRING(7 -8,9 -10))"
Secondly you could work with WKT in SQL Server as below:
create table geometry_polygons(
id int identity(1,1) ,
polygon geometry,
label varchar(50),
area decimal(10,4));
declare @g geometry;
set @g=geometry::STGeomFromText('POLYGON((175.0305935740471 -39.924665194652604,175.03033608198166 -39.924387504970255,175.0301563739777 -39.92449035313209,175.03041118383408 -39.92474952981466,175.0305935740471 -39.924665194652604))', 4326);
insert into geometry_polygons (polygon) values (@g);
select * from geometry_polygons
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.