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

Correct geom field of community district table #55

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sql/create_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ CREATE TABLE IF NOT EXISTS "city_council_district" (
CREATE TABLE IF NOT EXISTS "community_district" (
"borough_id" char(1),
"id" char(2),
"li_ft" geometry(multiPoint,2263),
"li_ft" geometry(multiPolygon,2263),
"mercator_fill" geometry(multiPolygon,3857),
"mercator_label" geometry(point,3857),
CONSTRAINT community_district_borough_id_id_pk PRIMARY KEY("borough_id","id")
Expand Down
4 changes: 1 addition & 3 deletions sql/populate_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,7 @@ INSERT INTO community_district
SELECT
SUBSTRING(borocd::text, 1, 1) AS borough_id,
SUBSTRING(borocd::text, 2, 3) AS id,
-- TODO: refactor li_ft to be MultiPolygon,
-- its correct geometry type
ST_PointOnSurface(ST_Transform(geom, 2263)) AS li_ft,
ST_Transform(geom, 2263) AS li_ft,
ST_Transform(geom, 3857) AS mercator_fill,
ST_Transform((ST_MaximumInscribedCircle(geom)).center, 3857) AS mercator_label
FROM community_district_source;
Expand Down
Loading