| 1 |
from django.urls import path |
| 2 |
|
| 3 |
from . import views |
| 4 |
|
| 5 |
urlpatterns = [ |
| 6 |
path("", views.location_list, name="api_location_list"), |
| 7 |
path("<int:pk>", views.location_details, name="api_location_details"), |
| 8 |
# geojson |
| 9 |
path("geojson/", views.geojson_location_list, name="api_geojson_location_list"), |
| 10 |
path( |
| 11 |
"geojson_writable_id/", |
| 12 |
views.geojson_location_writable_id_list, |
| 13 |
name="api_geojson_location_writable_id_list", |
| 14 |
), |
| 15 |
path( |
| 16 |
"geojson/<int:pk>/", |
| 17 |
views.geojson_location_details, |
| 18 |
name="api_geojson_location_details", |
| 19 |
), |
| 20 |
path( |
| 21 |
"geojson-other-srid/<int:pk>/", |
| 22 |
views.other_srid_location_details, |
| 23 |
name="api_other_srid_location_details", |
| 24 |
), |
| 25 |
path( |
| 26 |
"geojson-nullable/<int:pk>/", |
| 27 |
views.geojson_nullable_details, |
| 28 |
name="api_geojson_nullable_details", |
| 29 |
), |
| 30 |
path( |
| 31 |
"geojson_nogeo/<int:pk>/", |
| 32 |
views.geojson_nullable_details_nogeo, |
| 33 |
name="api_geojson_nullable_details_nogeo", |
| 34 |
), |
| 35 |
path( |
| 36 |
"geojson_hidden/<int:pk>/", |
| 37 |
views.geojson_location_details_hidden, |
| 38 |
name="api_geojson_location_details_hidden", |
| 39 |
), |
| 40 |
path( |
| 41 |
"geojson_none/<int:pk>/", |
| 42 |
views.geojson_location_details_none, |
| 43 |
name="api_geojson_location_details_none", |
| 44 |
), |
| 45 |
path( |
| 46 |
"geojson/<slug:slug>/", |
| 47 |
views.geojson_location_slug_details, |
| 48 |
name="api_geojson_location_slug_details", |
| 49 |
), |
| 50 |
path( |
| 51 |
"geojson-falseid/<int:pk>/", |
| 52 |
views.geojson_location_falseid_details, |
| 53 |
name="api_geojson_location_falseid_details", |
| 54 |
), |
| 55 |
path( |
| 56 |
"geojson-noid/<int:pk>/", |
| 57 |
views.geojson_location_noid_details, |
| 58 |
name="api_geojson_location_noid_details", |
| 59 |
), |
| 60 |
# file |
| 61 |
path( |
| 62 |
"geojson-file/<int:pk>/", |
| 63 |
views.geojson_located_file_details, |
| 64 |
name="api_geojson_located_file_details", |
| 65 |
), |
| 66 |
# geojson with bbox with its own geometry field |
| 67 |
path( |
| 68 |
"geojson-with-bbox/", |
| 69 |
views.geojson_boxedlocation_list, |
| 70 |
name="api_geojson_boxedlocation_list", |
| 71 |
), |
| 72 |
path( |
| 73 |
"geojson-with-bbox/<int:pk>/", |
| 74 |
views.geojson_boxedlocation_details, |
| 75 |
name="api_geojson_boxedlocation_details", |
| 76 |
), |
| 77 |
# geojson with bbox with autogenerated bbox |
| 78 |
path( |
| 79 |
"geojson-with-auto-bbox/", |
| 80 |
views.geojson_location_bbox_list, |
| 81 |
name="api_geojson_location_bbox_list", |
| 82 |
), |
| 83 |
# Filters |
| 84 |
path( |
| 85 |
"filters/contained_in_bbox", |
| 86 |
views.geojson_location_contained_in_bbox_list, |
| 87 |
name="api_geojson_location_list_contained_in_bbox_filter", |
| 88 |
), |
| 89 |
path( |
| 90 |
"filters/overlaps_bbox", |
| 91 |
views.geojson_location_overlaps_bbox_list, |
| 92 |
name="api_geojson_location_list_overlaps_bbox_filter", |
| 93 |
), |
| 94 |
path( |
| 95 |
"filters/contained_in_geometry", |
| 96 |
views.geojson_contained_in_geometry, |
| 97 |
name="api_geojson_contained_in_geometry", |
| 98 |
), |
| 99 |
path( |
| 100 |
"filters/contained_in_tile", |
| 101 |
views.geojson_location_contained_in_tile_list, |
| 102 |
name="api_geojson_location_list_contained_in_tile_filter", |
| 103 |
), |
| 104 |
path( |
| 105 |
"filters/overlaps_tile", |
| 106 |
views.geojson_location_overlaps_tile_list, |
| 107 |
name="api_geojson_location_list_overlaps_tile_filter", |
| 108 |
), |
| 109 |
path( |
| 110 |
"filters/within_distance_of_point", |
| 111 |
views.geojson_location_within_distance_of_point_list, |
| 112 |
name="api_geojson_location_list_within_distance_of_point_filter", |
| 113 |
), |
| 114 |
path( |
| 115 |
"filters/within_degrees_of_point", |
| 116 |
views.geojson_location_within_degrees_of_point_list, |
| 117 |
name="api_geojson_location_list_within_degrees_of_point_filter", |
| 118 |
), |
| 119 |
path( |
| 120 |
"filters/order_distance_to_point", |
| 121 |
views.geojson_location_order_distance_to_point_list, |
| 122 |
name="api_geojson_location_order_distance_to_point_list_filter", |
| 123 |
), |
| 124 |
] |