gdal
gdal copied to clipboard
Unable to Open SVG
Expected behavior and actual behavior.
I expected to be able to open a SVG file. The following SVG is generated from a PDF using pdftocairo -svg. I have also tried to use a svg generated from adobe illustrator (from the same pdf).
Steps to reproduce the problem.
ogrinfo "Asset 1.svg"
ERROR 4: `Asset 1.svg' not recognized as a supported file format.
ogrinfo failed - unable to open 'Asset 1.svg'.
ogrinfo --formats lists I have SVG as a supported format: SVG -vector- (rov): Scalable Vector Graphics
Operating system
Windows 11 23H2
GDAL version and provenance
GDAL 3.8.4 from osgeo4w.
Relevant files
As documented in https://gdal.org/drivers/vector/svg.html : "Currently, it will only read SVG files that are the output from Cloudmade Vector Stream Server"
Does Cloudmade Vector Stream Server even exist any more?
Does Cloudmade Vector Stream Server even exist any more?
apparently not : https://qgis-user.osgeo.narkive.com/p6nWarcj/add-svg-as-vector-layer "It looks like this product is "Cloudmade Vector Stream Server", which appears to be a dead web service?
I guess the driver could be extended to be more generic. The Cloudmade stuff allowed to produced georeferenced datasets. A more generic SVG reader would produce arbitrary vector coordinates. Reopening for a potential contributor willing to have a take on that.
@rouault is that a new requirement? I distinctly remember opening a Inkscape exported svg using ogr sometime around ~5 years ago
is that a new requirement?
no, it's not new. As far as I can see, it exists since day 1 (71ab469144a3666489283d3362e05a21e9470991)
@rouault
Guess my memory is a bit leaky then! :laughing: (Maybe I went Inkscape SVG -> svg to dxf -> OGR...)
going from SVG to DXF sucks and I lose a lot of detail, unfortunate.
You mean going from SVG to DXF with Inkscape sucks, or?
Should we remove the SVG driver altogether because I think it is rather useless as it stands now?
You mean going from SVG to DXF with Inkscape sucks, or?
Should we remove the SVG driver altogether because I think it is rather useless as it stands now?
Going from SVG to DXF so GDAL support it, is what sucks. SVG driver is basically useless right now, you can't use it.
Going from SVG to DXF so GDAL support it, is what sucks. SVG driver is basically useless right now, you can't use it.
The GDAL side does not really suck because the SVG driver has always been useless for that purpose. That is a missing feature, GDAL has never had a generic SVG driver. The limitation of the driver is documented "Currently, it will only read SVG files that are the output from Cloudmade Vector Stream Server".
Because the Vector Stream Server does not exist any more I think that the driver could be removed.