Exporting set of lat/long coordinates to SVG using tool or code?

If you have your spatial data in a PostGIS database, try ST_AsSVG, e.g.:

postgis=# SELECT ST_AsSVG(ST_MakePoint(1797227.3141, 5431330.2559));
                     st_assvg
--------------------------------------------------
 cx="1797227.3141000001" cy="-5431330.2559000002"
(1 row)

(The linestring and polygon conversions are much more tricky, and thus very useful to have.)

If you don't use a database and are familiar with C, you can use the liblwgeom library (from PostGIS, but independent of PostgreSQL). See the API docs for lwgeom_to_svg.

Note: these methods only provide parts of the SVG geometric elements, not the file.


Manual Method -- The GPS Visualizer takes in coordinates and can export them to a variety of formats, including SVG.


Another manual method in QGIS is to use SimpleSVG plugin. enter image description here

Reference: https://plugins.qgis.org/plugins/simplesvg/