Search in sources :

Example 1 with GHJson

use of com.graphhopper.json.GHJson in project graphhopper by graphhopper.

the class DefaultModule method buildIndex.

static SpatialRuleLookup buildIndex(Reader reader, BBox graphBBox) {
    GHJson ghJson = new GHJsonBuilder().create();
    JsonFeatureCollection jsonFeatureCollection = ghJson.fromJson(reader, JsonFeatureCollection.class);
    return new SpatialRuleLookupBuilder().build(Arrays.asList(new GermanySpatialRule(), new AustriaSpatialRule()), jsonFeatureCollection, graphBBox, 1, true);
}
Also used : AustriaSpatialRule(com.graphhopper.routing.util.spatialrules.countries.AustriaSpatialRule) GHJsonBuilder(com.graphhopper.json.GHJsonBuilder) JsonFeatureCollection(com.graphhopper.json.geo.JsonFeatureCollection) GHJson(com.graphhopper.json.GHJson) GermanySpatialRule(com.graphhopper.routing.util.spatialrules.countries.GermanySpatialRule) SpatialRuleLookupBuilder(com.graphhopper.routing.util.spatialrules.SpatialRuleLookupBuilder)

Aggregations

GHJson (com.graphhopper.json.GHJson)1 GHJsonBuilder (com.graphhopper.json.GHJsonBuilder)1 JsonFeatureCollection (com.graphhopper.json.geo.JsonFeatureCollection)1 SpatialRuleLookupBuilder (com.graphhopper.routing.util.spatialrules.SpatialRuleLookupBuilder)1 AustriaSpatialRule (com.graphhopper.routing.util.spatialrules.countries.AustriaSpatialRule)1 GermanySpatialRule (com.graphhopper.routing.util.spatialrules.countries.GermanySpatialRule)1