-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add Freedom Trail with trailheads and parking/restroom amenities #450
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| -- Migration: 073_add_freedom_trail.sql | ||
| -- Description: Add the Freedom Trail (Akron, OH) as a linear 'trail'-role POI with its | ||
| -- 8.1-mile geometry, plus the official Summit Metro Parks trailheads/access points as | ||
| -- 'point' POIs. Adds has_parking / has_restrooms amenity flags to pois (mirrors the | ||
| -- is_ada_accessible / is_bike_friendly flags) and marks each trailhead per the Summit | ||
| -- Metro Parks Freedom Trail map. Trail geometry is OpenStreetMap-derived (ODbL). | ||
| -- Idempotent: re-runs cleanly on every container start and deploy. | ||
|
|
||
| -- 0. Amenity flag columns (general POI fields; shown as sidebar badges when true) | ||
| ALTER TABLE pois ADD COLUMN IF NOT EXISTS has_parking BOOLEAN DEFAULT FALSE; | ||
| ALTER TABLE pois ADD COLUMN IF NOT EXISTS has_restrooms BOOLEAN DEFAULT FALSE; | ||
|
|
||
| -- 1. Trail POI (linear feature rendered from pois.geometry) | ||
| INSERT INTO pois (name, poi_roles, brief_description, primary_activities, length_miles, surface, is_ada_accessible, is_bike_friendly, opening_hours) | ||
| SELECT 'Freedom Trail', ARRAY['trail'], | ||
| 'Paved, ADA-accessible multipurpose rail-trail running 8.1 miles from downtown Akron''s Canal District through Tallmadge to Kent, where it connects to the Portage Hike & Bike Trail. Operated by Summit Metro Parks.', | ||
| 'Hiking, Biking', 8.1, 'asphalt', TRUE, TRUE, 'Mo-Su 06:00-23:00' | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Freedom Trail' AND 'trail' = ANY(poi_roles)); | ||
|
|
||
| -- 2. Load trail geometry (OpenStreetMap, ODbL 1.0) — idempotent re-set | ||
| UPDATE pois SET geometry = '{"type": "MultiLineString", "coordinates": [[[-81.515976, 41.0777396], [-81.5163043, 41.0776909], [-81.5163626, 41.0777118], [-81.5163493, 41.0778177], [-81.5163732, 41.0778737], [-81.5164423, 41.0778823], [-81.5165574, 41.0778137], [-81.5165958, 41.0778517], [-81.5163666, 41.0781744], [-81.5163056, 41.0782633], [-81.5161771, 41.0784391], [-81.5159491, 41.0787528], [-81.5157967, 41.0789566], [-81.515529, 41.0793162], [-81.5153952, 41.07949], [-81.5151699, 41.0797248], [-81.5150374, 41.0798536], [-81.5147789, 41.0800684], [-81.5144728, 41.0802742], [-81.5141071, 41.0804869], [-81.5137323, 41.0806758], [-81.5133878, 41.080839], [-81.5128941, 41.081054], [-81.5128439, 41.0810804], [-81.5125157, 41.0812426], [-81.5108255, 41.0820064], [-81.5100264, 41.0823786], [-81.5096243, 41.0825466], [-81.5092139, 41.0827963], [-81.508947, 41.0829873], [-81.5086868, 41.0831905], [-81.5084964, 41.0833523], [-81.5081772, 41.0837101], [-81.5077923, 41.0841296], [-81.5075067, 41.0844248], [-81.5074748, 41.0844573], [-81.5071499, 41.0847917], [-81.506951, 41.0849945], [-81.5066431, 41.0853287], [-81.506228, 41.0857437], [-81.5059011, 41.0860203], [-81.5056843, 41.0861469], [-81.5056001, 41.0861961], [-81.5055831, 41.0862048], [-81.5052708, 41.0863647], [-81.5051383, 41.0864229], [-81.5048381, 41.0865547], [-81.5045688, 41.086642], [-81.5043064, 41.086727], [-81.5040417, 41.0867923], [-81.5036289, 41.086854], [-81.5031971, 41.086892], [-81.5027811, 41.086873], [-81.5022548, 41.086854], [-81.5018073, 41.0867947], [-81.5013203, 41.0866771], [-81.5009469, 41.0865429], [-81.5005719, 41.0863968], [-81.5003197, 41.0862661], [-81.500096, 41.0861058], [-81.4997083, 41.0858255], [-81.4992766, 41.0854763], [-81.4988734, 41.0851913], [-81.4985155, 41.0849133], [-81.4981885, 41.0846732], [-81.4978613, 41.0844497], [-81.4975987, 41.0843044], [-81.4972255, 41.0841399], [-81.4969676, 41.0840289], [-81.4964855, 41.0838802], [-81.4961884, 41.0837967], [-81.4960538, 41.0837661], [-81.4957626, 41.0837076], [-81.4951068, 41.083629], [-81.4948161, 41.0836215], [-81.4945376, 41.0836254], [-81.4940799, 41.0836506], [-81.4935008, 41.0836839], [-81.4930699, 41.0837276], [-81.4922123, 41.0838131], [-81.4910212, 41.0839293], [-81.4905235, 41.0839802], [-81.4904116, 41.0839873], [-81.4902921, 41.084], [-81.4896423, 41.084066], [-81.4889238, 41.0841405], [-81.4884336, 41.084206], [-81.4878786, 41.0842919], [-81.4875959, 41.0843473], [-81.4874091, 41.084395], [-81.4870556, 41.0844934], [-81.4867986, 41.0845762], [-81.486624, 41.0846401], [-81.4864489, 41.084706], [-81.4862952, 41.0847668], [-81.486109, 41.0848454], [-81.4859116, 41.0849375], [-81.4856613, 41.0850619], [-81.4853667, 41.0852341], [-81.4850198, 41.0854571], [-81.4844075, 41.0858686], [-81.484334, 41.0859147], [-81.4843058, 41.0859353], [-81.484292, 41.0859469], [-81.4842874, 41.0859575], [-81.4842899, 41.0859678], [-81.484296, 41.0859784], [-81.4842999, 41.0859855], [-81.4843014, 41.0859945], [-81.4842884, 41.0860103], [-81.4842496, 41.086038], [-81.4842095, 41.086066], [-81.4841993, 41.0860781], [-81.4841983, 41.0860853], [-81.4842056, 41.0860993], [-81.4842056, 41.0861122], [-81.4841971, 41.086125], [-81.4840659, 41.0862152], [-81.4840644, 41.0862163], [-81.4839935, 41.086265], [-81.483878, 41.0863483], [-81.4838104, 41.0864146], [-81.4837429, 41.086479], [-81.4836845, 41.086532], [-81.4834623, 41.0866867], [-81.4832257, 41.0868481], [-81.4828187, 41.087108], [-81.4827116, 41.087191], [-81.4818788, 41.0877636], [-81.4814549, 41.0880518], [-81.4813641, 41.0881071], [-81.4812997, 41.0881361], [-81.4812049, 41.0881674], [-81.481095, 41.0882023], [-81.4810766, 41.0882076], [-81.4809636, 41.0882404], [-81.4809063, 41.0882632], [-81.4808337, 41.0883027], [-81.4805047, 41.0885258], [-81.4792024, 41.0894138], [-81.4786321, 41.0898047], [-81.4781315, 41.0901406], [-81.4776281, 41.0904642], [-81.4774134, 41.0905897], [-81.4772853, 41.0906562], [-81.4772653, 41.0906619], [-81.4772038, 41.0906746], [-81.4770997, 41.090699], [-81.4770392, 41.090725], [-81.4769897, 41.0907555], [-81.4769463, 41.0907964], [-81.4769083, 41.0908459], [-81.4768751, 41.0908766], [-81.4768331, 41.0909017], [-81.4764299, 41.0910931], [-81.4759442, 41.0912974], [-81.4758594, 41.0913316], [-81.4749456, 41.0916205], [-81.4746527, 41.091717], [-81.4740615, 41.0918462], [-81.4734387, 41.0919765], [-81.4732019, 41.092025], [-81.4729217, 41.0920824], [-81.4728413, 41.0920989], [-81.4721858, 41.0922181], [-81.4666849, 41.0932749], [-81.4657872, 41.0934447], [-81.4645772, 41.0936742], [-81.4640236, 41.0937755], [-81.4634766, 41.0938822], [-81.4630102, 41.0939697], [-81.4626539, 41.0940162], [-81.4625545, 41.0940349], [-81.4623865, 41.0940766], [-81.4622172, 41.0941258], [-81.4620771, 41.0941531], [-81.461813, 41.0941825], [-81.461463, 41.0942326], [-81.4609826, 41.0943095], [-81.4600246, 41.0945246], [-81.4597225, 41.094584], [-81.4594566, 41.0946473], [-81.4593012, 41.0946607], [-81.4586816, 41.094773], [-81.4584197, 41.0948507], [-81.4579171, 41.094954], [-81.4577491, 41.094982], [-81.4575466, 41.0950024], [-81.4572579, 41.0950544], [-81.4568536, 41.0951516], [-81.4562571, 41.0952694], [-81.4556347, 41.0953824], [-81.4546621, 41.095572], [-81.4534345, 41.0958195], [-81.452723, 41.0959477], [-81.4521294, 41.096059], [-81.4520214, 41.0960822], [-81.4508498, 41.0963055], [-81.4504528, 41.0963763], [-81.4502448, 41.0964179], [-81.4500927, 41.0964764], [-81.4500016, 41.0965043], [-81.4498393, 41.0965351], [-81.4496303, 41.0965715], [-81.4491224, 41.0966738], [-81.44884, 41.0967192], [-81.4486832, 41.0967542], [-81.4485029, 41.0967904], [-81.448173, 41.0968624], [-81.4479892, 41.0969024], [-81.4475124, 41.0969932], [-81.4460686, 41.0972683], [-81.4438715, 41.0976869], [-81.4433683, 41.0978017], [-81.4431686, 41.0978495], [-81.4428604, 41.0979233], [-81.4423695, 41.0980507], [-81.4419993, 41.098172], [-81.4416893, 41.098303], [-81.4414039, 41.0984428], [-81.4409982, 41.0986709], [-81.4408406, 41.0987582], [-81.440669, 41.0988673], [-81.4403096, 41.099122], [-81.4392957, 41.0998941], [-81.4391811, 41.0999883], [-81.4391103, 41.1000465], [-81.4390425, 41.1000988], [-81.4384776, 41.1005348], [-81.4383549, 41.1006295], [-81.4380458, 41.1008681], [-81.4380375, 41.1008742], [-81.4379261, 41.1009563], [-81.437563, 41.1012238], [-81.4373649, 41.1013656], [-81.4372841, 41.1014338], [-81.436077, 41.1024527], [-81.4357873, 41.1027074], [-81.4355567, 41.1029822], [-81.4352616, 41.1033137], [-81.4350792, 41.1035643], [-81.4349076, 41.1038149], [-81.4343121, 41.1048417], [-81.4339688, 41.1054399], [-81.4338562, 41.1056743], [-81.4338347, 41.1057511], [-81.4338562, 41.1058077], [-81.4339205, 41.1058239], [-81.4336577, 41.1062119], [-81.4335021, 41.106317], [-81.4331963, 41.1068829], [-81.4324786, 41.1081765], [-81.4321392, 41.1087839], [-81.4319786, 41.1090777], [-81.430616, 41.111523], [-81.4298007, 41.1130022], [-81.4290711, 41.1143238], [-81.4281967, 41.1159202], [-81.4272858, 41.1175871], [-81.4270273, 41.1180338], [-81.4269701, 41.1181502], [-81.4269289, 41.1182186], [-81.4268647, 41.1183484], [-81.4268417, 41.1183744], [-81.4268107, 41.1183884], [-81.42674, 41.1184184], [-81.4267108, 41.1184378], [-81.4266842, 41.1184771], [-81.4262622, 41.1192344], [-81.4259684, 41.119853], [-81.4257455, 41.1202955], [-81.4253455, 41.1210074], [-81.4247863, 41.1220232], [-81.4242378, 41.122983], [-81.4239652, 41.1234149], [-81.4236644, 41.1238095], [-81.4233353, 41.1241934], [-81.4228964, 41.1246173], [-81.4223124, 41.1251505], [-81.421559, 41.1256866], [-81.4208017, 41.1261305], [-81.420085, 41.1264984], [-81.4191223, 41.1269676], [-81.4181419, 41.1274422], [-81.4172058, 41.12789], [-81.416502, 41.1282462], [-81.4160786, 41.1284605], [-81.4150788, 41.128931], [-81.4149496, 41.1289897], [-81.4145408, 41.1291803], [-81.4135251, 41.1297015], [-81.4128969, 41.130008], [-81.4120368, 41.1304292], [-81.4097971, 41.1315322], [-81.4090056, 41.1319156], [-81.408381, 41.1322159], [-81.4075584, 41.1325616], [-81.4068251, 41.1328076], [-81.4061349, 41.1330026], [-81.4050042, 41.1332416], [-81.4039967, 41.1334249], [-81.4017413, 41.1338032], [-81.3998311, 41.1341373], [-81.3976867, 41.134504], [-81.3951941, 41.1349425], [-81.3936597, 41.1352094], [-81.3932027, 41.1352862], [-81.3930885, 41.1353056], [-81.3929898, 41.1353563], [-81.3929147, 41.135427], [-81.3928845, 41.1354987], [-81.3928838, 41.1355441], [-81.3928992, 41.1355982], [-81.3929462, 41.135678], [-81.3930541, 41.1357391], [-81.3932352, 41.1358391], [-81.3934685, 41.1359416], [-81.3936375, 41.136034], [-81.3937099, 41.1360976], [-81.3937441, 41.1362108], [-81.3937435, 41.1362734], [-81.3937186, 41.1363274], [-81.3936543, 41.1363956], [-81.3935919, 41.1364476], [-81.3935135, 41.1364724], [-81.3933854, 41.1364956], [-81.3932089, 41.1365013], [-81.3931813, 41.1365015], [-81.3930562, 41.136502], [-81.3927225, 41.1364586], [-81.3925863, 41.1364446], [-81.3924756, 41.136433], [-81.3923603, 41.1364319], [-81.3922864, 41.1364415], [-81.3922188, 41.1364504], [-81.3921542, 41.1364794], [-81.3921188, 41.1365048], [-81.3921019, 41.1365546], [-81.3921142, 41.1365928], [-81.3921373, 41.1366357], [-81.3921483, 41.1366809], [-81.3921419, 41.1367388]], [[-81.5130424, 41.0806861], [-81.5130419, 41.0808405], [-81.5130419, 41.0808651], [-81.5130376, 41.0808988], [-81.5130305, 41.0809196], [-81.5130117, 41.0809481], [-81.5129886, 41.0809767], [-81.5129568, 41.0810083], [-81.512925, 41.081034], [-81.5128941, 41.081054], [-81.5126504, 41.0810156], [-81.5124523, 41.0809002]], [[-81.3930885, 41.1353056], [-81.3929151, 41.1353351], [-81.3927448, 41.1353641]], [[-81.4479892, 41.0969024], [-81.4480665, 41.0969673], [-81.4482059, 41.0970627]]]}'::jsonb | ||
| WHERE name = 'Freedom Trail' AND 'trail' = ANY(poi_roles); | ||
|
|
||
| -- 3. Trailheads & access points (Summit Metro Parks Freedom Trail map; parking/restrooms per map legend) | ||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'Middlebury Trailhead', 41.13750211, -81.39084399, ARRAY['point'], 'Hiking, Biking', 'Northeast terminus of the Freedom Trail, where it connects to the Portage Hike & Bike Trail toward Kent and Ravenna. Located at 1324 Middlebury Rd., Kent.', TRUE, FALSE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Middlebury Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'Lions Park Trailhead', 41.10914646, -81.432091, ARRAY['point'], 'Hiking, Biking', 'Freedom Trail access point at Lions Park in Tallmadge. Located at 245 Northeast Ave., Tallmadge.', TRUE, TRUE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Lions Park Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'Erie Road Trailhead', 41.10071054, -81.43800259, ARRAY['point'], 'Hiking, Biking', 'Freedom Trail trailhead in Tallmadge. Located at 90 East Ave., Tallmadge.', TRUE, FALSE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Erie Road Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'Osceola Avenue Trailhead', 41.09528544, -81.45558715, ARRAY['point'], 'Hiking, Biking', 'Freedom Trail access point on Osceola Avenue in Tallmadge. Located at 240 Osceola Ave., Tallmadge.', FALSE, FALSE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Osceola Avenue Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'Arlington Trailhead', 41.08381524, -81.49098694, ARRAY['point'], 'Hiking, Biking', 'Freedom Trail trailhead in Akron''s Goodyear Heights area. Located at 390 N. Arlington St., Akron.', TRUE, FALSE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Arlington Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'Adams Park Trailhead', 41.08523447, -81.49932325, ARRAY['point'], 'Hiking, Biking', 'Freedom Trail trailhead at Adams Park in Akron. Located at 294 N. Adams St., Akron.', FALSE, FALSE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Adams Park Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'Perkins Street Trailhead', 41.08453901, -81.50716603, ARRAY['point'], 'Hiking, Biking', 'Southwest access point for the Freedom Trail near downtown Akron''s Canal District. Located at Perkins St., Akron.', FALSE, FALSE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'Perkins Street Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| INSERT INTO pois (name, latitude, longitude, poi_roles, primary_activities, brief_description, has_parking, has_restrooms) | ||
| SELECT 'University of Akron Trailhead', 41.08066938, -81.51304007, ARRAY['point'], 'Hiking, Biking', 'Freedom Trail access point near the University of Akron campus, just east of the trail''s Canal District terminus in downtown Akron.', TRUE, FALSE | ||
| WHERE NOT EXISTS (SELECT 1 FROM pois WHERE name = 'University of Akron Trailhead' AND 'point' = ANY(poi_roles)); | ||
|
|
||
| -- 4. Backfill PostGIS point geometry for the new trailheads (mirrors migration 021, | ||
| -- which runs before this file — without this the geom/index would lag one start). | ||
| UPDATE pois SET geom = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326) | ||
| WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND geom IS NULL; |
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While
has_parkingandhas_restroomshave been added to the allowed fields forPUT /pois/:idandPUT /destinations/:id, they are missing from several other admin write paths. Specifically, they should be added to:POST /destinations(around line 298)POST /pois(around line 364)POST /linear-features(around line 2008)PUT /linear-features/:id(around line 2052)Without these, any attempt to set or update parking/restroom amenities on creation or when editing linear features (like trails) will be silently ignored by the backend.