update rendering types xml

This commit is contained in:
Victor Shcherb 2011-06-30 01:26:20 +02:00
parent 53be6865fa
commit 0463dbba34
5 changed files with 25 additions and 25 deletions

View file

@ -30,7 +30,7 @@ public class BinaryInspector {
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
inspector(args); inspector(args);
// test cases show info // test cases show info
inspector(new String[]{"/home/victor/projects/OsmAnd/data/osm-gen/saved/Belarus-oldrt.obf"}); inspector(new String[]{"/home/victor/projects/OsmAnd/data/osm-gen/saved/Belarus-newzooms-new-rt.obf"});
// test case extract parts // test case extract parts
// inspector(new String[]{"-c", "E:\\Information\\OSM maps\\osmand\\Netherlands-addr-trans.map.obf", // inspector(new String[]{"-c", "E:\\Information\\OSM maps\\osmand\\Netherlands-addr-trans.map.obf",

View file

@ -605,7 +605,7 @@ public class IndexCreator {
// creator.deleteOsmDB = true; // creator.deleteOsmDB = true;
// creator.setZoomWaySmothness(2); // creator.setZoomWaySmothness(2);
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/minsk.tmp.odb")); creator.setNodesDBFile(new File("/home/victor/projects/OsmAnd/data/osm-gen/nodes.tmp.odb"));
// creator.generateIndexes(new File("/home/victor/projects/OsmAnd/data/osm-maps/germany_bayern_part.osm"), // creator.generateIndexes(new File("/home/victor/projects/OsmAnd/data/osm-maps/germany_bayern_part.osm"),
creator.generateIndexes(new File("/home/victor/projects/OsmAnd/data/belarus-osm/belarus.osm.pbf"), creator.generateIndexes(new File("/home/victor/projects/OsmAnd/data/belarus-osm/belarus.osm.pbf"),

View file

@ -10,32 +10,32 @@
<!-- 3) In each type only 127 (7 bytes) all different subtypes available --> <!-- 3) In each type only 127 (7 bytes) all different subtypes available -->
<!-- TODO Try to not change id of types and subtypes, some of the constants are hardcoded (for rendering order, rendering). --> <!-- TODO Try to not change id of types and subtypes, some of the constants are hardcoded (for rendering order, rendering). -->
<type name="highway" id="1"> <type name="highway" id="1">
<subtype id="2" polyline="true" tag="highway" value="motorway" minzoom="6" /> <subtype id="2" polyline="true" tag="highway" value="motorway" minzoom="5" />
<subtype id="2" polyline="true" tag="highway" value="motorway_link" minzoom="10" /> <subtype id="2" polyline="true" tag="highway" value="motorway_link" minzoom="10" />
<subtype id="1" polyline="true" tag="highway" value="trunk" minzoom="6" /> <subtype id="1" polyline="true" tag="highway" value="trunk" minzoom="5" />
<subtype id="1" polyline="true" tag="highway" value="trunk_link" minzoom="10" /> <subtype id="1" polyline="true" tag="highway" value="trunk_link" minzoom="10" />
<subtype id="3" polyline="true" tag="highway" value="primary" minzoom="7" /> <subtype id="3" polyline="true" tag="highway" value="primary" minzoom="7" />
<subtype id="3" polyline="true" tag="highway" value="primary_link" minzoom="10" /> <subtype id="3" polyline="true" tag="highway" value="primary_link" minzoom="10" />
<subtype id="4" polyline="true" tag="highway" value="secondary" minzoom="10" /> <subtype id="4" polyline="true" tag="highway" value="secondary" minzoom="9" />
<subtype id="4" polyline="true" tag="highway" value="secondary_link" minzoom="10" /> <subtype id="4" polyline="true" tag="highway" value="secondary_link" minzoom="10" />
<subtype id="5" polyline="true" tag="highway" value="tertiary" minzoom="13" /> <subtype id="5" polyline="true" tag="highway" value="tertiary" minzoom="10" />
<subtype id="6" polygon="true" polyline="true" tag="highway" value="residential" minzoom="14" /> <subtype id="6" polygon="true" polyline="true" tag="highway" value="residential" minzoom="12" />
<subtype id="7" polygon="true" polyline="true" tag="highway" value="service" minzoom="15" /> <subtype id="7" polygon="true" polyline="true" tag="highway" value="service" minzoom="13" />
<subtype id="8" polyline="true" tag="highway" value="unclassified" minzoom="14" /> <subtype id="8" polyline="true" tag="highway" value="unclassified" minzoom="12" />
<subtype id="8" polyline="true" tag="highway" value="road" minzoom="14" /> <subtype id="8" polyline="true" tag="highway" value="road" minzoom="12" />
<subtype id="9" polyline="true" tag="highway" value="track" minzoom="13" /> <subtype id="9" polyline="true" tag="highway" value="track" minzoom="12" />
<subtype id="10" polyline="true" tag="highway" value="path" minzoom="14" /> <subtype id="10" polyline="true" tag="highway" value="path" minzoom="12" />
<subtype id="11" polyline="true" tag="highway" value="living_street" minzoom="15" /> <subtype id="11" polyline="true" tag="highway" value="living_street" minzoom="12" />
<subtype id="16" polygon="true" polyline="true" tag="highway" value="pedestrian" minzoom="15" /> <subtype id="16" polygon="true" polyline="true" tag="highway" value="pedestrian" minzoom="12" />
<subtype id="17" polyline="true" tag="highway" value="cycleway" minzoom="14" /> <subtype id="17" polyline="true" tag="highway" value="cycleway" minzoom="12" />
<subtype id="18" polyline="true" tag="highway" value="byway" minzoom="14" /> <subtype id="18" polyline="true" tag="highway" value="byway" minzoom="12" />
<subtype id="19" polyline="true" tag="highway" value="footway" minzoom="15" /> <subtype id="19" polyline="true" tag="highway" value="footway" minzoom="12" />
<subtype id="20" polyline="true" tag="highway" value="steps" minzoom="15" /> <subtype id="20" polyline="true" tag="highway" value="steps" minzoom="14" />
<subtype id="21" polyline="true" tag="highway" value="bridleway" minzoom="14" /> <subtype id="21" polyline="true" tag="highway" value="bridleway" minzoom="12" />
<subtype id="22" polygon="true" point="true" tag="highway" value="services" minzoom="15" /> <subtype id="22" polygon="true" point="true" tag="highway" value="services" minzoom="12" />
<!-- <subtype id="" polyline="true" tag="highway" value="bus_guideway" minzoom="15" /> --> <!-- <subtype id="" polyline="true" tag="highway" value="bus_guideway" minzoom="15" /> -->
<subtype id="23" polyline="true" point="true" tag="highway" value="ford" minzoom="14" /> <subtype id="23" polyline="true" point="true" tag="highway" value="ford" minzoom="14" />
@ -371,7 +371,7 @@
<subtype id="7" polygon="true" tag="landuse" value="farm" minzoom="12" /> <subtype id="7" polygon="true" tag="landuse" value="farm" minzoom="12" />
<subtype id="7" polygon="true" tag="landuse" value="farmland" minzoom="12" /> <subtype id="7" polygon="true" tag="landuse" value="farmland" minzoom="12" />
<subtype id="9" polygon="true" tag="landuse" value="farmyard" minzoom="12" /> <subtype id="9" polygon="true" tag="landuse" value="farmyard" minzoom="12" />
<subtype id="10" polygon="true" tag="landuse" value="forest" minzoom="10" /> <subtype id="10" polygon="true" tag="landuse" value="forest" minzoom="8" />
<subtype id="11" polygon="true" tag="landuse" value="garages" minzoom="12" /> <subtype id="11" polygon="true" tag="landuse" value="garages" minzoom="12" />
<subtype id="12" polygon="true" tag="landuse" value="grass" minzoom="12" /> <subtype id="12" polygon="true" tag="landuse" value="grass" minzoom="12" />
<subtype id="13" polygon="true" tag="landuse" value="greenfield" minzoom="12" /> <subtype id="13" polygon="true" tag="landuse" value="greenfield" minzoom="12" />

View file

@ -18,8 +18,8 @@ public class OsmAndFormatter {
public static double calculateRoundedDist(double distInMeters, Context ctx) { public static double calculateRoundedDist(double distInMeters, Context ctx) {
OsmandSettings settings = OsmandSettings.getOsmandSettings(ctx); OsmandSettings settings = OsmandSettings.getOsmandSettings(ctx);
MetricsConstants mc = settings.METRIC_SYSTEM.get(); MetricsConstants mc = settings.METRIC_SYSTEM.get();
float mainUnitInMeter = 1; double mainUnitInMeter = 1;
float metersInSecondUnit = METERS_IN_KILOMETER; double metersInSecondUnit = METERS_IN_KILOMETER;
if (mc == MetricsConstants.MILES_AND_FOOTS) { if (mc == MetricsConstants.MILES_AND_FOOTS) {
mainUnitInMeter = FOOTS_IN_ONE_METER; mainUnitInMeter = FOOTS_IN_ONE_METER;
metersInSecondUnit = METERS_IN_ONE_MILE; metersInSecondUnit = METERS_IN_ONE_MILE;
@ -31,7 +31,7 @@ public class OsmAndFormatter {
int generator = 5; int generator = 5;
byte pointer = 0; byte pointer = 0;
float point = mainUnitInMeter; double point = mainUnitInMeter;
while(distInMeters * point > generator){ while(distInMeters * point > generator){
if (pointer++ % 3 == 2) { if (pointer++ % 3 == 2) {
generator = generator * 5 / 2; generator = generator * 5 / 2;

View file

@ -261,7 +261,7 @@ public class MapRenderRepositories {
} }
// search lower level zooms only in basemap for now :) before it was intersection of maps on zooms 5-7 // search lower level zooms only in basemap for now :) before it was intersection of maps on zooms 5-7
boolean basemapSearch = false; boolean basemapSearch = false;
if (zoom < 8) { if (zoom < 7) {
for (String f : files.keySet()) { for (String f : files.keySet()) {
if (f.toLowerCase().contains(BASEMAP_NAME)) { if (f.toLowerCase().contains(BASEMAP_NAME)) {
basemapSearch = true; basemapSearch = true;