Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Rendering Problems, background color, missing names. #1234

Open
Davem734 opened this issue May 9, 2023 · 6 comments
Open

Map Rendering Problems, background color, missing names. #1234

Davem734 opened this issue May 9, 2023 · 6 comments

Comments

@Davem734
Copy link

Davem734 commented May 9, 2023

Navit 0.5.6 (on Ubuntu 22.04)
Having problems getting the map to render properly.
See attached screenshot.

  • Portions of the map show a blue background when the color in the .xml file is set to "#ffefb7" (Pale yellow).
    <layout xmlns:xi="http://www.w3.org/2001/XInclude" name="Car" nightlayout="Car-dark" color="#ffefb7" icon_w="22" icon_h="22" underground_alpha="0x77" font="Liberation Sans">
    The map file came from:
    http://download.geofabrik.de/north-america-latest.osm.bz2
    I am not sure how to tell if this is a problem with Navit rendering or a problem with the map file itself.

  • Road names/numbers are missing. They seem to show up randomly as you zoom in.
    But not in any order that I find useful for trip planning or navigation.

  • City names are either missing or overlapping.

Is the map rendering unique to Navit or is Navit using a map rendering library from someplace else?

Is there a way to change the priority of how labels are displayed on the map at each zoom level or is this hard coded?

Navit_Screenshot_2023-05-08

@Davem734
Copy link
Author

There is a problem with rendering land as the color of water. There is also a problem with it rendering water as the color of land. And the problem seems to vary depending at what zoom level I am selecting to render the map.
See attached screenshots.
Navit_2023-05-10 09-15-06
Navit_2023-05-10 09-26-00
Navit_2023-05-10 09-37-08

@edd-cgfan
Copy link

Hi @Davem734,

please have look at the lines of explanation here:
#949

@metastrolch explains how to get the OSM-ID of the wrong edition of a polygon "poly_water_tiled".
On Openstreetmap.org you can find this wrong item and change it. Or you could asked someone to do it.
So did I a few times and the later created maps were okay then.

If it still is there:
In my navit.xml I have an entry for the layers:
<layer name="polywatertiled"> <itemgra item_types="poly_water_tiled"> <polygon color="#82c8ea"/> </itemgra> </layer>
Under "polygons" in navit.xml the itemgra for "poly_water_tiled" is out-commented:
<!-- <itemgra item_types="poly_water_tiled"> <polygon color="#82c8ea"/> </itemgra> -->
So you can enable/disable it in the layers menu.

Regards,
cgfan

@Davem734
Copy link
Author

