ok, the problems are with the curves. The ogr2ogr tool has a converter from Interlis to other ogrformats. Interlis supports arcs (defined by three points). They also calculate new vertices along the arcs to be compatible to other formats that don't support curves. One can define how many
Every SVG viewer has code on how to display curves (arcs, quadratic and cubic spline curves). But I don't know if you can dig up and work with that code directly. Many of them probably forward their drawing commands to underlying graphics libraries like Cairo, AGG, OpenVG, Java2D, etc. As you said, you might also want to ask the Batik developers on the Batik list. These people are usually friendly and often help where they can. Andreas > Andreas, > > Thanks for you comments. I agree completely. > > The curves are definitely where the problem lies. There would need to > be a clever algorithm that converted them to polylines with some sort of > configurable resolution. However, my guess is the code used convert SVG > to raster formats like TIF and PNG has to do something similar. > > I began looking into using the facilities in Batik to accomplish this. > The PNGTranscoder looks to be a good place to start. Haven't gotten > very far in this past weekend when I began to look into it, no blatant > roadblocks yet. > > --Kurt > > Andreas Neumann wrote: >> Hi, >> >> I don't have an immediate solution to your problem, however, I would >> like >> to discuss the use of the SVG format. Also, are you using curves in your >> original data? >> >> SVG would be a great format for transforming non-GIS vector maps into a >> GIS format. But it is not so surprising that most GIS only export and >> don't import SVG. SVG is usually a presentation format, not a transfer >> format for GIS data. Also, SVG has a lot of features that can't be >> easily >> transfered to GIS - think about elliptical arcs, cubic and quadratic >> spline curves. Those would have to be transfered into the OGC geometry >> models, where support for curves is more or less in its infancy. >> >> A number of GIS software allows the export of SVG, not always in a very >> form, though: Postgis (ok), Grass (did not try that), Mapserver (haven't >> tried that), ESRI (crappy, they seem to have some sort of "resolution" >> for >> their vector export). >> >> But, I think it would be great to have svg support incorporated into the >> ogr tools. It would make sense, also since FME and other OS and >> commercial >> GIS support SVG. >> >> Andreas >> >> >>> I have a TON of vector drawings available to me in PDF format that I'm >>> georeferencing. So far, I'm doing it by converting them to PNGs and >>> using r.to.vect to massage them. This is really tedious and the data >>> isn't as clean as a straight vector conversion would be. In >>> Illustrator, I can see that all the vector math is there. That is, the >>> PDF isn't simply a wrapper around raster data. >>> >>> I've tried opening the PDFs in Illustrator and exporting them as DXFs, >>> but Grass ignores a lot of the data when I do this...they look very >>> different in Grass once imported. I can export them as SVG from >>> Illustrator, but surprisingly, there doesn't appear to be a single >>> open-source tool available out there that converts SVG into some >>> mainstream GIS file format. >>> >>> Does anyone have experience doing this type of conversion? Pointers >>> welcome. >>> >> >> > > -- Andreas Neumann Böschacherstrasse 6, CH-8624 Grüt/Gossau, Switzerland Email: [EMAIL PROTECTED], Web: * http://www.carto.net/ (Carto and SVG resources) * http://www.carto.net/neumann/ (personal page) * http://www.svgopen.org/ (SVG Open Conference) * http://www.geofoto.ch/ (Georeferenced Photos of Switzerland) _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user