Solved

How to Write Metadata To MapInfo Tab File


Badge +1

Hi, 

 

I have a shp file I convert and style to a Mapinfo Tab file. I now want to add the below metadata into the Tab file to set up a hotlink. I am not sure how I use these attributes, mapinfo_metadata{}.name and mapinfo_metadata{}.value to write to the Tab file, How do I do it?

 

 

begin_metadata

"\\ActiveObject" = ""

"\\ActiveObject\\Expr" = """https://aims3d.geomatic.com.au/#/home?username=username&password=Password&PanoID=""+Pan_ID+"" """

"\\ActiveObject\\Mode" = "HOTLINK_MODE_BOTH"

"\\ActiveObject\\Relative" = "FALSE"

"\\ActiveObject\\Enabled" = "TRUE"

"\\ActiveObject\\Alias" = """Click to view Km_Post Images"""

end_metadata

 

 

Regards

Andrew

icon

Best answer by evieatsafe 20 June 2022, 18:53

View original

4 replies

Userlevel 1
Badge +14

Hi Andrew @gispert​, thanks for your question! I hope I can provide a solution.

You will first have to add new attributes with the AttributeManager that are named "name" and "value" with your metadata as values for these new attributes. The values in the "name" attribute must start with a backslash "\\" or else it will not write them.

imageThe second step is to make these into list attributes with the ListBuilder. Set the group by to your objectID or in my example ParkID and be sure to name the list "mapinfo_metadata" with the selected attributes "name" and "value" to make key value pairs.

image (1)You then can join your original file to the features you have created with the list attributes with the FeatureJoiner, join them on your ObjectID, then your file should be ready to be written to a MapInfo Tab file. Here is the workspace that was used to demonstrate this:

image (2)I hope this works for you,

Evie

Badge +1

Hi Andrew @gispert​, thanks for your question! I hope I can provide a solution.

You will first have to add new attributes with the AttributeManager that are named "name" and "value" with your metadata as values for these new attributes. The values in the "name" attribute must start with a backslash "\\" or else it will not write them.

imageThe second step is to make these into list attributes with the ListBuilder. Set the group by to your objectID or in my example ParkID and be sure to name the list "mapinfo_metadata" with the selected attributes "name" and "value" to make key value pairs.

image (1)You then can join your original file to the features you have created with the list attributes with the FeatureJoiner, join them on your ObjectID, then your file should be ready to be written to a MapInfo Tab file. Here is the workspace that was used to demonstrate this:

image (2)I hope this works for you,

Evie

Hi Evie, Thanks for your reply. I don't quite follow, in which transformer do I find the 'Add New Key' dialog? Could you attach your sample Workspace please?

Regards

Andrew

Userlevel 1
Badge +14

Hi Andrew @gispert​, the "name" attribute acts as the Key and the "value" acts as the metadata.

I have an idea of what you want to do and you could accomplish this in two ways- to import a separate file (eg. a CSV) with the columns "name" and "value" with multiple metadata values, or make them up in an AttributeCreator and parse them into list attribute that way.

I have attached a sample workspace of creating your values from scratch.

Here is a screenshot of how you could merge the values from the CSV into the existing file.

image (3)I hope this helps clarify and provides context!

Evie

Badge +1

Hi Evie, Its now working as I had hoped, thank you for your help.

 

Regards

Andrew

Reply