At 11:29 AM 05/04/1999 -0400, srob wrote:
>Hello all,
>
> Does anyone know of any Metadata products that would automatically
> extract some metadata from a mapinfo file? Any help would be greatly
> appreciated.
>
If you have MapBasic, it's fairly simple. Just choose what Table_Info
commands you want stored and write out the metadata as text. Sample code
follows. You could always add more info from the table, like largest value
in field "n" or whatever, just use selects and store the results.
'--------------- Sample Metadata Code ----------
Include "MapBasic.Def"
Set ProgressBars Off
dim sTable as string
' ---- Here you will want to put your favorite routine for getting filename
-----
sTable = "Temp"
' ----
If TableInfo(sTable,TAB_INFO_TEMP) Then
Note "This is a temporary table. Cannot store metadata."
End Program
End If
Metadata Table sTable SetKey "\TableInfo" To ""
Metadata Table sTable SetKey "\TableInfo\MetaData_Refreshed" To
FormatDate$(CurDate())
Metadata Table sTable SetKey "\TableInfo\Number_of_Rows" To
Str$(TableInfo(sTable,TAB_INFO_NROWS))
If TableInfo(sTable,TAB_INFO_MAPPABLE) Then
Metadata Table sTable SetKey "\TableInfo\CoordSys" To
TableInfo(sTable,TAB_INFO_COORDSYS_NAME)
Metadata Table sTable SetKey "\TableInfo\Bounds" To ""
Metadata Table sTable SetKey "\TableInfo\Bounds\MinX" To
Str$(TableInfo(sTable,TAB_INFO_COORDSYS_MINX))
Metadata Table sTable SetKey "\TableInfo\Bounds\MaxX" To
Str$(TableInfo(sTable,TAB_INFO_COORDSYS_MAXX))
Metadata Table sTable SetKey "\TableInfo\Bounds\MinY" To
Str$(TableInfo(sTable,TAB_INFO_COORDSYS_MINY))
Metadata Table sTable SetKey "\TableInfo\Bounds\MaxY" To
Str$(TableInfo(sTable,TAB_INFO_COORDSYS_MAXY))
Metadata Table sTable SetKey "\TableInfo\Extents" To ""
Metadata Table sTable SetKey "\TableInfo\Extents\MinX" To
Str$(TableInfo(sTable,TAB_INFO_MINX))
Metadata Table sTable SetKey "\TableInfo\Extents\MaxX" To
Str$(TableInfo(sTable,TAB_INFO_MAXX))
Metadata Table sTable SetKey "\TableInfo\Extents\MinY" To
Str$(TableInfo(sTable,TAB_INFO_MINY))
Metadata Table sTable SetKey "\TableInfo\Extents\MaxY" To
Str$(TableInfo(sTable,TAB_INFO_MAXY))
End If
'---- END OF CODE ----
Note, no need to commit the table, changes are saved immediately.
Steve Wallace
GIS & Market Information Manager
Florida Farm Bureau Insurance Companies
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]