Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing field names in exported shapefiles #1252

Open
woooowoooo opened this issue Jul 20, 2022 · 0 comments
Open

Confusing field names in exported shapefiles #1252

woooowoooo opened this issue Jul 20, 2022 · 0 comments

Comments

@woooowoooo
Copy link

woooowoooo commented Jul 20, 2022

Description

When one exports a map as a shapefile and opens it in a GIS program, one can see some oddly-named fields. Specifically, "republican", "republican_1", "other part", and "other part_1" are not named similarly to their Democratic analogues, "democrat16" and "democrat20". This is not a problem in the GeoJSON export, which has the fields "republican16", "republican20", "other party16", and "other party20". I believe this is because of the shapefile 10-character limit. Maybe shorten the field names?

Edit: After looking at the field list for longer, I've noticed some other funny cut-short field names. Specifically, "CVAP Nativ", "VAP Pacifi", "CVAP Pacif", "VAP Hispan", "CVAP Hispa", and "compactnes".

Steps To Reproduce

  1. Open an existing map, or alternatively create a new map and do a bit of redistricting to get some data
  2. Click the "Export" button and export as Shapefile

The following steps are how I found the problem, but they are not necessary. I have not tested this in ArcGIS or any other non-QGIS software but I believe the problem will be the same, because it's with the exported shapefiles themselves.

  1. Create a new project in QGIS
  2. Layer → Add Layer → Add Vector Layer
  3. Type the path of the exported shapefile and press "Add"
  4. Click the "Identify Results" tool or do Ctrl + Shift + I
  5. Look at the ambiguous field names

Expected behavior

There are unambiguous field names such as "republican16" and "republican20" instead of "republican" and "republican_1" in the exported shapefile.

Actual behavior

There are four confusingly-named fields: "republican", "republican_1", "other part", and "other part_1".

Screenshots

image

Your environment

  • Browser: Firefox 102.0.1
  • QGIS: 3.26.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant