simonw / shapefile-to-sqlite

Load shapefiles into a SQLite (optionally SpatiaLite) database
Apache License 2.0
28 stars 4 forks source link

Ability to select or exclude loaded properties on features #13

Open rdmurphy opened 3 years ago

rdmurphy commented 3 years ago

Hello! 👋

Unless I'm missing it (sorry if I am!) I don't think it's currently possible to exclude (or inclusively select) fields/properties on features during a load. My use case here are U.S. Census TIGER/Line files, which annoyingly have unique fields for each level-type. (COUNTYNS for county files, TRACTNS for tracts, etc.) However, they always have a consistent GEOID property!

I could see this go even a step further and empower you to rename fields (so could standardize things like COUNTYNS and TRACTNS to just NS, for example), but maybe a bigger/separate ask. I also think this probably would make sense in geojson-to-sqlite too.

Thank you!