nvkelso / natural-earth-vector

A global, public domain map dataset available at three scales and featuring tightly integrated vector and raster data.
https://www.naturalearthdata.com/
Other
1.72k stars 369 forks source link

Feature request: 1:110 scaleset for India PoV #866

Open digiquanta opened 11 months ago

digiquanta commented 11 months ago

We see that there is a scaleset for India PoV at 1:10. Can we generate a 1:110 from the same shapefile? or what is the method to get a 1:110 scaleset for India PoV?

nvkelso commented 11 months ago

You're looking for country polygons at 1:110m (and presumably 1:50m for complete set) with point-of-views built out?

The Makefile has targets for each point-of-view, with a dependency on the Map Shaper tool, like:

Existing 10m point-of-view Makefile target:

build_a5_ne_10m_admin_0_countries_ind: 10m_cultural/ne_10m_admin_0_scale_rank.shp \
    housekeeping/ne_admin_0_details_level_5_disputed.dbf
    mapshaper -i 10m_cultural/ne_10m_admin_0_scale_rank.shp \
        -join housekeeping/ne_admin_0_details_level_5_disputed.dbf encoding=utf8 keys=sr_brk_a3,BRK_A3 fields=ADM0_A3_IN \
        -dissolve 'ADM0_A3_IN' calc='featurecla="Admin-0 country", scalerank = min(scalerank)' \
        -filter 'scalerank !== null' + \
        -filter 'scalerank <= 6' + \
        -join housekeeping/ne_admin_0_details_level_2_countries.dbf encoding=utf8 keys=ADM0_A3_IN,ADM0_A3 fields=* \
        -filter 'ADM0_A3 !== null' + \
        -each 'delete sr_adm0_a3' \
        -each 'NAME=BRK_NAME' \
        -each 'NAME_LONG=BRK_NAME' \
        -o 10m_cultural/ne_10m_admin_0_countries_ind.shp \

There is a similar root Makefile target for the 110m themes (but without the point-of-views):

build_c2_ne_110m_admin_0_countries: 110m_cultural/ne_110m_admin_0_scale_rank.shp \
    housekeeping/ne_admin_0_details_level_2_countries.dbf \
    intermediate/ne_110m_lakes_big.shp
    mkdir -p intermediate
    mapshaper -i 110m_cultural/ne_110m_admin_0_scale_rank.shp \
        -dissolve 'sr_adm0_a3' copy-fields=featurecla,scalerank \
        -filter 'scalerank !== null' + \
        -each 'featurecla="Admin-0 country"' \
        -join housekeeping/ne_admin_0_details_level_2_countries.dbf encoding=utf8 keys=sr_adm0_a3,ADM0_A3 fields=* \
        -each 'delete sr_adm0_a3' \
        -o 110m_cultural/ne_110m_admin_0_countries.shp \
        -erase intermediate/ne_110m_lakes_big.shp \
        -o 110m_cultural/ne_110m_admin_0_countries_lakes.shp \

Conceptually a new Makefile target for 110m point of view(s) might look like:

build_c2_ne_110m_admin_0_countries_ind: 110m_cultural/ne_110m_admin_0_scale_rank.shp \
    housekeeping/ne_admin_0_details_level_5_disputed.dbf \
    intermediate/ne_110m_lakes_big.shp
    mkdir -p intermediate
    mapshaper -i 110m_cultural/ne_110m_admin_0_scale_rank.shp \
        -join housekeeping/ne_admin_0_details_level_5_disputed.dbf encoding=utf8 keys=sr_brk_a3,BRK_A3 fields=ADM0_A3_IN \
        -dissolve 'ADM0_A3_IN' calc='featurecla="Admin-0 country", scalerank = min(scalerank)' \
        -filter 'scalerank !== null' + \
        -join housekeeping/ne_admin_0_details_level_2_countries.dbf encoding=utf8 keys=ADM0_A3_IN,ADM0_A3 fields=* \
        -filter 'ADM0_A3 !== null' + \
        -each 'delete sr_adm0_a3' \
        -each 'NAME=BRK_NAME' \
        -each 'NAME_LONG=BRK_NAME' \
        -o 110m_cultural/ne_110m_admin_0_countries_ind.shp \
        -erase intermediate/ne_110m_lakes_big.shp \
        -o 110m_cultural/ne_110m_admin_0_countries_lakes_ind.shp \
chandrahas9 commented 11 months ago

@nvkelso Thank you for the response.

When I tried to make with the above code, I had to add the 'sr_brk_a3' field to the 110m scalerank file (and fill it up with the values from 10m file).

However, even after building this make target, I am still getting a shapefile which is the same as the normal 110m shape and not India POV.

Can you tell me what I am doing wrong?