coordinate transform utils have misleading mnemonics
See original GitHub issueThe word points is used for very different ways of representing 8 coordinates for 4 corners:
points_from_xywh
: a list of integer coordinatespoints_from_x0y0x1y1
,xywh_from_points
andpolygon_from_points
: a string with space and comma as delimiters
Can we please rename them to be more precise and consistent? I suggest
- points for the string (because it is also the name of PAGE’s
CoordType
attribute), - x0y0x1y0x1y1x0y1 for a list of strings (because it is straightforward and analogous to x0y0x1y1),
- coords or bbox for a list of integers.
Or maybe tltrbrbl instead of x0y0x1y0x1y1x0y1 (but also tlbr instead of x0y0x1y1).
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
D Coordinate Systems (Spatial Reference Systems)
This appendix describes the coordinate system transformation capabilities of Oracle ... (Coordinate systems are sometimes called spatial reference systems.).
Read more >CoordinateTransformations - Intelligent Motion Lab
This chapter discusses how vectors and matrices are used in robotics to represent 2D and 3D positions, directions, rigid body motion, and coordinate...
Read more >Coordinates transformation accuracy - Esri Community
I need coordinates transformation for Point Feature Clases. Situation: I have imported points in local projected coordinate system.
Read more >Coordinate Transformation produces ValueError: Column year ...
Description I get an error when performing a coordinate transformation from ITRS to GCRS. I create an astropy coordinates object ap_coord ...
Read more >Datum Transformation Using the autodt.ini File
When datum transformation is needed to transform coordinates between a specific set of datum values the entries from this file are used to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It will become somewhat better, because all possible conversion options for all the different formats can be seen, and the docstrings are even more precise. But I have not touched the docstrings in
ocrd_utils
yet.We now have the following mnemonics:
polygon
– numeric polygon xy-pair list,bbox
– numeric bbox tuple,x0y0x1y1
– string bbox tuple (this name is not ideal),xywh
– numeric bbox dict,points
– PAGE polygon xy-pair stringRoutines can either convert (without loss of information) or construct (with loss of information or loss of detail).
common.py
has been merged into core, #268 and #254 should fix this.