censusreporter / census-postgres-scripts

Scripts used to set up census-postgres on an Amazon EC2 instance.
MIT License
65 stars 34 forks source link

using wrong projection on tiger import #24

Open sbchonez opened 3 years ago

sbchonez commented 3 years ago

the data from census are actually in 4269

I think you could reproject and make valid in one step:

psql -d census -U census -v ON_ERROR_STOP=1 -q -c "ALTER TABLE tiger2019.${tablename} ALTER COLUMN geom type geometry(MultiPolygon, 4326) using ST_MakeValid(ST_Transform(geom, 4326));"

details on that here

iandees commented 3 years ago

Can you point to a reference that says TIGER is in EPSG:4269?

sbchonez commented 3 years ago

https://www2.census.gov/geo/pdfs/maps-data/data/tiger/tgrshp2019/TGRSHP2019_TechDoc_Ch2.pdf
section 2.2.3

It's also what is provided in the metadata with each file. DC tabblock data shown in QGIS:
image

iandees commented 3 years ago

Hm, OK. I'll have to look at re-importing the TIGER data then. Thanks for flagging!