Re: [Libosmscout-development] Compiling libosmscout for iOS giving error
Library for OpenStreetMap offline rendering and routing
Status: Beta
Brought to you by:
tteuling
|
From: Nicholas H. <ni...@ze...> - 2016-07-19 18:54:36
|
This does sort of help. But how would I just eliminate things like routing data? And would this make things faster? Nicholas Hubbard Owner Zed Said Studio LLC www.zedsaid.com ni...@ze... > On Jul 19, 2016, at 11:46 AM, Tim Teulings <ti...@fr...> wrote: > > Hello Nicholas, > >>> * The rendering can be optimized by optimizing the the style sheet. >> >> How? > > Rendering gets slower the primitives you draw. Every way is at lets a line, an area is a fill and (optionally) a border. Labels (text) or complex constructs. The trick is to just draw what the user actually "sees". Thing of you MP3 was done. IMHO currently we render more than the user actually "sees". > > Practically you take a look at what types are rendered at the given zoom level and how many drawing primitives this will result. Than you have to look, if this information at this zoom level is really important. If you start rendering type only at a higher zoom level. > > Example: > Currently some "special" buildings are rendered earlier than the rest: > > MAG specialBuildingMag = close; > > > // Buildings > [MAG @specialBuildingMag-] { > [TYPE christian_church_building] AREA { color: @churchBuildingColor; borderColor: @churchBuildingBorderColor; borderWidth: 0.1mm;} > [TYPE amenity_hospital_building] AREA { color: @hospitalBuildingColor; borderColor: @hospitalBuildingBorderColor; borderWidth: 0.1mm; } > [TYPE railway_station] AREA { color: @railwayStationColor; } > [TYPE leisure_stadium] AREA { color: #33cb98; } > } > > with (Magnification.h) > > magWorld = 1, // 0 > magContinent = 16, // 4 > magState = 32, // 5 > magStateOver = 64, // 6 > magCounty = 128, // 7 > magRegion = 256, // 8 > magProximity = 512, // 9 > magCityOver = 1024, // 10 > magCity = 2*1024, // 11 > magSuburb = 2*2*1024, // 12 > magDetail = 2*2*2*1024, // 13 > magClose = 2*2*2*2*1024, // 14 > magCloser = 2*2*2*2*2*1024, // 15 > magVeryClose = 2*2*2*2*2*2*1024, // 16 > magBlock = 2*2*2*2*2*2*2*2*1024, // 18 > magStreet = 2*2*2*2*2*2*2*2*2*1024, // 19 > magHouse = 2*2*2*2*2*2*2*2*2*2*1024 // 20 > > If you want to render them later, you either just change > > MAG specialBuildingMag = veryClose; > > or > > > // Buildings > [MAG veryClose-] { > > or > > // Buildings > [MAG 16-] { > > > > If you set (OSMScout2 ... DBThread.cpp) > > drawParameter.SetDebugData(true); > > you get some debug information that should help you: > > Draw: [51.50943 N 7.45685 E - 51.53793 N 7.48433 E] 16384x/14 480x800 143.90712 DPI > Type|NodeCount|WayCount|AreaCount|Nodes|Labels|Icons > highway_residential 1014 0 1009 5 7749 0 0 > railway_rail 655 0 655 0 6112 0 0 > highway_secondary 365 0 365 0 3947 365 0 > railway_disused 340 0 340 0 2911 0 0 > highway_unclassified 221 0 221 0 1922 0 0 > highway_tertiary 217 0 217 0 2937 0 0 > leisure_garden 155 0 0 155 2141 0 0 > highway_primary 154 0 154 0 1822 308 0 > highway_trunk_link 139 0 139 0 1330 139 0 > railway_tram 129 0 129 0 1253 0 0 > landuse_grass 119 0 0 119 1179 0 0 > railway_subway 115 0 115 0 1477 0 0 > natural_scrub 107 0 0 107 1560 0 0 > highway_motorway_trunk 97 0 97 0 655 0 0 > leisure_playground 84 0 0 84 754 0 0 > highway_motorway_link 65 0 65 0 615 65 0 > leisure_common 56 0 0 56 617 1 0 > landuse_village_green 55 0 0 55 530 0 0 > highway_motorway 52 0 52 0 495 104 0 > waterway_stream 46 0 46 0 629 0 0 > railway_light_rail 44 0 44 0 526 0 0 > leisure_park 44 0 0 44 1312 0 0 > landuse_residential 42 0 0 42 2898 4 0 > leisure_pitch 42 0 0 42 238 0 0 > highway_trunk 39 0 39 0 300 78 0 > wood 27 0 0 27 1650 3 0 > landuse_allotments 25 0 0 25 491 0 0 > landuse_railway 24 0 0 24 996 0 0 > place_suburb 24 24 0 0 24 24 0 > waterway_drain 22 0 22 0 139 0 0 > place_town 22 22 0 0 22 0 0 > christian_church_building 21 0 0 21 834 0 0 > highway_secondary_link 20 0 20 0 126 20 0 > landuse_meadow 19 0 0 19 323 0 0 > railway_station 17 17 0 0 17 17 17 > natural_water 17 0 0 17 708 0 0 > landuse_commercial 16 0 0 16 311 0 0 > highway_primary_link 14 0 14 0 80 14 0 > landuse_industrial 14 0 0 14 522 0 0 > waterway_canal 13 0 13 0 130 0 0 > amenity_school 12 0 0 12 244 0 0 > highway_tertiary_link 11 0 11 0 59 0 0 > highway_motorway_junction 11 11 0 0 11 11 0 > landuse_brownfield 11 0 0 11 159 0 0 > highway_road 10 0 10 0 54 0 0 > highway_services 9 9 0 0 9 9 0 > waterway_riverbank 7 0 0 7 12676 0 0 > waterway_river 5 0 5 0 277 0 0 > landuse_cemetery 5 0 0 5 179 1 0 > leisure_nature_reserve 5 0 0 5 4299 1 0 > amenity_hospital_building 5 0 0 5 84 0 0 > waterway_dock 4 0 0 4 128 0 0 > highway_construction 3 0 3 0 8 3 0 > landuse_greenfield 3 0 0 3 100 0 0 > landuse_retail 3 0 0 3 65 1 0 > landuse_basin 2 0 0 2 8 0 0 > landuse_farm 2 0 0 2 45 0 0 > landuse_recreation_ground 2 0 0 2 22 0 0 > natural_peak 2 2 0 0 2 4 2 > amenity_hospital 2 0 0 2 59 0 0 > aeroway_helipad 1 0 0 1 4 0 0 > landuse_farmland 1 0 0 1 190 1 0 > natural_grassland 1 0 0 1 9 0 0 > amenity_recycling 1 0 0 1 8 0 0 > tourism_artwork 1 0 0 1 4 0 0 > power_generator 1 0 0 1 5 0 0 > place_islet 1 1 0 0 1 1 0 > elevation_contour_major 0 0 0 0 0 0 0 > elevation_contour_medium 0 0 0 0 0 0 0 > _route 0 0 0 0 0 0 0 > _tile_land 0 0 0 0 0 0 0 > _tile_sea 0 0 0 0 0 0 0 > _tile_coast 0 0 0 0 0 0 0 > _tile_unknown 0 0 0 0 0 0 0 > elevation_contour_minor 0 0 0 0 0 0 0 > highway_motorway_primary 0 0 0 0 0 0 0 > route_ferry 0 0 0 0 0 0 0 > aeroway_aerodrome 0 0 0 0 0 0 0 > aeroway_terminal 0 0 0 0 0 0 0 > aeroway_runway 0 0 0 0 0 0 0 > aeroway_taxiway 0 0 0 0 0 0 0 > aeroway_apron 0 0 0 0 0 0 0 > landuse_construction 0 0 0 0 0 0 0 > landuse_farmyard 0 0 0 0 0 0 0 > natural_wetland_marsh 0 0 0 0 0 0 0 > landuse_landfill 0 0 0 0 0 0 0 > landuse_military 0 0 0 0 0 0 0 > landuse_orchard 0 0 0 0 0 0 0 > landuse_quarry 0 0 0 0 0 0 0 > landuse_reservoir 0 0 0 0 0 0 0 > landuse_vineyard 0 0 0 0 0 0 0 > natural_beach 0 0 0 0 0 0 0 > natural_fell 0 0 0 0 0 0 0 > natural_glacier 0 0 0 0 0 0 0 > natural_heath 0 0 0 0 0 0 0 > natural_land 0 0 0 0 0 0 0 > tourism_hostel 0 0 0 0 0 0 0 > natural_wetland_tidalflat 0 0 0 0 0 0 0 > natural_wetland 0 0 0 0 0 0 0 > man_made_pier 0 0 0 0 0 0 0 > leisure_sports_centre 0 0 0 0 0 0 0 > leisure_stadium 0 0 0 0 0 0 0 > leisure_track 0 0 0 0 0 0 0 > leisure_golf_course 0 0 0 0 0 0 0 > leisure_water_park 0 0 0 0 0 0 0 > military_danger_area 0 0 0 0 0 0 0 > military_range 0 0 0 0 0 0 0 > military_naval_base 0 0 0 0 0 0 0 > leisure_marina 0 0 0 0 0 0 0 > leisure_fishing 0 0 0 0 0 0 0 > leisure_ice_rink 0 0 0 0 0 0 0 > amenity_atm 0 0 0 0 0 0 0 > amenity_bank 0 0 0 0 0 0 0 > amenity_cafe 0 0 0 0 0 0 0 > amenity_fast_food 0 0 0 0 0 0 0 > amenity_fuel 0 0 0 0 0 0 0 > amenity_grave_yard 0 0 0 0 0 0 0 > amenity_kindergarten 0 0 0 0 0 0 0 > amenity_post_office 0 0 0 0 0 0 0 > amenity_restaurant 0 0 0 0 0 0 0 > amenity_taxi 0 0 0 0 0 0 0 > amenity 0 0 0 0 0 0 0 > tourism_attraction 0 0 0 0 0 0 0 > tourism_camp_site 0 0 0 0 0 0 0 > tourism_caravan_site 0 0 0 0 0 0 0 > tourism_picnic_site 0 0 0 0 0 0 0 > tourism_theme_park 0 0 0 0 0 0 0 > tourism_zoo 0 0 0 0 0 0 0 > tourism_alpine_hut 0 0 0 0 0 0 0 > tourism_chalet 0 0 0 0 0 0 0 > tourism_guest_house 0 0 0 0 0 0 0 > tourism_hotel 0 0 0 0 0 0 0 > tourism_information 0 0 0 0 0 0 0 > tourism_motel 0 0 0 0 0 0 0 > tourism_museum 0 0 0 0 0 0 0 > historic_castle 0 0 0 0 0 0 0 > historic_monument 0 0 0 0 0 0 0 > historic_memorial 0 0 0 0 0 0 0 > historic_ruins 0 0 0 0 0 0 0 > historic_archaeological_site 0 0 0 0 0 0 0 > historic_battlefield 0 0 0 0 0 0 0 > historic_wreck 0 0 0 0 0 0 0 > military_airfield 0 0 0 0 0 0 0 > place_village 0 0 0 0 0 0 0 > place_hamlet 0 0 0 0 0 0 0 > place_locality 0 0 0 0 0 0 0 > place_island 0 0 0 0 0 0 0 > Paths: 3785/708/708/155 (pcs) 0.005/0.022/0.017 (sec) > Areas: 941/157/314 (pcs) 0.007/0.003/0.000 (sec) > Nodes: 86+0/86 (pcs) 0.000/0.000 (sec) > Labels: 9/1/10 (pcs) 0.004 (sec) > > > You see, highway_residential occurs often and the way consists of many nodes. Though leisure_nature_reserve has only 5 objects by nearly half of the nodes of the residential ways. So it *might* be over proportional expensive. > > Perhaps we should stop rendering it a higher zoom levels? For the objects that are not rendered on this zoom level but a listed above: The style sheet want to render it, but there is just no data. Nevertheless, we still try to load data (however the index should be very fast in detecting this). > > Does this help you? > -- > Gruß... > Tim > |