mapper icon indicating copy to clipboard operation
mapper copied to clipboard

Consider extending CoVe to vectorise area symbols as well

Open mpickering opened this issue 4 years ago • 7 comments

@lpechacek commented in https://github.com/OpenOrienteering/mapper/issues/833#issuecomment-283711859 that he didn't intend to implement vectorisation for area symbols in CoVe as line features are more common.

This is true for forest maps but for urban maps, area symbols are far more prolific, for example, buildings, forbidden areas, open areas, paved areas etc. There are far more area area than line features. Therefore for aiding in vectorising urban maps it would be useful if CoVe also supported area features.

mpickering avatar Dec 20 '19 14:12 mpickering

Ack. I myself needed area outline vectorization while working on sponsor logos for a map. Your argument about building outlines is persuasive. On the other hand, I can anticipate the issue reports about corners not being sharp enough and walls not being parallel. ;)

lpechacek avatar Dec 23 '19 09:12 lpechacek

IIUC, potrace (which is underlying CoVe) is much more a tool for areas than for lines?

The implementation of the "Fill bounded areas" tool is quite similar to the desired feature. It normally works on a pseudo-color raster image generated from map objects, but it could work on a pseudo-color raster image from classified colors as well.

dg0yt avatar Jan 09 '20 22:01 dg0yt

IIUC, potrace (which is underlying CoVe) is much more a tool for areas than for lines?

Yes. One of the possibilities of implementing area vectorization is a reuse of more Potrace code, specifically decompose.c.

The implementation of the "Fill bounded areas" tool is quite similar to the desired feature. It normally works on a pseudo-color raster image generated from map objects, but it could work on a pseudo-color raster image from classified colors as well.

I can sense the idea. Feeding the BW bitmap directly into Potrace image decomposer looks, however, easier to me. Potrace was written specifically for the task of vectorizing areas, including holes(!). We can easily build on P. Selinger's work here, in my opinion.

In fact I also very much like Potrace's path conversion from straight lines to curves (http://potrace.sourceforge.net/potrace.pdf, chapter 2.3). I'd like to use that same algorithm in Mapper for path smoothing. In my opinion, Potrace places curve control points in a more natural way than the current Mapper algorithm. But I've already started hacking too many bits without finishing them, so I won't start another one at the moment.

lpechacek avatar Jan 10 '20 12:01 lpechacek

GDAL's polygonize algorithm seems to have users not only in QGIS: https://www.dropbox.com/s/3vxnj0eurr6y9hp/polygonize.zip?dl=0&file_subpath=%2Fpolygonize.txt

dg0yt avatar Dec 12 '20 18:12 dg0yt

FIY: https://stefansolsida.wordpress.com/2017/08/06/gora-om-bilder-till-editerbara-objekt-i-kartprogrammet-med-hjalp-av-programmet-polygonize/

ollesmaps avatar Dec 14 '20 13:12 ollesmaps

As a result, this feature could not be installed, right?

AhmetPolat43 avatar Dec 28 '20 19:12 AhmetPolat43

As a result, this feature could not be installed, right?

Someone needs to do the work.

dg0yt avatar Dec 29 '20 13:12 dg0yt