Federico Mena Quintero is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Federico Mena Quintero @federicomena

Now that Mapzen Metro Extracts are dead, I decided to revive my city maps with another set of base data. I'm using Geofabrik's country extracts. It's a huge change to go from just my town to all of Mexico.

Trying to figure out a workflow to automate updates. Currently I'm splitting the monster Spatialite database into layers. Not sure if I should script that in or outside.

(Also, I thought the GIMP was full of papercuts... but GIS software is swimming in razors.)

· Web · 1 · 2

@federicomena you can download the Mexico file, cut out the are you want and import that. Then do the same each day and do a diff between today's regional extract and yesterday's one and import that diff. Then you have a smaller DB and daily updates

@ebel thanks, I need to investigate that! I think ogr2ogr can update an existing spatialite instead of writing a new one?

(Actually, I don't care much if it writes a new one from the updated data. I care more about not having to split the bag-of-geometry from the PBF into layers again... that's what I don't know if I should try to script within Qgis or outside) 😃

@federicomena I thought you were using osm2pgsql to update a postgresql database. Never used ogr2ogr to update spatialite data. I often work with planet sized OSM data, so one needs PgSQL... I'm not really sure what you're doing w.r.t. layers, sorry.

@ebel hehe, I've never learned database administration, so I have this irrational fear of setting up pgsql locally. Maybe I should do it if I'm going to be maintaining lots of map data.

Layers - I tell qgis to filter the multipolygons table for "boundary=administrative, admin_level=4" to be able to paint state boundaries nicely. Another filter for the lines table for "highway=*", etc.

Maybe I don't need to split them up, and just let it filter all the time?