-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add topojson graph export rebase (#1926)
- Loading branch information
Showing
19 changed files
with
909 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
ors-api/src/main/java/org/heigit/ors/api/responses/export/topojson/Arc.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.heigit.ors.api.responses.export.topojson; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
@Builder | ||
@Getter | ||
@Setter | ||
public class Arc implements Serializable { | ||
private List<List<Double>> coordinates; | ||
|
||
@JsonValue | ||
public List<List<Double>> getCoordinates() { | ||
return coordinates; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
ors-api/src/main/java/org/heigit/ors/api/responses/export/topojson/Geometry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.heigit.ors.api.responses.export.topojson; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonPropertyOrder({"type", "properties", "arcs"}) | ||
@Getter | ||
@Builder | ||
public class Geometry implements Serializable { | ||
@JsonProperty("type") | ||
private String type; | ||
@JsonProperty("properties") | ||
private transient Properties properties; | ||
@JsonProperty("arcs") | ||
private List<Integer> arcs; | ||
} |
21 changes: 21 additions & 0 deletions
21
ors-api/src/main/java/org/heigit/ors/api/responses/export/topojson/Network.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.heigit.ors.api.responses.export.topojson; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonPropertyOrder({"type", "geometries"}) | ||
@Getter | ||
@Builder | ||
public class Network implements Serializable { | ||
@JsonProperty("type") | ||
private String type; | ||
@JsonProperty("geometries") | ||
private List<Geometry> geometries; | ||
} |
16 changes: 16 additions & 0 deletions
16
ors-api/src/main/java/org/heigit/ors/api/responses/export/topojson/Objects.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.heigit.ors.api.responses.export.topojson; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.io.Serializable; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@Getter | ||
@Builder | ||
public class Objects implements Serializable { | ||
@JsonProperty("network") | ||
private Network network; | ||
} |
31 changes: 31 additions & 0 deletions
31
ors-api/src/main/java/org/heigit/ors/api/responses/export/topojson/Properties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.heigit.ors.api.responses.export.topojson; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@Getter | ||
@Builder | ||
public class Properties implements Serializable { | ||
@JsonProperty("weight") | ||
private Double weight; | ||
@JsonProperty("osm_id") | ||
private Long osmId; | ||
@JsonProperty("both_directions") | ||
private Boolean bothDirections; | ||
@JsonProperty("speed") | ||
private Double speed; | ||
@JsonProperty("speed_reverse") | ||
private Double speedReverse; | ||
@JsonProperty("ors_ids") | ||
private List<Integer> orsIds; | ||
@JsonProperty("ors_nodes") | ||
private List<Integer> orsNodes; | ||
@JsonProperty("distances") | ||
private List<Double> distances; | ||
} |
Oops, something went wrong.