Hello Ian,
It’s been a while and I hope you’re well (i.e. not yet sectioned).
I would, of course, yield to any antipodean members in the group on “upside down maps” 😊 but it’s fairly straight forward to flip data with a horizontal plane. There may be a tool out there already, but a MapBasic program can iterate through the rows of a table, store the geometry object in a variable and then loop through all the coordinates. It’s important to remember that points/polylines/polygons can be “multi” in nature, so there would be an outer loop to go through the “parts” and an inner loop to iterate through the coordinates. With each coordinate, extract the x/y and then apply a transformation to the y coordinates. It could be as simple as y = MAX_Y – y. Once you’ve processed a single object, perform a SQL update to store the new geometry (usually using rowid).
Bitmaps may be a little harder unless there is any built-in transformation feature in Pro that I’m unaware of. Text objects may be slightly more complicated too since you’ll not only want to transform their position, but probably also orientation. e.g. 45 degrees -> 135 degrees. Horizontal labels will, however, probably stay that way unless they really need to be upside down due to representing something (e.g. in MasterMap Topo the building numbers are aligned on to the road the property belongs to).
Hope this helps.
Regards,
Warren Vick
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mapinfo-l/e9652692-ac98-4dc0-a992-430602dee099n%40googlegroups.com.
Also remember that MapInfo Pro comes with a number of tools for rotating and mirroring objects.
Found in the Transform dropdown on the Spatial tab.
Just remember to use the same point to rotate the objects around.
From: mapi...@googlegroups.com <mapi...@googlegroups.com>
On Behalf Of Warren Vick
Sent: 15. januar 2021 11:18
To: mapi...@googlegroups.com
Subject: RE: [MI-L] Rotating all spatial features through 180 degrees
This message originated Externally. Use proper judgement and caution with attachments, links, or responses. |
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/VI1PR10MB27664990A46E4F8AACC3B18CF9A70%40VI1PR10MB2766.EURPRD10.PROD.OUTLOOK.COM.
Hi Ian,
It sounds like an interesting project!
I am not sure why you would rotate the bitmap because that would still have all the data in the right place but just upside down – or maybe I misunderstand what you are trying to do. If you are trying to rotate each individual feature then I think that would have to be a MapBasic program. Of course points would not change much. Another option is to apply a random distribution offset for the points.
However – if you want to “flip” the dataset then I would export to MIF. Edit the MIF to add a TRANSFORM clause.
Use TRANSFORM 0,-1,0,0
And in theory that would flip the data by 180 degrees which give an upside down type map. I am not sure what use that would be.
A more complicated approach would be to apply an affine transformation to the data.
Regards
Martin Hodder
Higher Mapping Solutions
From: 'Ian Oldfield' via MapInfo-L <mapi...@googlegroups.com>
Sent: 15 January 2021 09:28
To: MapInfo-L <mapi...@googlegroups.com>
Subject: [MI-L] Rotating all spatial features through 180 degrees
Hi,
--
Hi Ian,
Just a follow-up to say that “flip” (which I think is what you want) and “rotate” are different, unless the rotation is of the entire map (like a raster) rather than object-by-object.
The transform option highlighted by Martin looks useful, but I guess it depends on whether you want to just view the map flipped or permanently set it in the underlying data. It your AI/ML methods are using the coordinates, it’s important that the engine receives transformed coordinates.
/W
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/f65e6c03-9b26-4013-9d9c-d862e62d9853n%40googlegroups.com.
Hi Ian,
In that case the MIF transform should work. You will need to use the 4 parameter to move it back in position so if it a 2500m tile then something like
TRANSFORM 0,-1,0,2500
Should flip then move back into position but flipped.
As I said I have not actually tried it but in theory that should work.
However the text will be the difficult one to know if this will work as it is handled in a slightly odd way in MI.
Let us know how it goes!
From: 'Ian Oldfield' via MapInfo-L <mapi...@googlegroups.com>
Sent: 15 January 2021 11:19
To: MapInfo-L <mapi...@googlegroups.com>
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/a44eb7d1-c36b-483f-ace6-6ab706dcb1b8n%40googlegroups.com.