Skip to content

Conversation

@dl3sdo
Copy link
Member

@dl3sdo dl3sdo commented Jan 14, 2023

The map information tool informs about the number of map objects, templates and undo-/redo-steps.
It informs about the number and names of map parts, symbols, colors, and fonts.
It shows for each color the symbol(s) using the color.
For each symbol in use the tools shows the used color(s) and the number of related objects.

MapInfoExample

@dl3sdo
Copy link
Member Author

dl3sdo commented Jan 18, 2023

Any proposals for additional features?

@lpechacek lpechacek self-requested a review January 18, 2023 10:13
@dl3sdo dl3sdo mentioned this pull request Jan 19, 2023
@dl3sdo dl3sdo marked this pull request as ready for review June 20, 2023 11:48
@dl3sdo dl3sdo mentioned this pull request Jun 27, 2023
@dg0yt
Copy link
Member

dg0yt commented Apr 14, 2024

For consistent naming, this should probably come as class MapInformationDialog, in map_information_dialog files.

@dg0yt dg0yt self-requested a review April 14, 2024 12:58
@dl3sdo dl3sdo marked this pull request as draft April 14, 2024 18:58
@dl3sdo dl3sdo marked this pull request as ready for review April 15, 2024 13:07
@dl3sdo dl3sdo marked this pull request as draft April 17, 2024 12:51
@dl3sdo
Copy link
Member Author

dl3sdo commented Apr 17, 2024

The PR needs to be adapted due to changes in #2158, thus the merge of #2158 shall be done first.

@dl3sdo
Copy link
Member Author

dl3sdo commented Aug 2, 2024

Reminder to me: Add new .cpp file to code-check-wrapper.sh

@dl3sdo dl3sdo force-pushed the mapinfo branch 4 times, most recently from b79daf8 to 60d8eba Compare August 7, 2024 15:08
@dl3sdo
Copy link
Member Author

dl3sdo commented Aug 7, 2024

MapInformationNew
Now with possibility to export the report as text file.

@dl3sdo dl3sdo marked this pull request as ready for review August 8, 2024 16:29
@dl3sdo
Copy link
Member Author

dl3sdo commented Aug 8, 2024

As #2158 is not scheduled for the upcoming release I propose to assess whether this PR could be merged before #2158. An update due to #2158 is straightforward.

@krticka
Copy link
Contributor

krticka commented Oct 4, 2024

Hi, I really appreciate the implementation of Map information tool. I have comments only on the information about the coordinate system, when the info "by EPSG code" is shown. I think this is rather insufficient information and EPSG value + Coordinate system name (zone) should be shown.
image

The map information tool informs about the number of map objects,
templates and undo-/redo-steps.
It informs about the number and names of map parts, symbols, colors,
and fonts.
It shows for each color the symbol(s) using the color.
For each symbol in use the tool shows the used color(s) and the number
of related objects.
The report can be exported as text file.
@dl3sdo
Copy link
Member Author

dl3sdo commented Oct 5, 2024

@krticka: thank you for your feedback. I extended the information about the CRS. However, I don't know how I can easily derive the UTM zone from the EPSG code so I just added the zone or code for UTM, GK and EPSG:
CRSInfo

@krticka
Copy link
Contributor

krticka commented Oct 6, 2024

@dl3sdo Thank you for this improvement. Every zone usually has its own EPSG code, so there is no need to bother with it. Information about coordinate system can be easily extended if the code will be active hyperlink to the web EPSG database, e.g. https://epsg.io/25832

Comment on lines 332 to 336
QTreeWidgetItem* tree_widget_item;
if (tree_depth)
tree_widget_item = new QTreeWidgetItem(tree_item_hierarchy.back());
else
tree_widget_item = new QTreeWidgetItem(map_info_tree);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My style would be
auto* tree_widget_item = new QTreeWidgetItem(tree_depth ? tree_widget_itemtree_item_hierarchy.back() : map_info_tree);

And yes, not everyone likes it. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially the compiler does not like it ;-)
I tried that before but had to learn that the compiler apparently wants to know at compile time which constructor to use.
This variation is accepted:
auto* tree_widget_item = tree_depth ? new QTreeWidgetItem(tree_item_hierarchy.back()) : new QTreeWidgetItem(map_info_tree);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that equivalent:

