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

Download zone size too big? #1357

Closed
JulienPalard opened this issue Mar 24, 2019 · 20 comments
Closed

Download zone size too big? #1357

JulienPalard opened this issue Mar 24, 2019 · 20 comments

Comments

@JulienPalard
Copy link

This is related to: #1232

I'm near Paris, France, with tons of quests. Around my house I've done everything the apps showed me. But there's still A LOT to do in this zone, the app just don't show them to me.

Instead the app shows me quests from the next city, where I never go.

I bet this is because my city and the other city are in the same "quests download zone" and I'm hitting the 2000 limit from 51f9c35. Simple fix would be to move my ass to the other city, fix a lot of thing there, and come back home to enjoy new tasks, I know, but I won't do it þ

How to Reproduce
Complete a small region in a quest-dense region, see there's still a lot of work to do (house numbers, foors, ...) that do not show up in the map.

Versions affected
StreetComplete 10.2, Android 8.1.0.

@matkoniecz
Copy link
Member

Can you share approximate location of where it happens to test what goes wrong?

I suspect that something else may be going on, download zones are not so big.

@JulienPalard
Copy link
Author

I live near 48.9146531,2.1811596,20.75z, rue de la remise, 78420 Carrières-sur-Seine.

I compiled myself a version with a limit of 4k instead of 2k, and some new quests are poping, if this information can help.

@westnordost
Copy link
Member

You are well informed, thank you! The limit will be the reason why certain quests may not pop up in your area any more. I am also not sure what to change here. If I set the limit higher, it will lead to performance problems.
Note that this limit is per quest and per overpass-query bounding box. If you download at slightly different locations, it will be a different bbox and thus it will download another 2000 quests.

Currently, the constants are like this:

	public final static double
		MAX_DOWNLOADABLE_AREA_IN_SQKM = 50,
		MIN_DOWNLOADABLE_AREA_IN_SQKM = 4;

	public final static double MIN_DOWNLOADABLE_RADIUS_IN_METERS = 1000;

Btw, looking at your area, is it normal to have all those housenumbers not on the houses (or the entrances of the houses) but free-floating next to the street? You sure shouldn't do any housenumber quests in StreetComplete in areas like this.

@JulienPalard
Copy link
Author

If I get your explanation and the constants right, the app should start by downloading 2000 quests in a 4km², and already at this point I'm hitting the 2000 limit? It may be right, 4km² looks big here and already points to place I'll never go (a bit more than 1h walking).

I think it would help me if the app started downloading at 1km² instead of 4km², I'll get things to do near me instead of far, and when I walk 1km I can still re-download.

What would it break?

(Thanks for noticing free-floating numbers, I'll fix them, at first by making them touch the polygon, as it's easy)

@westnordost
Copy link
Member

westnordost commented Mar 24, 2019

4km² is only the minimum area to download. It works like this: When the app automatically decides to download quests, it creates a bounding box out of a radius around your current position. If you are in a WiFi, the radius is 2400m, if you are on a mobile connection, the radius is 800m. Then, additionally, that bbox is enlarged to fit into a spatial raster of zoom 14. In other words, bboxes actually downloaded are one or several map tiles of zoom level 14. This is because the app memorizes which tiles for one quest type have been downloaded already, so it does not download the same tiles over and over again.

Edit: And for the manual download, the constants I pasted above are used to ensure a minimum bbox size, the zoom-14 raster is also applied there.

@westnordost
Copy link
Member

Since you compiled the app yourself, you may want to look into WifiAutoDownloadStrategy and MobileDataAutoDownloadStrategy and change those values there if you have Auto-Sync on. You could play around with those values and see what would be a good fit. Since the values in there currently stem rather from theoretical considerations, it would be good anyway to update them to something that comes from actually testing it out.

@JulienPalard
Copy link
Author

I'm trying with lower values:

-               MAX_DOWNLOADABLE_AREA_IN_SQKM = 50,
-               MIN_DOWNLOADABLE_AREA_IN_SQKM = 4;
+               MAX_DOWNLOADABLE_AREA_IN_SQKM = 10,
+               MIN_DOWNLOADABLE_AREA_IN_SQKM = 1;

100 meter in mobile instead of 800, 1000 meter using Wi-Fi instead of 2400. I reset my DEFAULT_MAX_QUESTS to 2000 for fair comparison.

Those values make sense for me typically while working in Paris I don't want to download 800 meters around me, in 100 meters there's already thouthands of quests.

I'll try during the following weeks with those values and hopefully tell you back.

Instead of playing with constants which will probably never fit everyone, why not a "download for larger radius until enough quests found" approach? In my case it would stop soon (maybe at the first try), and in the case of someone in a less dense area it would still find remote quests after a few tries enlarging the search radius, showing them where to head.

@westnordost
Copy link
Member

download for larger radius until enough quests found

"download for larger radius until enough quests for each quest type found" or generally, for all quests?

