Skip to content

Invalid Zones: Fixes & Corrections

While on the Zones Index page, you may have noticed the column titled "Valid Polygons?" and not been sure what that means.

A valid polygon is one that does not include lines that cross over each other or intersect in any way.

invalid_zones(1).png

The two cut-out shapes in the image above were created by intersecting lines. This is frequently an issue as it may seem like a good idea to cut out a neighborhood or street from a larger zone using this method. However, this will lead to invalidity.

When a zone is invalid, it will break how your CrowdFiber system resolves addresses to that zone and it will negatively affect how CrowdFiber's road length calculator works.

invalid_zone(2).png

If you ever see a red No badge in the Valid Polygons? column of your Zones Index, you have an invalid zone shape that needs to be fixed. There are a few different ways to do this:

The first method is to use the map in a zone's record to edit the vertices that make up the zone's shape. This is most advisable for a quick and easy fix.

The second method is to use a shape creator/editor provided by CrowdFiber. This method is best used if you would prefer to avoid editing zones in your live CrowdFiber environment.

The third method uses the open-source software QGIS. This is the most powerful method but requires additional software and a re-upload process.

Method 1: Edit Directly on a Zone's Record

If you just need to make a quick edit to a zone's shape, you can use the zone record itself to fix the invalidity. Here's how:

  1. Go to the zone with the invalidity and select the Actions drop-down menu on the right side of the page, then select Edit.
  2. On the following page, scroll and zoom on the map to find the offending vertices.
  3. After you have found the issue, select the pen and quill tool on the map. This allows you to edit the zone's shape by dragging existing vertices to new locations, and clicking to add new vertices (called midpoints) or delete existing vertices.

Use either of those two methods to fix the geometry to where there is no more overlap in your zone's shape.

Below are two gifs showing these two types of functionality.

Once you are satisfied with the geometry, you'll need to save your changes twice -  once by clicking the Save button beside the quill tool, and again by scrolling to the bottom of the page and clicking the blue Save Zone Settings button.

invalid_zone(3).gif

invalid_zone(4).gif

Method 2: Edit by Using geojson.crowdfiber.com

If you want to leave the CrowdFiber site untouched while you edit the geometry, you can use geojson.crowdfiber.com.

When the site loads, you will see an empty world map on the left and a field for code on the right.

Now you will need to get your zone loaded into this page.

  • You can open a KML, GeoJSON, or CSV by either dragging the file over the map or by using the Open button.
  • You can also copy all of the GeoJSON code from the zone record and paste it in on the right side of the page.

If you want to do the copy and paste method, you'll need to double-click the GeoJSON field on your CrowdFiber site to populate that field.

The pen and quill functionality from above work the exact same here. You can click and hold to drag vertices and midpoints or simply click to delete or add vertices and midpoints. Below you will find two gifs that show both functionalities.

Once you are satisfied with the shape, you can bring it back into CrowdFiber one of two ways.

  • First, you can use the Save button in the upper-left corner to save the file as a GeoJSON, CSV, KML, or Shapefile.
  • Then import it into CrowdFiber. You can also copy and paste the corrected GeoJSON code from the right-hand panel back into the GeoJSON field on your CrowdFiber site's zone record.

invalid_zone(5).gif

invalid_zone(6).gif

Method 3: Edit by Using QGIS

If you have a particularly complex zone that needs to be made valid and would like to use a more powerful tool, we suggest downloading QGIS to edit your zones.

QGIS is an open-source GIS software that has similar functionality as its paid counterpart ArcGIS but doesn't come with the high price tag. You can go to this link to download a copy: https://qgis.org/en/site/forusers/download.html.

Older editions are suggested as there is more documentation available.

Once you have the software downloaded and opened up, you'll need to get your geometry into the system.

  • You can do this by:
    • uploading the same file that you uploaded into CrowdFiber, or simply use the search filter on the Zones Index so that your index only shows the relevant zone.
    • Then select the Bulk Actions drop-down menu and use the Download to KML button.

Open your QGIS software. You may be greeted with a Project Templates window. If so, then just drag that zone file into the New Empty Project field. You will then see your geometry on the screen.

If you'd like to see the world map beneath the geometry, then you will need to select Browser from the panel to the left.  On the Browser view, you will be looking for XYZ Tiles.
Click on the triangle to get the dropdown menu.  Double-click Open Street Map. You will notice this new layer covers your geometry, so go back to the Layers panel and drag the Open Street Map layer below the geometry.

Now that you have the proper view, let's look at editing the zone. Right now, the geometry will be Read Only. 

To make edits to the shape, you will need to:

  • click the geometry's layer on the Layers panel and then select the pencil from the top toolbar; this will enable the ability to edit the zone.
  • Next, select the Vertex Tool which is indicated by a screwdriver and hammer underneath what looks like two lines and vertices.
    • Once you've selected the Vertex Tool, you can edit your vertices - there is no change in appearance like using the pen and quill on CrowdFiber or geojson.crowdfiber.com.

Functionality is also a bit different when using QGIS. You will not see vertices until you hover over the geometry.

Also, moving and adding/deleting vertices differs.

  • To move a vertex, click the vertex and move the mouse to where you want that vertex to be located. Click again set the vertex down.
  • To delete a vertex, click the vertex and then either press Backspace or Delete.
  • Adding a midpoint works by clicking the small cross that shows up when you hover over a line between two vertices. Simply drag that vertex to where you want it and then click again to release the vertex. (You will find two gifs below showing the functionality.)
    • After the geometry is fixed, click the Pencil button again to save the edits you've made.

invalid_zone(7).gif

invalid_zone(8).gif

Once you have the geometry as you want it, you will need to get it back into CrowdFiber.

  • Right-click the corrected geometry's name on the left-hand Layers panel.
  • Scroll down to the Export button, and select the Save Features As button.

    This will bring up a new window.

invalid_zone(9).png

Select a format compatible for importing into CrowdFiber (KML, CSV, GeoJSON, or Shapefile).

  • Next, you will need to name the file by selecting the three dots to the right of the File name field.

Note: you will receive an error if you simply enter your name into the File name field. Selecting the three dots will bring up save location window as well as a place to name the file.

  • Once you've named your file and selected the location, click the Save button.

Now ensure the CRS is set to EPSG:4326 - WGS 84. This is the only Coordinate Reference System CrowdFiber will accept.

Click OK to save the corrected geometry to your system.

Note for CSV users: if you are wanting to use a CSV you will need to make sure you do two things. * First, make sure the geometry does not have the Include z-dimension selected. * Second, make sure AS_WKT is selected for the Geometry in the Layer Options window. Your file should now be good to go.

invalid_zone(10).png

Here is a gif showing the Export functionality on QGIS:

invalid_zone(11).gif