|
| 1 | +--- |
| 2 | +title: BIMS Documentation |
| 3 | +summary: Central documentation site for BIMS projects |
| 4 | + - Ketab Bamniya |
| 5 | + - Jeremy Prior |
| 6 | + - Dimas Ciputra |
| 7 | +date: 20-03-2025 |
| 8 | +some_url: https://github.com/kartoza/bims-website |
| 9 | +copyright: Copyright 2025, Kartoza |
| 10 | +contact: |
| 11 | +license: This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. |
| 12 | +#context_id: 1234 |
| 13 | +--- |
| 14 | + |
| 15 | +# Add Spatial Filter |
| 16 | + |
| 17 | +Once you have uploaded a spatial layer, you can add it as a spatial filter for BIMS instance. |
| 18 | + |
| 19 | +As an admin/super user, access the `Spatial Filters` page by clicking on 1️⃣ your username in the top right corner of any page and then click on 2️⃣ `Spatial Filters` on the dropdown menu. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +## Add Spatial Filter Section |
| 24 | + |
| 25 | +On the `Spatial Filters` page, you can add a new section, which will appear as a section tab in the map view. |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +To add a section, click on 1️⃣ the `Add new filter section` button. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +To add a new filter section, fill in the following field: |
| 34 | + |
| 35 | +1. Name – Enter the section name. |
| 36 | + |
| 37 | +Once completed, click the Save button 2️⃣ to submit. |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +Your new filter section will then be added to the bottom of the list on the `Spatial Filters` page. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +If you navigate back to the map on the BIMS instance, click 1️⃣ the `Search` button, and then click 2️⃣ `Spatial Filter`, you will see the newly created filter section. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +If you need to change the position of your filter section in the list, go to the `Spatial Filters` page. Click and hold the drag icon, then move the section to your desired position. |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +## Add Spatial Filter Context |
| 54 | + |
| 55 | +A spatial filter context refers to the items added under the `Spatial Filter section`. The system uses this context to retrieve data from the associated spatial layer. |
| 56 | + |
| 57 | +For example, if you add `Sanpark boundaries` as a context 1️⃣, the system will extract Sanpark filter data using the provided key. These filters will then appear as selectable options 2️⃣ on the map. |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +To add a `Spatial Filter Context`, you first need to specify which attribute from the layer will be used to extract values. This requires adding a GeoContext key. |
| 64 | + |
| 65 | +Click 1️⃣ the `GeoContext keys` button to proceed. |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +The `GeoContext Keys` modal will appear. Click the `Add New Key` button. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +In the `Add New Key` modal: |
| 74 | + |
| 75 | +- 1️⃣ Select a layer – Choose the layer you want to use. You can select your uploaded layer here. |
| 76 | +- 2️⃣ Choose an attribute – Select the attribute the system will use to extract data. |
| 77 | + |
| 78 | +Once done, click `Save`. |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +Your new context key should appear here. If you want to use a different attribute for the layer, simply remove the key by clicking the wastebasket icon and add a new one. |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +Close the modal, and now you can add the new context to the Spatial Filter section. |
| 87 | +To do this, click the plus (+) button 1️⃣ in the section panel. |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +In the `Add New Context` modal, locate your newly added key using the input field 1️⃣. The field supports autocomplete, so you can start typing part of the title, and it will automatically search for matching keys. |
| 92 | +Once you've selected the key, click the `Add` button to proceed. |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | +Your new context will be added to the bottom of the list. |
| 97 | + |
| 98 | +To rearrange its position, simply drag the drag icon located to the left of the text. |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +When you return to the map view and open the `Spatial Filter` panel, you will see your newly added spatial filter context. However, no data will be available yet because the system hasn't harvested it. |
| 103 | + |
| 104 | +You can wait for the system to harvest the data automatically, but for the current setup, it's better to trigger the harvester manually. Follow the next steps to do that. |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +As an admin/superuser, visit the following URL: |
| 109 | + |
| 110 | +🔗 `https://[your-bims.site.com]/admin/bims/locationsite/` |
| 111 | + |
| 112 | +This will open the Location Site Admin page. |
| 113 | + |
| 114 | +Hover over the `Update GeoContext` button 1️⃣. A dropdown will appear with two options—select the second option 2️⃣ to avoid re-harvesting existing data. |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | +Once selected, the button will change to `Harvesting GeoContext...` 1️⃣, indicating that the system is currently processing data from the layers for all location sites. |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | +The harvesting process may take some time, depending on the number of sites in your BIMS instance. |
| 123 | + |
| 124 | +To check if the process is complete, open the `Spatial Filter` panel on the map. If the sites now contain the context filter, it will be displayed there. |
| 125 | + |
| 126 | + |
0 commit comments