John LaRocque activity https://gitlab.com/jwlarocque 2022-04-16T20:56:47Z tag:gitlab.com,2022-04-16:1835125823 John LaRocque opened merge request !40: Add Map Delete Button to Resume Page at Linus / earthwalker 2022-04-16T20:56:47Z jwlarocque John LaRocque

Also, add JSON import/export buttons on the createmap page. There are still quite a lot of TODOs I added and haven't done yet, but the delete functionality and changes to createmap should be fully operational. Please let me know how this looks so far.

This branch is not compatible with existing badgerdb's - it creates indexes for stored objects and relies on them for deletion (and for showing all maps on the resume page). Existing games might sort of work but the /maps/all endpoint won't know about them. Might be good to add some kind of versioning and version check (maybe even a migration script) but I'm lazy.

Resolves #65

tag:gitlab.com,2022-04-16:1835121103 John LaRocque pushed to project branch features/map-editing at Linus / earthwalker 2022-04-16T20:41:33Z jwlarocque John LaRocque

John LaRocque (eafc30cd) at 16 Apr 20:41

Show Map delete button if remote deletion enabled

tag:gitlab.com,2022-04-16:1835101850 John LaRocque pushed to project branch features/map-editing at Linus / earthwalker 2022-04-16T19:42:24Z jwlarocque John LaRocque

John LaRocque (6fc3ded7) at 16 Apr 19:42

Update package, package-lock.json

tag:gitlab.com,2022-04-16:1835098474 John LaRocque pushed to project branch features/map-editing at Linus / earthwalker 2022-04-16T19:31:20Z jwlarocque John LaRocque

John LaRocque (0092f01f) at 16 Apr 19:31

Hide map delete button unless hostname is local

tag:gitlab.com,2022-04-16:1835090993 John LaRocque pushed to project branch features/map-editing at Linus / earthwalker 2022-04-16T19:08:39Z jwlarocque John LaRocque

John LaRocque (55f49f76) at 16 Apr 19:08

Restrict map deletion to local clients, optionally

... and 1 more commit

tag:gitlab.com,2022-04-16:1834742148 John LaRocque commented on issue #65 at Linus / earthwalker 2022-04-16T04:05:12Z jwlarocque John LaRocque

I'm working on Map deletion on features/map-editing if you want to test it out. WARNING: not compatible with existing databases, so you should put it in a separate directory (or delete your badgerdb folder if you're okay with losing your Maps etc.)

Also includes a way to import Maps from JSON (so you can share them between servers) and the next step will be to add a way to copy and "edit" an existing Map. I'm not planning on adding direct editing of existing Maps because I'm not sure how to handle in-progress Challenges/Games if their underlying Map gets edited. Open to discussion on that though.

tag:gitlab.com,2022-04-15:1833314611 John LaRocque pushed to project branch features/map-editing at Linus / earthwalker 2022-04-15T00:04:59Z jwlarocque John LaRocque

John LaRocque (0cd01ea3) at 15 Apr 00:04

Implement map deletion on backend

tag:gitlab.com,2022-04-11:1823951090 John LaRocque pushed new project branch features/map-editing at Linus / earthwalker 2022-04-11T03:48:52Z jwlarocque John LaRocque

John LaRocque (5d97b034) at 11 Apr 03:48

Separate BadgerDB index thingy

... and 2 more commits

tag:gitlab.com,2022-01-02:1644539879 John LaRocque pushed to project branch features/fast-loc-service at Linus / earthwalker 2022-01-02T23:53:50Z jwlarocque John LaRocque

John LaRocque (3a9dd729) at 02 Jan 23:53

Benchmark RandPointsInMap, move some files around

tag:gitlab.com,2021-12-28:1640001746 John LaRocque pushed new project branch features/fast-loc-service at Linus / earthwalker 2021-12-28T19:29:01Z jwlarocque John LaRocque

John LaRocque (3a36beb8) at 28 Dec 19:29

Add generation of random points in geojson poly

tag:gitlab.com,2021-01-29:1091524357 John LaRocque pushed to project branch fixes/popdensity at Linus / earthwalker 2021-01-29T21:41:22Z jwlarocque John LaRocque

John LaRocque (7937a15e) at 29 Jan 21:41

Improve constrainedLatLng performance

tag:gitlab.com,2021-01-27:1086039597 John LaRocque opened issue #48: Port flag is overridden by env vars/toml at Linus / earthwalker 2021-01-27T04:53:20Z jwlarocque John LaRocque

The README currently says:

In all cases, command line arguments override environment variables, which override .toml values. All configuration options are strings.

