Converting KML to TAB while maintaining the path to and name of embedded image

المشرف العام

Administrator
طاقم الإدارة
I have a number of kml files that have images linked in them. When I try to convert them to tab using FME/UniversalTranslator/QGIS/GlobalMapper I get a tab file which has the spatial location of the points but the attribute table does not include the name of the image. How can I get this? a process entirely in Mapinfo 12 will be ideal.

"<img src="MAPPT_20151210_110739_-1565318452.jpg" width="480px"/></br></br><a href="MAPPT_20151210_110739_-1565318452.jpg">To view original size of image file click RIGHT BUTTON and choose OPEN LINK.</a></br></br><table border="1"><tr><td>Type</td><td>Tent</td></tr><tr><td>Comments</td><td></td></tr><tr><td>Maintenance Action</td><td>No action</td></tr><tr><td>Post Material</td><td>Steel</td></tr><tr><td>Sign Material</td><td>Aluminium</td></tr><tr><td>Sign Condition</td><td>Good</td></tr><tr><td>Post Installation</td><td>One post sign</td></tr><tr><td>User</td><td>John Kenna</td></tr><tr><td>Logo</td><td>None</td></tr><tr><td>Post Condition</td><td>Good</td></tr><tr><td>Date/Time</td><td>10-12-2015 11:08</td></tr></table>So I need MAPPT_20151210_110739_-1565318452.jpg to be put in the "Image" attribute of the generated table along with all the other data in their own attributes.

I have seen similar questions here re: getting the extended data but none of them deal with getting the image name.

I have tried Global Mapper (my go to for this kind of work), QGIS, KML2SHP and FME. QGIS doesn't even separate the extended data (as per comments in How to convert KML to shapefile without losing attributes using QGIS?). The others do this but don't give me the image name.

The only "complex" solution I can think of is to convert to tab in GM Script and then read the kml in python and extract the value between [img src="] and [;] and put this into the tab as value for the image attribute. Surely there's a better solution!

Here a sample dataset -it has the kml, kmz and a shp plus the images. https://drive.google.com/file/d/0BxjBqNsSHofKQkRhWGtPamJTcmM/view?usp=sharing



أكثر...
 
أعلى