@JulienPalard
Copy link
Author

This, for the moment, I don't know :)

@westnordost
Copy link
Member

westnordost commented Mar 24, 2019

Cause for the second case (generally, all quests), this is already done. The quest auto syncer only stops downloading more and more quest types until in a certain area around you, there are "enough" quests.

@test2a
Copy link

test2a commented Mar 25, 2019

Just chiming in, dont know where to ask but how do you refresh the map data on the app? There are street and building improvements on osm but steeetcomplete seems to be showing only cached data.
There is one option to limit cache size but I dont see option to refresh the map.

@HolgerJeromin
Copy link
Contributor

@test2a

how do you refresh the map data on the app

This is covered by #1011

@JulienPalard
Copy link
Author

@test2a please discuss each subject in related issue if exists or create a new one, to keep issues readable. (thanks @HolgerJeromin for answering).

@JulienPalard JulienPalard reopened this Mar 25, 2019
@westnordost westnordost added the feedback required more info is needed, issue will be likely closed if it is not provided label Apr 14, 2019
@westnordost
Copy link
Member

@JulienPalard Did you reach any outcome?

@JulienPalard
Copy link
Author

I think my current setup is:

               MAX_DOWNLOADABLE_AREA_IN_SQKM = 10,
               MIN_DOWNLOADABLE_AREA_IN_SQKM = 1;
               DEFAULT_MAX_QUESTS = 4000;

and it works well for me, in my specific area. I spend the last three weeks not being able to test it so I don't have more feedback.

Why not allowing to configure downloadable area and max quests in settings?

Maybe allow for DEFAULT_MAX_QUESTS = "1000, 2000, 4000, 8000" defaulting to 2000.

And for downloadable area maybe allow 10, 50, 100? So anyone can find a settings that fit their specific area needs?

@westnordost
Copy link
Member

westnordost commented May 12, 2019 via email

@JulienPalard
Copy link
Author

To be exhaustive:

diff --git a/app/src/main/java/de/westnordost/streetcomplete/ApplicationConstants.java b/app/src/main/java/de/westnordost/streetcomplete/ApplicationConstants.java
index 4c337c65..ab497175 100644
--- a/app/src/main/java/de/westnordost/streetcomplete/ApplicationConstants.java
+++ b/app/src/main/java/de/westnordost/streetcomplete/ApplicationConstants.java
@@ -15,8 +15,8 @@ public class ApplicationConstants
        public final static Date DATE_OF_BIRTH = new GregorianCalendar(2017,Calendar.FEBRUARY,20).getTime();
 
        public final static double
-               MAX_DOWNLOADABLE_AREA_IN_SQKM = 50,
-               MIN_DOWNLOADABLE_AREA_IN_SQKM = 4;
+               MAX_DOWNLOADABLE_AREA_IN_SQKM = 10,
+               MIN_DOWNLOADABLE_AREA_IN_SQKM = 1;
 
        public final static double MIN_DOWNLOADABLE_RADIUS_IN_METERS = 1000;
 
diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.java b/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.java
index f7761b92..71529db6 100644
--- a/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.java
+++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.java
@@ -35,6 +35,6 @@ public class MobileDataAutoDownloadStrategy extends AActiveRadiusStrategy
 
        @Override protected int getDownloadRadius()
        {
-               return 800;
+               return 100;
        }
 }
diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.java b/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.java
index cac1b9f2..3e4942f1 100644
--- a/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.java
+++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.java
@@ -44,6 +44,6 @@ public class WifiAutoDownloadStrategy extends AActiveRadiusStrategy
 
        @Override protected int getDownloadRadius()
        {
-               return 2400;
+               return 1000;
        }
 }
diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/tql/OverpassQLUtil.java b/app/src/main/java/de/westnordost/streetcomplete/data/osm/tql/OverpassQLUtil.java
index 0d32f961..ddfe20c9 100644
--- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/tql/OverpassQLUtil.java
+++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/tql/OverpassQLUtil.java
@@ -7,7 +7,7 @@ import de.westnordost.osmapi.map.data.BoundingBox;
 
 public class OverpassQLUtil
 {
-       public static final int DEFAULT_MAX_QUESTS = 2000;
+       public static final int DEFAULT_MAX_QUESTS = 4000;
 
        public static String getGlobalOverpassBBox(BoundingBox bbox)
        {

@westnordost
Copy link
Member

Oh, I missed your reply. Sorry for not reacting

@westnordost
Copy link
Member

I now changed it, though a bit more conservative than you changed it for yourself.

@westnordost westnordost removed the feedback required more info is needed, issue will be likely closed if it is not provided label May 23, 2019
@JulienPalard
Copy link
Author

JulienPalard commented May 26, 2019

@westnordost you're still replying faster than me in average ;) Thanks!

Don't hesitate to poke me when you push a new release, I'll use it.

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

5 participants