uchicago-capp-30320 / RouteRangers

Transit planning tool designed to retrieve end user input and also facilitate local transit authorities' decision making.
MIT License
1 stars 1 forks source link

Explore GeoJSON representation of census tract data: #101

Closed JPMartinezClaeys closed 5 months ago

JPMartinezClaeys commented 5 months ago

To do the heat maps on leaflet we need to pass the information as a GeoJSON which specifies the geometry in the geometry field and the data to be passed as values for each census tract on the "properties" field.

Solutions to explore:

  1. Applying the serializer directly does not seem to work as passing .values() (equivalent to GROUP BY) to a query set convert it to a ValuesQuerySet. Explore if there is a way around this problem.
  2. "Manually" create the GeoJSON from the queryset results and then apply geojson.dumps(). Need to explore how geojson interacts with GEOS Geometry used by Django and could be more error prone (but certainly doable).

Discuss with @benjaleivas, @kdumais111

JPMartinezClaeys commented 5 months ago

This issue has been already handled and pushed.