This is a lie. The port flag is only read if no value was read from environment variables and config.toml.
We could resolve this by doing one of:

  1. Update the README to say that command line arguments are lowest precedence (this doesn't make sense imo - I would expect flags to override more permanent configuration methods).
  2. Change main.go to always check for the port flag.
  3. Get rid of the port flag (remove from main.go and the README). It's currently the only flag we're using, and I don't imagine it gets a lot of use, so I favor this option.
tag:gitlab.com,2021-01-27:1086031272 John LaRocque commented on issue #30 at Linus / earthwalker 2021-01-27T04:43:56Z jwlarocque John LaRocque

I think this was resolved in the summer refactor and can be closed.

main.go reads config values and flags before doing anything else, and throws a fatal log if any errors are returned.

tag:gitlab.com,2021-01-27:1086024450 John LaRocque commented on issue #27 at Linus / earthwalker 2021-01-27T04:35:21Z jwlarocque John LaRocque

I think this can be closed - everything has either been given its own Issue or addressed. The config.toml was added in the summer refactor (70849fda I think). Let me know if I've missed anything though.

tag:gitlab.com,2021-01-26:1084109853 John LaRocque opened merge request !25: WIP: Increase population filter detail at Linus / earthwalker 2021-01-26T02:34:06Z jwlarocque John LaRocque

Replaces the NASA population density GeoTIFF with a higher detail version from the GHSL. This source generally provides much more granular data, though there are still some patchy areas in Africa and central Asia.

ghsl_pop5.tif is a down-res'ed version of the 2015 GHS-POP dataset (WGS84 projection at 9 arcsecond resolution). The original data gives approximate populations under each pixel, but I didn't try to retain this property while reducing the file size. I used GDAL to, in order:

  • reduce the resolution to 25% (10800x5400),
  • square root the population values (to enhance detail in low-population areas),
  • truncate the floating point values at 3000.0 (anything higher than this is decidedly urban, so we don't care),
  • scale the resulting values to an 8-bit image,
  • recompress with the packbits algorithm (in the hope that this would be easier to decompress than LZW)

Command: gdal_translate fullpop.tif ghsl_pop5.tif -outsize 25% 0 -exponent 0.5 -scale 0 3000 0 255 -ot Byte -co "COMPRESS=PACKBITS"

The resulting file is 3.8MB (58.4MB decompressed), which I think is acceptable-ish. The problem is, it takes quite a while for the JS GeoTIFF library to decompress this (~30 seconds on my machine), which is less acceptable.
To keep from having to decompress the TIFF every time getLocationPopulation is called, this also makes some modifications to get_places.js. Performance is good once the initial decompression is done, but the script is still a bit messy.

The payoff of these changes is that the resulting location selection is quite good in the testing I've done.

TODO:

  • Reduce decompression time - maybe decrease resolution to 12.5%
  • Scale population filter to the polygon (for example, a polygon with a max population of 32/0.125 would count that rather than 255/1.0 as 100%)
  • Try decompressing only the bounding box of the polygon (don't know if this will be faster, but it's supported)

Potentially resolves: #39, #45, and #47

tag:gitlab.com,2021-01-26:1084078875 John LaRocque pushed new project branch fixes/popdensity at Linus / earthwalker 2021-01-26T01:46:45Z jwlarocque John LaRocque

John LaRocque (eac5a14a) at 26 Jan 01:46

WIP: Increase population filter detail

tag:gitlab.com,2021-01-26:1084049876 John LaRocque commented on issue #47 at Linus / earthwalker 2021-01-26T00:54:52Z jwlarocque John LaRocque

This is probably a duplicate of #39. I'm going to spend some time tinkering with the pop density logic, as it seems to be causing lots of issue reports. (Branch will be fixes/popdensity.)

(Also, hello again! Work has chilled out somewhat so I'm working on Earthwalker a bit.)

tag:gitlab.com,2020-08-19:874196642 John LaRocque pushed to project branch master at Linus / earthwalker 2020-08-19T21:07:11Z jwlarocque John LaRocque

John LaRocque (a945047e) at 19 Aug 21:07

tag:gitlab.com,2020-08-17:870908528 John LaRocque pushed new project branch features/TypeScript at Linus / earthwalker 2020-08-17T19:00:09Z jwlarocque John LaRocque

John LaRocque (16ec2d16) at 17 Aug 19:00

WIP: convert to TypeScript

tag:gitlab.com,2020-08-17:869716044 John LaRocque closed issue #40: [Meta] Unite the GeoGuessr Alternatives at Linus / earthwalker 2020-08-17T01:39:51Z jwlarocque John LaRocque

I've noticed (while browsing r/geoguessr) that there are quite a few other GeoGuessr alternatives out there, some of which are open source.
Here's a list of the ones I'm aware of:

Name Link Tech Open Source?
EarthWalker https://gitlab.com/glatteis/earthwalker Svelte, Go Yes
LocationEstimatr https://github.com/ruurdbijlsma/locationestimatr2 Vue, Firebase Yes
80 Clicks https://www.eighty-clicks.com/ MS Stack? No
Geoguess Master https://github.com/spider-hand/Geoguess-Master-Web Vue, Firebase Yes
SpotPlot (name may change) https://spea.cc/spotplot/ PHP? No

There's definitely a lot of work being duplicated here, and each implementation also has its own unique set of features/improvements.
So, my proposal is to reach out to the developers of these and invite them to work together and build one GeoGuessr alternative to rule them all (which may be this or one of the other existing projects, or may be new from-scratch).

Do you think this is viable? Would you want to contribute to such a project?