I did not have much luck finding the broken items in my map data (from http://download.geofabrik.de/north-america-latest.osm.bz2).
The downloaded map file was 20+ Gb and is pretty hard to do anything with.
I am not sure what tools I should be using to work with this file.

But this looks like a bug in something to me. Maybe maptool?
Should maptool ignore/remove a waterpolygon that is broken/open/incomplete?
Maybe Navit should not render a waterpolygon that is broken/open/incomplete?
Maybe, by the time the map gets converted to the navit .bin format, there is no way to tell that a waterpolygon is broken?

I am new here so I dont know the data flow very well but it seems, given the number of errors in the map data, that Navit needs to be better at ignoring broken elements, especially when they span large areas of the map.

I would like to submit this as a bug report but I am not sure that I have enough here to narrow it down to what needs to be fixed...

@edd-cgfan
Copy link

Hi @Davem734

Maybe Navit should not render a waterpolygon that is broken/open/incomplete?

You can Navit let do this like I told in my last post with not showing the layer "polywatertiled" (please see the lines in my last post an integrate them into your navit.xml):
Then use the menu and go to the settings of the layers and switch it on or off.
It looks like this if the layer "polywatertiled" is switched on:
Navit-map-view-poly_water_tiled-on

If it is switched off then you will have this map view:
Navit-map-view-poly_water_tiled-off

The setting of the layer is stored in my setups, so one doesn't have to set it again the next time Navit is running.
(For testing purposes I have Navit running on Windows 10. You see those images here. The main use is on my Galaxy S8 with Android 9 at the moment.)

In order to get the broken item I use this approach:
Click the map somewhere where the blue area is:
Navit-blue-map

In the main menu click "Map Point" und you'll get a view similar like this:
MapPiont

Then click "poly_water_tiled poly_water_tiled":
poly_water_tiled

Here click on "Attributes" and you'll see the OSM way ID:
Attributes

Use this with OSM in this way:
http://www.openstreetmap.org/?way=128414645
or
http://www.openstreetmap.org/browse/way/128414645

My guess of the error here is that the island in a lake is edited with "natural=coastline" and that is wrong: It should be "natural=water".
More can be found here:
https://wiki.openstreetmap.org/wiki/Tag:natural%3Dcoastline

I don't want to correct this in OSM because I'm not an OSM expert and maybe it should one do with more local knowledge.
However, you could use the feature "Report an error" on the right of the OSM page and maybe someone with more knowledge can correct this:
OSM-Report-error_

Hope, this helps a little.

Regards,
cgfan

PS.: You can find nightly updated maps in Navit's bin format here:
https://github.com/navit-gps/gh-actions-mapserver/releases

In order to have more than one map activated in Navit I have this entry in my navit.xml:
<mapset enabled="yes">
<maps type="binfile" enabled="yes" active="yes" data="/your-path-to-maps/*.bin"/>
</mapset>

@RupestreC
Copy link

Davem734 também perguntou :

" Existe uma maneira de alterar a prioridade de como os rótulos são exibidos no mapa em cada nível de zoom ou isso é codificado? "

Eu pergunto se existe resposta para a pergunta? Obrigado

@edd-cgfan
Copy link

Hi all,

Davem734 também perguntou :

" Existe uma maneira de alterar a prioridade de como os rótulos são exibidos no mapa em cada nível de zoom ou isso é codificado? "

Eu pergunto se existe resposta para a pergunta? Obrigado

If I understand it correctly, here is an example how I managed it in my navit.xml:
I have a layer for "Fuel symbols": Icons and labels get their size for the zoom levels:
Please see below, "order" is the zoom level. "text_size" determines the size of the labels.
The labels are only visible from zoom level 16 on. 18 is the highest zoom level.
This is for a display with 1440 x 2960 pixels. You may have to adjust the icon size and text size.

	<layer name="FuelSymbols">
		<itemgra item_types="poi_fuel" order="8-14">
			<icon src="fuel_48_48.png"/>
		</itemgra>
		<itemgra item_types="poi_fuel" order="15">
			<icon src="fuel_64_64.png"/>
		</itemgra>
		<itemgra item_types="poi_fuel" order="16">
			<icon src="fuel_96_96.png"/>
		</itemgra>
		<itemgra item_types="poi_fuel" order="17-">
			<icon src="fuel_128_128.png"/>
		</itemgra>

		<itemgra item_types="poi_car_wash" order="13">
			<icon src="car_dealer_32_32.png"/>
		</itemgra>
		<itemgra item_types="poi_car_wash" order="14">
			<icon src="car_dealer_48_48.png"/>
		</itemgra>
		<itemgra item_types="poi_car_wash" order="15">
			<icon src="car_dealer_64_64.png"/>
		</itemgra>
		<itemgra item_types="poi_car_wash" order="16">
			<icon src="car_dealer_96_96.png"/>
		</itemgra>
		<itemgra item_types="poi_car_wash" order="17-">
			<icon src="car_dealer_128_128.png"/>
		</itemgra>

		<!-- Labels -->
		<itemgra item_types="poi_fuel,poi_car_wash" order="16">
			<circle color="#7f007f" radius="0" width="0" text_size="30"></circle>
		</itemgra>
		<itemgra item_types="poi_fuel,poi_car_wash" order="17">
			<circle color="#7f007f" radius="0" width="0" text_size="37"></circle>
		</itemgra>
		<itemgra item_types="poi_fuel,poi_car_wash" order="18">
			<circle color="#7f007f" radius="0" width="0" text_size="44"></circle>
		</itemgra>
	</layer>

In the same way it is done in the layer for the streets: Here is a cut from my "streets"-layer:

<!-- ... -->
<itemgra item_types="highway_city,highway_land,street_4_city,street_4_land,street_n_lanes" order="13">
	<text text_size="28"/>
</itemgra>
<itemgra item_types="highway_city,highway_land,street_4_city,street_4_land,street_n_lanes" order="14">
	<text text_size="30"/>
</itemgra>
<itemgra item_types="highway_city,highway_land,street_4_city,street_4_land,street_n_lanes" order="15-16">
	<text text_size="34"/>
</itemgra>
<itemgra item_types="highway_city,highway_land,street_4_city,street_4_land,street_n_lanes" order="17-">
	<text text_size="40"/>
</itemgra>
<itemgra item_types="street_2_city,street_2_land,street_3_city,street_3_land,ramp" order="14-16">
	<text text_size="34"/>
</itemgra>
<itemgra item_types="street_2_city,street_2_land,street_3_city,street_3_land,ramp" order="17-">
	<text text_size="40"/>
</itemgra>
<itemgra item_types="street_nopass,street_0,street_1_city,street_1_land,street_pedestrian,living_street" order="14-16">
	<text text_size="34"/>
</itemgra>
<itemgra item_types="rail_narrow_gauge,street_nopass,street_0,street_1_city,street_1_land,street_pedestrian,living_street" order="17-">
	<text text_size="40"/>
</itemgra>
<!-- ... -->

Hope all of the code is visible...

Regards,
cgfan

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

No branches or pull requests

3 participants