Suggested change
QTreeWidgetItem* tree_widget_item;
if (tree_depth)
tree_widget_item = new QTreeWidgetItem(tree_item_hierarchy.back());
else
tree_widget_item = new QTreeWidgetItem(map_info_tree);
auto* tree_widget_item = new QTreeWidgetItem (tree_depth ? tree_item_hierarchy.back() : map_info_tree.invisibleRootItem());

@dl3sdo
Copy link
Member Author

dl3sdo commented Nov 7, 2024

I incorporated all review comments, please review.

@dl3sdo
Copy link
Member Author

dl3sdo commented Nov 23, 2024

Mapper uses default type-specific symbols for objects without specific symbols. Commit 0d2cd01 counts and shows the usage of these default symbols below their symbol category:
ShowUndefinedSymbols
Testfile:
undefined_defined_objects.zip

Maybe we should not show the 'Undefined symbols' category if there are no really 'undefined symbols' as the current output is confusing.

dl3sdo and others added 4 commits November 24, 2024 11:42
If a map has a Custom PROJ.4 Crs but no id it will identify
as 'Local' instead.
Change shown Crs to 'Custom PROJ.4' if the state is Geospatial.
@dl3sdo
Copy link
Member Author

dl3sdo commented Nov 26, 2024

The Custom PROJ.4 change was triggered by testing with a map that has this Crs:
<georeferencing scale="10000" auxiliary_scale_factor="1.000271" declination="1.13"><projected_crs><spec language="PROJ.4">PROJCS[&quot;ETRS89 / UTM zone 32N&quot;,GEOGCS[&quot;ETRS89&quot;,DATUM[&quot;European_Terrestrial_Reference_System_1989&quot;,SPHEROID[&quot;GRS 1980&quot;,6378137,298.257222101,AUTHORITY[&quot;EPSG&quot;,&quot;7019&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6258&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;4258&quot;]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridian&quot;,9],PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[&quot;false_easting&quot;,500000],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],AXIS[&quot;Easting&quot;,EAST],AXIS[&quot;Northing&quot;,NORTH],AUTHORITY[&quot;EPSG&quot;,&quot;25832&quot;]]</spec><ref_point x="602627.558" y="5631240.258"/></projected_crs><geographic_crs id="Geographic coordinates"><spec language="PROJ.4">+proj=latlong +datum=WGS84</spec><ref_point_deg lat="50.82377724" lon="10.45708359"/></geographic_crs></georeferencing>

@dl3sdo
Copy link
Member Author

dl3sdo commented Nov 26, 2024

I successfully reviewed the code and tested the Windows build as well as my development version with various maps.
Right now there are no further changes planned by me and I consider this PR mature enough to be merged.

@dg0yt
Copy link
Member

dg0yt commented Nov 27, 2024

Okay, I will "squash and merge" this tonight.

@dg0yt dg0yt merged commit d0a088f into OpenOrienteering:master Nov 28, 2024
12 checks passed
dl3sdo added a commit to dl3sdo/mapper that referenced this pull request Nov 28, 2024
Use function Symbol::getNumberAndPlainTextName() which was introduced
by OpenOrienteeringGH-2125 instead of concatenating symbol number and symbol name.
@dl3sdo dl3sdo deleted the mapinfo branch November 28, 2024 20:33
@dl3sdo dl3sdo added this to the v0.9.6 milestone Nov 28, 2024
dg0yt pushed a commit that referenced this pull request Dec 1, 2024
Use function Symbol::getNumberAndPlainTextName() which was introduced
by GH-2125 instead of concatenating symbol number and symbol name.
dg0yt added a commit to dg0yt/mapper that referenced this pull request Jun 9, 2025
dg0yt added a commit that referenced this pull request Jun 9, 2025
lpechacek pushed a commit to lpechacek/mapper that referenced this pull request Oct 15, 2025
lpechacek pushed a commit to lpechacek/mapper that referenced this pull request Oct 15, 2025
Use function Symbol::getNumberAndPlainTextName() which was introduced
by OpenOrienteeringGH-2125 instead of concatenating symbol number and symbol name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants