Details

    • Type: Wish Wish
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 8.0-M2
    • Fix Version/s: None
    • Component/s: docs, graph extension
    • Labels:
      None

      Description

      The graph module is responsible for the bulk of questions this month; one thing that makes answering these questions hard is the lack of a test case or example program that could be used as a reference point.

      With that in mind I would like to put together a simple "Graph" tutorial; please use the comments to outline the ideas of what you would like to see ... however a couple of guidelines:

      1. We need a sample dataset - a public sample data set. I will consider the Tiger Roads dataset as a good reference point unless someone can think of something smaller (and more international). Is there a good way to extract just a bit of open street maps?
      2. We step by step instructions need to be simple and straight forward and very well tested!
      3. The tutorial has to be visual in some fashion
      4. We can save many of the other goals of the graph module for the bonus questions (such as the differences between the path finding algorithms).
      5. We follow a "code first" writing style; so no explaining things in the middle of the step by step instructions
      6. We can put and explaining after the code; but we should save any detailed background on graph theory for the peanut gallery (or wikipedia). We want results in a tutorial - not theory.

        Activity

        Hide
        Nick Malleson added a comment - - edited
        This tutorial is a great idea! I don't have any comments to add, but here are my thoughts about the initial ones.

        1. We need a sample dataset - a public sample data set. I will consider the Tiger Roads dataset as a good reference point unless someone can think of something smaller (and more international). Is there a good way to extract just a bit of open street maps?

        I've been using a small subset of Open Street Map roads and it's been fine. Someone has created handy OSM shapefile downloads for the UK (e.g. England is here http://www.sharegeo.ac.uk/handle/10672/28) but I'd suggest using something smaller. I have my own dataset for Leeds (UK) which I could send you.

        Also, we should decide how clean the data should be. OSM data in it's raw form doesn't make nice graphs because the lines don't break at intersection points (so roads that cross don't form nodes) but it's fairy easy to fix this beforehand. I have some GeoTools code to do this, or there are tools in ArcGIS as well which actually work better. Again I'd be happy to send the 'clean' OSM data that I have, but showing how to clean the data to some extent (e.g. removing disconnected graphs) might be a useful tutorial task.

        Jody: We can save data cleaning for the bonus section; perhaps with a simple example such as a) snapping

        3. The tutorial has to be visual in some fashion

        Yes, it would be nice if we could see the paths in a GUI somehow, or watch as an iterator walks over the graph. I imagine this will require a fair bit of work though and might be overkill.

        Jody: Showing the graph will be fine with the DirectLayer code that was added to GeoTools; I actually have graph drawing code in uDig I can port over to DirectLayer. Visual is not negotiable for these GeoTools tutorials; too many questions on the user list if people cannot see what they are doing!

        6. We can put and explaining after the code; but we should save any detailed background on graph theory for the peanut gallery (or wikipedia). We want results in a tutorial - not theory.

        I agree, this style works well for the other geotools tutorials.
        Show
        Nick Malleson added a comment - - edited This tutorial is a great idea! I don't have any comments to add, but here are my thoughts about the initial ones. 1. We need a sample dataset - a public sample data set. I will consider the Tiger Roads dataset as a good reference point unless someone can think of something smaller (and more international). Is there a good way to extract just a bit of open street maps? I've been using a small subset of Open Street Map roads and it's been fine. Someone has created handy OSM shapefile downloads for the UK (e.g. England is here http://www.sharegeo.ac.uk/handle/10672/28) but I'd suggest using something smaller. I have my own dataset for Leeds (UK) which I could send you. Also, we should decide how clean the data should be. OSM data in it's raw form doesn't make nice graphs because the lines don't break at intersection points (so roads that cross don't form nodes) but it's fairy easy to fix this beforehand. I have some GeoTools code to do this, or there are tools in ArcGIS as well which actually work better. Again I'd be happy to send the 'clean' OSM data that I have, but showing how to clean the data to some extent (e.g. removing disconnected graphs) might be a useful tutorial task. Jody: We can save data cleaning for the bonus section; perhaps with a simple example such as a) snapping 3. The tutorial has to be visual in some fashion Yes, it would be nice if we could see the paths in a GUI somehow, or watch as an iterator walks over the graph. I imagine this will require a fair bit of work though and might be overkill. Jody: Showing the graph will be fine with the DirectLayer code that was added to GeoTools; I actually have graph drawing code in uDig I can port over to DirectLayer. Visual is not negotiable for these GeoTools tutorials; too many questions on the user list if people cannot see what they are doing! 6. We can put and explaining after the code; but we should save any detailed background on graph theory for the peanut gallery (or wikipedia). We want results in a tutorial - not theory. I agree, this style works well for the other geotools tutorials.
        Hide
        Harshad Shrikhande added a comment - - edited
        1. I think we need to pick datasets that consist of different feature types like polygons, lines, etc.

        Jody: We can do a bonus question with polygons and the touches relationship (that is a hard concept to think about the first time).

        2. Yeah, that's true
        3. Yeah, this would make even a newbie understand the basics of Graphs. We must take into account even those guys who use the Maven command line tool to make Geotools applications while preparing this visual tutorial

        Jody: The visual refers to he use of JMapFrame to display results; people need to see what they have done (even if they ran from the command line)

        4. Ok
        5. That should be good .
        6. I think we can place some links on basic Graph algos and concepts at the very beginning of the tutorial. I can say this from my experience because I wasn't very clear with the AStar concepts before I started using it.

        Jody: We do have a "references" section at the start for links; And we can go into some of the details (at the end after the code - that way people only need to read if they have a question).
        Show
        Harshad Shrikhande added a comment - - edited 1. I think we need to pick datasets that consist of different feature types like polygons, lines, etc. Jody: We can do a bonus question with polygons and the touches relationship (that is a hard concept to think about the first time). 2. Yeah, that's true 3. Yeah, this would make even a newbie understand the basics of Graphs. We must take into account even those guys who use the Maven command line tool to make Geotools applications while preparing this visual tutorial Jody: The visual refers to he use of JMapFrame to display results; people need to see what they have done (even if they ran from the command line) 4. Ok 5. That should be good . 6. I think we can place some links on basic Graph algos and concepts at the very beginning of the tutorial. I can say this from my experience because I wasn't very clear with the AStar concepts before I started using it. Jody: We do have a "references" section at the start for links; And we can go into some of the details (at the end after the code - that way people only need to read if they have a question).
        Hide
        Jody Garnett added a comment -
        A couple more suggestions from the user list:

        Paul Crease: I have used a free routable network dataset based on OpenStreetMap data available from
        http://www.geofabrik.de/data/shapefiles.html (for the city of Vienna)

        IantT: At the risk of getting sucked in as a volunteer: could we use the same
        data as the PGRouting tutorial?
        http://workshop.pgrouting.org/chapters/installation.html
        Show
        Jody Garnett added a comment - A couple more suggestions from the user list: Paul Crease: I have used a free routable network dataset based on OpenStreetMap data available from http://www.geofabrik.de/data/shapefiles.html (for the city of Vienna) IantT: At the risk of getting sucked in as a volunteer: could we use the same data as the PGRouting tutorial? http://workshop.pgrouting.org/chapters/installation.html
        Jody Garnett made changes -
        Field Original Value New Value
        Comment [ Showing the graph will be fine with the DirectLayer code that was added to GeoTools; I actually have graph drawing code in uDig I can port over to DirectLayer. ]

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Jody Garnett
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: