MapInfo Pro Developers User Group

 View Only
  • 1.  Least Cost Path analysis

    Posted 08-16-2024 05:24
    Edited by Jonas Nordlund 08-16-2024 06:08

    Hi!

    We're working on aiding our users with least cost path analysis, that is, calculating a shortest path as a polyline through a weight raster e.g. GeoTIFF given a start and end point. Has anyone done this kind of work with MapInfo and can provide us some pointers? I've looked around online and there are methods using various GIS tools or even FME, but it would be very nice to have it be generated with MapInfo rather than to depend on external services, and also as our integrated mapping application already uses MapInfo so it would be "native" in an environment we're comfortable and experienced with.



    ------------------------------
    Jonas Nordlund
    Software Developer
    Norconsult AB
    Sweden
    ------------------------------



  • 2.  RE: Least Cost Path analysis

    Posted 08-16-2024 06:31

    We just discovered this code sample by using GDAL and scikit-image that might work for us as a plan B in case we still need to turn to external tools. It also illustrates what we want to do here: Raster Layers - Python GDAL/OGR Cookbook 1.0 documentation (pcjericks.github.io)



    ------------------------------
    Jonas Nordlund
    Software Developer
    Norconsult AB
    Sweden
    ------------------------------



  • 3.  RE: Least Cost Path analysis

    Employee
    Posted 08-27-2024 02:40

    Hi Jonas

    As you know, MapInfo Pro does support Python these days and you can also install and use additional Python modules. So there is a chance, you can use the example you link to from MapInfo Pro too.

    I'd think some of the Python code in the sample would need some changes to work in Pro. I haven't looked into that though.

    Would you want to use Python to do this?



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------