Code Monkey home page Code Monkey logo

Comments (2)

peternowee avatar peternowee commented on July 30, 2024

Chinese Postman Solver only works on a layer of type Vector (not Raster or Mesh) and of geometry type Line (not Point or Polygon). According to the QGIS 2.18 context help for Add Delimited Text File Layer, it can only create a layer of geometry type Line from WKT-formatted files containing fields like LINESTRING(...). Other text files will probably all create layers of geometry type Point.

For example, the example file test_graph.csv included with Chinese Postman Solver was probably meant specifically for the command-line solver and is not WKT-formatted. QGIS will import only the start nodes as points on a Point-layer and ignore the end nodes (tested with both 2.18.28 and 3.4.6). When I then select those points and run Chinese Postman Solver, I get the same error message as you got:

Error: Could not find any components. Try selecting different features.

To check what kind of layer you have (QGIS 2.18.28): Layer -> Properties... -> Metadata -> Properties -> General -> Geometry type of the features in this layer. When it says Point (WKB type: "Point"), you will get the error message you got. It needs to say Line (WKB type: "LineString") for Chinese Postman Solver to work.

I created PR #16 to provide more specific error messages.

from chinese-postman.

rkistner avatar rkistner commented on July 30, 2024

Fixed by #16, released in 0.2.2 and 0.3.0.

from chinese-postman.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.