Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added shape and bb support. #3

Merged
merged 9 commits into from
Mar 15, 2017
Merged

Added shape and bb support. #3

merged 9 commits into from
Mar 15, 2017

Conversation

gknisely
Copy link
Contributor

@gknisely gknisely commented Mar 9, 2017

ported only the needed tiles logic from valhalla. Updated db logic t…o use thread_local. Added logic to obtain a list of geojson tiles located on disk. Added logic to intersect those tiles with a BB in order to obtain the features from them. Added support for BB query. Added logic to support including geometry or not.

TODO: allow support of just BB or IDs in the query.

No geometry result

{

    "19320": {
        "speeds": [
            {
                "average_speed": 1.55,
                "dow": 0,
                "hour": 3
            },
            {
                "average_speed": 3.885,
                "dow": 0,
                "hour": 11
            },
            {
                "average_speed": 2.178,
                "dow": 0,
                "hour": 12
            }
        ]
    },
    "67128184": {
        "speeds": [
            {
                "average_speed": 21.45,
                "dow": 0,
                "hour": 3
            },
            {
                "average_speed": 23.24,
                "dow": 0,
                "hour": 11
            }
        ]
    }

}

Geometry result:

{

    "type": "FeatureCollection",
    "features": [
        {
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            120.99333190917969,
                            14.484823226928711
                        ],
                        [
                            120.993408203125,
                            14.484824180603027
                        ]
                    ],
                    [
                        [
                            120.993408203125,
                            14.484824180603027
                        ],
                        [
                            120.99357604980469,
                            14.484809875488281
                        ],
                        [
                            120.99373626708984,
                            14.484785079956055
                        ],
                        [
                            120.99388885498047,
                            14.484724998474121
                        ],
                        [
                            120.99405670166016,
                            14.48462200164795
                        ]
                    ],
                    [
                        [
                            120.99405670166016,
                            14.48462200164795
                        ],
                        [
                            120.99419403076172,
                            14.484513282775879
                        ],
                        [
                            120.99433135986328,
                            14.484333038330078
                        ],
                        [
                            120.99516296386719,
                            14.483160018920898
                        ],
                        [
                            120.99536895751953,
                            14.482864379882812
                        ]
                    ]
                ]
            },
            "type": "Feature",
            "properties": {
                "drive_on_right": 1,
                "osmlr_id": 67128184,
                "level": 0,
                "best_frc": "primary",
                "oneway": 1,
                "original_edges": "0/2415/781, 0/2415/790, 0/2415/16",
                "tile_id": 2415,
                "id": 2,
                "speeds": [
                    {
                        "average_speed": 21.45,
                        "dow": 0,
                        "hour": 3
                    },
                    {
                        "average_speed": 23.24,
                        "dow": 0,
                        "hour": 11
                    }
                ]
            }
        }
    ]

}

… use thread_local. Added logic to obtain a list of geojson tiles located on disk. Added logic to intersect those tiles with a BB in order to obtain the features from them. Added support for BB query. Added logic to support including geometry or not.
…s based on ids sent in when no BB is specified.
@gknisely gknisely merged commit b403c8b into dev Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant