Created
          June 4, 2025 16:41 
        
      - 
      
- 
        Save wipfli/51474af4262c267d3f78bf69cb22ed9d to your computer and use it in GitHub Desktop. 
    pinmeto overture pmtiles
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | set -e | |
| set -u | |
| duckdb -c " | |
| LOAD spatial; | |
| SET s3_region='us-west-2'; | |
| COPY ( | |
| SELECT | |
| 'Feature' AS type, | |
| json_object( | |
| 'type', 'Point', | |
| 'coordinates', [ST_X(geometry), ST_Y(geometry)] | |
| ) as geometry, | |
| json_object( | |
| 'id', id, | |
| 'name', names.primary, | |
| 'confidence', confidence, | |
| 'socials', CAST(socials AS JSON) | |
| ) AS properties | |
| FROM read_parquet('s3://overturemaps-us-west-2/release/2025-05-21.0/theme=places/type=place/*', filename=true, hive_partitioning=1) | |
| WHERE list_has(list_transform(sources, x -> x.dataset), 'PinMeTo') | |
| AND geometry IS NOT NULL | |
| ) TO STDOUT (FORMAT json); | |
| " | tippecanoe -o pinmeto-places-2025-05-21.pmtiles --force -l place -rg --drop-densest-as-needed --extend-zooms-if-still-dropping --maximum-tile-bytes=2500000 --progress-interval=10 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment