Maxar usage over the last year

Posted by pnorman on 7/8/2023

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;
coalescecount
IN253789
ID138214
TR131282
BR121062
SV102280
GT100412
TZ86890
RU71243
US69600
BD60622
ZM60130
CN58226
NG55355
SY49353
PH46432
CD45216
AE40728
MW40710
PE37037
SE33762
UA33664
MX33012
HN32385
NP31692
KE30045
MY27224
RO26477
MG24456
ZA24262
CO23876
BY20925
AR20264
VN20203
GB19687
DE19613
UG19534
LY18980
KZ18037
TH17879
SA17270
PK17161
EG16848
ET16406
AU16134
IQ15819
AF15404
IT15283
SO14745
SD14346
CA14223
EC13919
ML13417
QA12379
CL11902
HU11284
IR10899
TG10533
TL10364

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.