1. I want to create a polygon from a DXF file. I used v.in.dxf to convert the DXF file to GRASS vector map format. when I run the polygonize algorithm, it gives me the following error message(here I used "a.dxf" as the input)

    Algorithm Polygonize starting... Processing lines... Noding lines... Polygonizing...

    No polygons were created!.

  2. I have created a script that converts DXF to shapefile. In the script, first, DXF is converted to GRASS vector map format, then run the v.clean algorithm. After that polygonize algorithm is run, finally v.dissolve algorithm is run. My tool works correctly for most of the DXF files. But when I inserted the above-mentioned "a.dxf" as the input to my script, it gives "'NoneType' object has no attribute 'getitem' See log for more details" error.

When I use the same file in ArcGIS, it creates a polygon.

How should I overcome from this problem?

  • sounds like there is a problem with that file – Ian Turton Jan 22 '19 at 16:31
  • but a polygon was created in ArcGIS using the same dxf? – Shanaka Herath Jan 22 '19 at 16:48
  • if your process works for most dxf files but not this one, there must be something wrong with this one. Is the polygon valid? – Ian Turton Jan 22 '19 at 17:00
  • 3
    Ian is referring to invalid geometry, which is a concept you should read up on if you're not familiar with it. One example of invalid geometry (for a polygon feature) would be a self-intersecting polygon. It's possible that QGIS is being more particular about its geometry validity requirements, or perhaps ArcGIS is automatically correcting an invalid geometry. – csk Jan 22 '19 at 19:05
  • 1
    The solution will be in the correct method (or methods) applied in v.clean, necessary to comply with GRASS topological rules (for example, are you breaking the lines at each intersection?). The second error seems to be related to the script. Best find all the necessary steps for the recognition of the polygons (in any dxf file) by GRASS and once you get it re-write the script. – Gabriel De Luca Jan 22 '19 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.