Original Message:
Sent: 3/8/2024 2:18:00 AM
From: Peter Møller
Subject: RE: Unique identifier
Morning Ad,
MapInfo Pro doesn't support this out of the box, and nor does the MapInfo tab format.
This would require a tool to help you manage the data or a database system in the background.
A small workaround could be to create a small script that can update the ID of the selected record(s).
The script would work like this:
- Find the maximum ID currently in the table selected from
- Update selection with the maximum ID + ROWID
The script could look like this:
Dim sBaseTable As String
sBaseTable = SelectionInfo(SEL_INFO_TABLENAME)
Dim sQuery As String
sQuery = SelectionInfo(SEL_INFO_SELNAME)
aID = sBaseTable + "." + sColumn
Select Max(aID) As "Max"
From sBaseTable
Into __MAX__ID NoSelect Hide
Fetch First From __MAX__ID
Dim nMaxID As Integer
nMaxID = __MAX__ID.MAX
Print "Max ID: " + nMaxID
Dim aID As Alias
aID = sQuery + "." + sColumn
Run Command "Update " + sQuery + " Set " + sColumn + " = " + nMaxID + " + ROWID"
Close Table __MAX__ID
Close Table sQuery
The script will show a dialog like this so that you can 1) see how many records are being updated in what table, and 2) change the name of the ID column if it's not just called ID
.
The dialog is created using the Variables option in the SQL Window. You can change the default column name for the IDs from ID to something different via the Edit Variables dialog.
I'm sorry but this got a bit more technical than I expected.
Peter
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------
Original Message:
Sent: 03-07-2024 03:20
From: Ad van Ooststroom
Subject: Unique identifier
God morning Peter,
I was thinking along the lines of a read-only number which is permanently linked to an object.
If the object is split in two, that number is eliminated and two new unique numbers are being generated.
That was the way the dutch cadastral parcels were numbered, and maybe also the danish.
Regards
Ad van Ooststroom
Original Message:
Sent: 3/7/2024 1:23:00 AM
From: Peter Møller
Subject: RE: Unique identifier
If you don't update the column again the values should stay as they are.
I feel like I'm missing the point though.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-06-2024 08:22
From: Ad van Ooststroom
Subject: Unique identifier
Dear Peter,
Thank you, I have updated the GIS database with the ROWID.
Since the objects in this database will be linked with external data and a permanent webaddress, these ROWID 's should apply always to the same object.
Is there a way to secure that within Mapinfo ?
Regards
Ad van Ooststroom
Original Message:
Sent: 3/5/2024 1:52:00 AM
From: Peter Møller
Subject: RE: Unique identifier
Hi Ad
Yes.
To see these IDs, you can create a new numerical column, preferably Integer
or LargeInt
, via the Table Strcutre dialog.
And using Update Column, you can assign the value ROWID to this column.
But keep in mind that you only will assign this ID to the records that are in the table when you run the statement. If you later add more records, you will need to update the UNIQUE_ID for these records too. I would manually assign an ID to these new records if you only have added a handful.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-04-2024 14:31
From: Ad van Ooststroom
Subject: Unique identifier
Is it possible to show the above mentioned ROWID's as a seperate column in existing browser
The table comtains 34000 Rows.
We want to link these ROWID 's to external permanent Identifyers or permanent webaddress's.
I asked the same question using a different PC and I am not sure it got send properly.
------------------------------
Ad van Ooststroom
Bergen op Zoom, NL
Original Message:
Sent: 10-23-2023 02:58
From: Peter Møller
Subject: Unique identifier
Hi Ad,
If your document is named using a value that also can be found in the data, you can use an expression to point to the document.
If you have a column with unique IDs, a column with the parish in case that is used in the naming too, and want to link to that, you can use an expression like this:
"C:\Parcel Documents\" & PARISH & "\" & UNIQUE_ID & ".PDF"
I may need a bit more details but I'm sure we can find a way
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 10-17-2023 07:47
From: Ad van Ooststroom
Subject: Unique identifier
Dear Peter,
In my research, parcels also are being split and therefor renumbered.
The alternative is to add the the unique identiier into one column in the Browser.
Selecting a parcel on the map should open the original source, where the original document can be viewed.
I read your article of 4-24-23; it is not quite clear yet how the above could be achieved. in the current (2023) vesrsion
Thanks for your help
------------------------------
Ad van Ooststroom
Bergen op Zoom, NL
Original Message:
Sent: 10-13-2023 06:39
From: Peter Møller
Subject: Unique identifier
Hi Ad
Tables in MapInfo Pro are assigned a unique hidden ID called ROWID in MapInfo Pro.
It can be used in applications to refer to records in a table but it's not a stable ID. If you pack your table, the IDs will change if some records have been deleted.
The ROWID always starts with 1 for the first record in the table and ends with an ID identical to the number of records in the table, including deleted records.
To see these IDs, you can create a new numerical column, and using Update Column, you can assign the value ROWID to this column.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 10-12-2023 11:28
From: Ad van Ooststroom
Subject: Unique identifier
Every time a browser is opened (unsorted), it seems to open in the same order and new data seem to be added to the bottom of the browser.
1) Is there a ( hidden) identifying number associated with each of the data lines, containing data for land parcels on a map, and how can that be made visible,
2) if so what happens to that identifyer of the parcel is split?
I reconstruct historic landownership, working backwards from an early 19th century kadastral database and certain parcels originated from more than one earlier parcel.
We are planning through linked data to connect these parcels to old maps, deeds, manuscripts etc located in various Historic Archives.
These Archives also use unique identifyers like https://hetutrechtsarchief.nl/collectie/609C5B9B48944642E0534701000A17FD for these documents.
Thank in advance
------------------------------
Ad van Ooststroom
Bergen op Zoom, NL
------------------------------