You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,7 +250,7 @@ To update GO countries and districts Mapbox tilesets, run the management command
250
250
*`--update-countries` — update tileset for countries, including labels
251
251
*`--update-districts` — update tileset for districts, including labels
252
252
*`--update-all` — update all countries and districts tilesets
253
-
*`--create-and-update-admin2 <ISO3>` — if a new admin2 tileset should be created, use this argument. It will create a new source on Mapbox and then register a tileset. Ensure that a recipe is create in `mapbox/admin2/` directory. For example, see `mapbox/admin2/COL.json`. To run `python manage.py update-mapbox-tilesets --create-and-update-admin2 COL`
253
+
*`--create-and-update-admin2 <ISO3>` — if a new admin2 tileset should be created, use this argument. It will create a new source on Mapbox and then register a tileset. Ensure that recipes are create in `mapbox/admin2/` directory. For example, see `mapbox/admin2/COL.json` and `mapbox/admin2/COL-centroids.json`. A recipe for polygons and centroids are required. For centroids, we don't need to create a staging recipe. To run `python manage.py update-mapbox-tilesets --create-and-update-admin2 COL`
254
254
*`--update-admin2 <ISO3>` — use this to update an existing admin2 tileset. For example, `python manage.py update-mapbox-tilesets --update-admin2 COL`
status=subprocess.run(['ogr2ogr', '-f', 'GeoJSON', f'/tmp/{iso}.geojson', self.connection_string, '-sql', f'select d.id as admin1_id, d.name as admin1_name, ad.name, ad.id, adg.geom from api_country as c, api_district as d, api_admin2 as ad, api_admin2geoms as adg where c.id=d.country_id and c.iso3=\'{iso}\' and ad.admin1_id=d.id and adg.admin2_id = ad.id'])
271
+
ifstatus:
272
+
status=subprocess.run(['ogr2ogr', '-f', 'GeoJSON', f'/tmp/{iso}-centroids.geojson', self.connection_string, '-sql', f'select d.id as admin1_id, d.name as admin1_name, ad.name, ad.id, ad.centroid from api_country as c, api_district as d, api_admin2 as ad where c.id=d.country_id and c.iso3=\'{iso}\' and ad.admin1_id=d.id'])
0 commit comments