4

Software:

QGIS 2.18.10

GRASS GIS 7.2.1

GitHub Repository Link: Police



Having difficulty fixing incorrect geometries for nypolicew84.zip shapefile (check GitHub link)

Errors when using GRASS to fix issue. Is there anything I am missing? Or is there a more straight-forward way to fix shapefile. Please assist.

QGIS file also in GitHub

Below are the steps:

1. Open Topology Checker

enter image description here

2. Click on Configuration

enter image description here

3. Select must not have invalid geometries

enter image description here

4. Rule gets added

enter image description here

5. Click on Validate All

enter image description here

6. Error Found

enter image description here

7. Zoom in to see all errors

enter image description here

8. Open GRASS GIS and set location

enter image description here

9. Follow prompts to set location. Kept at default

enter image description here

10. Keep EPSG

enter image description here

11. Select EPSG 4326

enter image description here

12. Get Unlabeled Error

enter image description here

13. Finish is grayed out

enter image description here

1 Answer 1

3

I had a look at your project and found a couple of polygon errors, using Check Validity tool (in Processing, under QGIS Geoalgorithms). That gives more detailed error messages than topology checker plugin . It also splits your layer into valid and invalid geometries.

The Topology Checker plugin checks a lot of things, but doesn't appear to give a more detailed reason WHY a geometry is invalid.

Looking at the "Invalid output" layer, two of the precincts have the following errors:-

Ring 0 has less than 4 points

You might want to try running v.clean (from Processing, rather than the GRASS GUI). I tend to use processing when I can, as it handles a lot of the setup (projections, regions) for you.

After running v.clean with default settings, then running topology checker on the output, the geometries show up as clean.

Edit

After running this fix the Duplicate ... errors by going to Vector - Geometry tools - Singleparts to multipart

6
  • Hello @steven-kay I get error This algorithm cannot be run :-( GRASS folder is not configured. Please configure it before running GRASS algorithms. When I google it says enable Grass plugin, but when I search the plugin is not in QGIS. Here is link, docs.qgis.org/2.6/en/docs/training_manual/grass/…
    – Rhonda
    Commented Jul 5, 2017 at 22:58
  • @Rhonda: To my knowledge QGIS searches in the path for "grass73", then "grass72", then "grass70" (in this order). Are you sure that GRASS GIS 7 is installed on your system?
    – markusN
    Commented Jul 6, 2017 at 5:45
  • @markusN Yes, GRASS GIS 7 installed along with QGIS. I installed `QGIS Standalone Installer Version 2.18 (64 bit) from qgis.org/en/site/forusers/download.html. Or is there another website/variant of QGIS?
    – Rhonda
    Commented Jul 6, 2017 at 15:16
  • @markusN I created separate question for GRASS. If possible, please answer, gis.stackexchange.com/questions/246722/…
    – Rhonda
    Commented Jul 6, 2017 at 23:18
  • 1
    See issues.qgis.org/issues/16777 . There is a known bug in the QGIS 2.18.10 standalone installer, that affects GRASS GUI too. Try OSGEO4W setup as an alternative.
    – AndreJ
    Commented Jul 7, 2017 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.