I was curious about the usage of Maxar over the last year, so did some quick work to see where it was used. To start, I used a Python 3 version of ChangesetMD to load the latest changesets into PostgreSQL, using the -g option to create geometries.
I then, with a bit of manual work, identified the changesets of the last year are those between 122852000 and 137769483. Using this, and knowledge of tags normally used with maxar, I created a materialized view with just the Maxar changesets
1 2 3 4 5 6 7
CREATE MATERALIZED VIEW maxar AS SELECT id, num_changes, st_centroid(geom) FROM osm_changeset WHERE id BETWEEN 122852000 and 137769483 AND (tags->'source' ILIKE '%maxar%' AND tags->'imagery_used' ILIKE '%maxar%');
This created a table of 2713316 changesets, which is too many to directly view, so I needed to get it by country.
I did this with the border data from country-coder
1 2
curl -OL 'https://raw.githubusercontent.com/rapideditor/country-coder/main/src/data/borders.json' ogr2ogr -f PostgreSQL PG:dbname=changesetmd borders.json
This loaded a quick and dirty method of determining the point a country is in into the DB, allowing me to join the tables together
1 2 3 4
SELECT COALESCE(iso1a2, country), COUNT(*) FROM maxar JOIN borders ON ST_Within(maxar.st_centroid, borders.wkb_geometry) GROUP BY COALESCE(iso1a2, country) ORDER BY COUNT(*) DESC;
coalesce | count |
---|---|
IN | 253789 |
ID | 138214 |
TR | 131282 |
BR | 121062 |
SV | 102280 |
GT | 100412 |
TZ | 86890 |
RU | 71243 |
US | 69600 |
BD | 60622 |
ZM | 60130 |
CN | 58226 |
NG | 55355 |
SY | 49353 |
PH | 46432 |
CD | 45216 |
AE | 40728 |
MW | 40710 |
PE | 37037 |
SE | 33762 |
UA | 33664 |
MX | 33012 |
HN | 32385 |
NP | 31692 |
KE | 30045 |
MY | 27224 |
RO | 26477 |
MG | 24456 |
ZA | 24262 |
CO | 23876 |
BY | 20925 |
AR | 20264 |
VN | 20203 |
GB | 19687 |
DE | 19613 |
UG | 19534 |
LY | 18980 |
KZ | 18037 |
TH | 17879 |
SA | 17270 |
PK | 17161 |
EG | 16848 |
ET | 16406 |
AU | 16134 |
IQ | 15819 |
AF | 15404 |
IT | 15283 |
SO | 14745 |
SD | 14346 |
CA | 14223 |
EC | 13919 |
ML | 13417 |
QA | 12379 |
CL | 11902 |
HU | 11284 |
IR | 10899 |
TG | 10533 |
TL | 10364 |
This usage includes a period of time at the end where Maxar was not working, which is still the case. It’s also a very quick and dirty method designed to minimize the amount of time I had to do stuff, at the cost of spending more computer time. ChangesetMD is unmaintained and loading all the changesets is slow, but I already knew how to use it, so it didn’t take me much time.