Okay, it seems you are on the right track, Michael :-)
Now if you can take the easy way depends on your version of MapInfo Pro.
If you are using MapInfo Pro v2019 or newer, you can add the AggregateCombine() aggregate to your list of columns to include. This will merge the polygons from the records with the same IDs and so keep the geometry when doing a Group By.
The query will look like this:
Select ID, Max(WaterDepth) "WaterDepth", AggregateCombine(OBJ)
From MEASUREMENTS
Group By ID
If you are using an older version of MapInfo Pro, you'll have to save the result from the Group By and we then have to find a way to get the polygon added back onto the non-mappable records. For now, I hope you are on a more recent version of MapInfo Pro - fingers crossed :-)
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------
Original Message:
Sent: 06-13-2023 03:02
From: Michael W
Subject: Duplicate polygons with varying values
Hi Peter,
Thanks for your interest. The duplicate polygons have the same ID. I did try using an Sql to group and aggregate which does find max for each ID but the geometry gets lost. Any help appreciated. Thanks. M
------------------------------
Michael W
Knowledge Community Shared Account
Original Message:
Sent: 06-13-2023 01:28
From: Peter Møller
Subject: Duplicate polygons with varying values
Do the duplicate polygons have the same ID or other value that can help you identify which polygons are "the same"?
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 06-12-2023 15:43
From: Michael W
Subject: Duplicate polygons with varying values
I have lots of polygons (triangles) each with a unique ID. There are many duplicate polygons with each one having a value which represents water depth. I'd like to create a gis layer having the maximum value for each triangle and retain the trianglecreating a new max value/polygon layer. Any help appreciated. Thanks M
------------------------------
Michael W
Knowledge Community Shared Account
------------------------------