azavea / pfb-network-connectivity

PFB Bicycle Network Connectivity
Other
40 stars 10 forks source link

Add ability to change analysis max trip distance #866

Closed KlaasH closed 2 years ago

KlaasH commented 2 years ago

PFB has been getting requests to change the trip distance defaults in the BNA. Rather than having to rely on running a local analysis to change the NB_MAX_TRIP_DISTANCE and NB_BOUNDARY_BUFFER parameters, they would like to able able to change this input from the tool’s admin UI, similar to the way the “Run Analysis” page accepts an OSM file via a URL. To accomplish this, we'll need to add fields to the job model, the form for creating jobs, and the batch job setup.

If no specific value is given for NB_BOUNDARY_BUFFER, it gets set within the analysis scripts to be equal to NB_MAX_TRIP_DISTANCE. I don't think there's any need to adjust it separately, so we can just rely on that behavior to keep the two variables in sync.

NB_MAX_TRIP_DISTANCE is defined in meters, so the field should make that clear and should only accept positive integer values. The default is 2680.