gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Support for font and custom symbols in mitab (patch)

Open wicksell opened this issue 6 years ago • 4 comments

Expected behavior and actual behavior.

When converting between TAB and MIF using ogr2ogr I expect the symbol style to be completely transferred. Today font and custom symbols are not transferred in the conversion process.

Steps to reproduce the problem.

Convert MIF to TAB that contains font or custom symbols using ogr2ogr. ogr2ogr -f "Mapinfo File" test_out.tab test_in.mif

The problem is also visible when listing a TAB/MIF file using ogrinfo. ogrinfo test.tab test

The attached ZIP-file contains examples of TAB and MIF files having font and custom symbols.

Operating system

Windows 10

GDAL version and provenance

Stable 2.4.0 for Windows from https://www.gisinternals.com

Attached patch

The attached ZIP-file contains a patch against GDAL 2.4.0 that fixes this issue. I'm no professional C++ developer so please review carefully ;) The patch make sure the correct type of point object is created depending on the type of symbol used. It also map MapInfo's custom symbol styles to OGR symbol styles. The symbol id is set to "mapinfo-custom-sym-[CUSTOM_STYLE]-[FILENAME]" with a fallback id on the form "[FILE_EXTENSION-[FILENAME]" and finally "ogr-sym-9".

gdal-2.4.0-mitab-font-and-custom-symbol.zip

wicksell avatar May 28 '19 09:05 wicksell

Would be more convenient for review if you could submit this as a pull request

rouault avatar May 29 '19 14:05 rouault

I do not have the environment setup for making pull request since we build using GIS internals packages. We have plans to fix this but it will be in a couple of months.

wicksell avatar Jun 13 '19 08:06 wicksell

@wicksell, couple of months with a good marginal have passed. What's the situation?

jratike80 avatar Oct 21 '23 18:10 jratike80

This patch is merged via #3081.

wicksell avatar Oct 23 '23 04:10 wicksell