Skip to content

Commit

Permalink
Update to latest dev OTP version + continuous boarding support (#21)
Browse files Browse the repository at this point in the history
* Reduce call-n-ride time after trip plan based on call with Thomas

* [maven-release-plugin] prepare release otp-1.2.0.7

* [maven-release-plugin] prepare for next development iteration

* Revert "VGF-83 if flex service is enabled, must link to segment with CAR permission"

This reverts commit 6100d71.

* VGF-83 look for car accessible links at beginning of deviated-route search

* Some cleanup, future-proofing by making sure transit stops used for call-n-ride are bus accessible (not subway stops)

* bugfix VGF-59

* InterleavedBidirectionalHeuristic: do not change underlying request, instead use separate maxWalkDistanceHeuristic value

* [maven-release-plugin] prepare release otp-1.2.0.8

* [maven-release-plugin] prepare for next development iteration

* Switch to WKT areas for Advance Transit

* do not initialize edge map if no streets

* bugfix in pattern matcher

* bugfix in pattern matcher

* fix out-of-DAR issue

* VGF-92 fix the implementation of flag stops right at start or end point

* VGF-122 add outside-of-area message

* Add 'tripDiscoveryMode': look out two weeks in future or past

* VGF-64 use drt_advanced_book_max in routing

* fix test

* version bump

* [maven-release-plugin] prepare release otp-1.2.0.9

* [maven-release-plugin] prepare for next development iteration

* Add continuous pickup and dropoff messages to api response

* change to out-of-area message

* bump gtfs

* [maven-release-plugin] prepare release otp-1.2.0.10

* [maven-release-plugin] prepare for next development iteration

* tripDiscoveryMode - look out a month

* VGF-146 actual exclude walk parameter

* VGF-80 eligibility services (just 0 and 1 values)

* VGF-149 Add trips in past message

* VGF-91 let maxWalkDistanceHeuristic be as large as necessary

* VGF-91 add minimum length for partial edges

* obagtfs version bump

* [maven-release-plugin] prepare release otp-1.2.0.11

* [maven-release-plugin] prepare for next development iteration

* cleanup

* WKT test

* Initial commit for Vermont GTFS-flex integration tests

* Add BoardAlightType to Ride and make assertions

* ADDING MORE TEST

* Remove test of not-reservation service (GraphPathFinder not tested in this class)

* Remove trip discovery mode

* Remove PlanNotesService - feature which adds notes to API results for out-of-area and trip-plan-in-past.

Reverts:
e3a32da "VGF-149 Add trips in past message"
c06ee74 "change to out-of-area message"
2b34e57 "VGF-122 add outside-of-area message"

* Remove flag stop transfer generator, unused and untested.

* Followup to merge, fix VTrans test

* Remove demand-response services

* Remove shift by perpendicular vector

* Revert change to GenericDijkstra

* Remove some non-functional changes relative to OTP-master

* Changed calculation of slope costs

* Remove nonfunctional change

* Fixup RoutingRequest.equals and RoutingRequest.hashCode

* Move hop-for-edge map into FlexIndex

* serviceDayLookout: add parameter to look more days out in future (or back, for arriveBy=true)

* DrtTravelTime fix: 2nd constant could be only one digit

* VGF-161 DrtTravelTime fix: 2nd constant could be only one digit

* VGF-162 make drt_advance_book_min a double

* VGF-163 continuous_pickup and continuous_dropoff change to match spec

* bump gtfs-modules

* Revert pom.xml changes, except onebusaway-gtfs dependency

* Implement the Tobler Hicking Function for calculation of walk distance multiplier.

* Formatting change

* Add documentation to GTFS-flex parameters

* Additional API documentation

* Remove license headers

* Fix docstring in IndexAPI

* Formatting fix

* Implement Thomas's GTFS mapping suggestion

* Fix compilation error (perhaps due to my version of java): incompatible types: java.util.Comparator<capture#1 of ? extends T> cannot be converted to java.util.Comparator<? super capture#1 of ? extends T>

* Add to changelog

* Fix issue with maxWalkDistanceHeuristic infinite if not set

* Update changelog

* bugfix: Geometry vs Polygon in StopPattern

* Add termination condition for deviated/call-and-ride pre-search.

* Use Math.round for turning angles

So that edge pairs get same angles on both sides. Previously they could
be truncated differently

* Make sure that summing happens on rounded integers

* - Fix error in ElevationUtils.java and remove the speed adjustment factor `alkParA` from the calculation.
- Cleanup names and comments.
- Fix tests.

* Revert changes to InterleavedBidirectionalHeuristic

* Remove maxWalkDistanceHeuristic

* Remove flex parameters from TripShort

* Remove deviatedRouteLat/deviatedRouteLon

* Add improvements to heuristic for bike rental and car modes

* Remove URLs

* Add BikeParkVertex to vertices to be searched when estimated remaining weights

* Explicitly set euro's for DutchFareService.

* Remove the excessive warnings in the Dutch Fare Service.

Changed to trace.

* Fix bug causing temporary split edges to be of effective walking distance 0 (zero) by setting effectiveWalk distance as coefficient instead of mm.

(cherry picked from commit 1818955)
(cherry picked from commit d8abd1d)
(cherry picked from commit 45df71f)

* add missing version opentripplanner#2688 (3.0.1)

* fix regex

following https://bugs.openjdk.java.net/browse/JDK-8189343
fixes opentripplanner#2691

* update travis to test jdk9

* improve regex

* another attempt to fix the regex

* fix missing "\"

* fix regex (one more try)

* add comment and link to jdk ticket

* remove modification of travis

* Revert "remove modification of travis"

This reverts commit 37a6fd6.

* undo travis modification

* use object differ from stand alone project

it was pulled out of r5 to allow reuse

* use release version of object-differ

* update to object-differ 1.1.0

this ensures that TreeMaps will not cause exceptions in some forks of OTP

* Revert car mode changes, improve P&R search and add more comments.

* Add parameter documentation and flex parameter prefix. Remove some parameters from API itself.

* Add documentation for board-alight types

* Standardize API response parameter names for GTFS-Flex

* Add units to timeMillis parameter in GraphPathToTripPlanConverter

* Rename area to flexArea for disambiguation with other OTP areas

* Add to docs

* Formatting fix

* More documentation

* Fix method visibility

* Fix Call-And-Ride bug: call-and-ride should be fully within the defined time period. Includes better tests.

* Adding more documentation

* Refactoring flex-specific fields into a new class/new property of StopPattern

* Deduplicate primitive arrays in StopPattern and StopPatternFlexFields

* Refactor GTFS-Flex-specific fields out of PatternHop; create new FlexPatternHop class

* add documentation for enterStationsWithCar

* Remove TemporaryTransitBoardAlight; make FlexTransitBoardAlight inherently temporary.

* Refactor to remove bad call-and-ride trip heuristic

* Rename parameters

* Add more documentation around call-and-ride trip banning

* Rename Area to FlexArea

* Improve speed of heuristic when car mode is enabled

This change will restrict the amount of vertices explored while walking when driving is enabled which should significantly speed up graph searches.

* Address GTFS-Flex implications of the new Vertex disposal code in PR opentripplanner#2655

Remove TemporaryEdge list as it is redundant with TemporaryVertices.

* Move FlexPatternHop to proper package

* fix for hasNext() violation

* Prevent TemporaryVertex on a different thread from being reached. In order to do this cleanly, needed to ensure that ALL temporary vertices get added to rctx.temporaryVertices. The temporary subgraph of both endpoints is searched at routing context-creation time. The graph is searched again when the vertices are disposed.

* Do not add GTFS-Flex temporary vertices to the graph (formerly these were added, then removed with Graph.remove)

* Recalculate the the elevation profile for temporary edges after a split. This apply to biking and walking.

* Add documentation

* Parameter simplification: allow maxWalkDistance = 0 to be specified and get rid of redundant excludeWalking parameter

* Cleanup the creation of temporary vertices and edges when splitting an edge.
- Push assigning 'wheelchairAccessible' into the 'TemporarySplitterVertex' constructor.
- Create constructor for temporary street edge without a pre-calculated length, calculate length from the geometry in this case.
- Update some comments

* - Merged super class PartialStreetEdge into child class TemporaryPartialStreetEdge, witch were the only place it was used except for tests.
- Simplified the constructors a bit.

* Spelling 'hicking' corrected into 'hiking'.

* Update Sun Java code conventions link

* update to shared serializers in kryo-tools, remove r5 dependency

* Refactor heuristic to be sensitive to non-transit mode

* Add Javadoc to method

This explains that a parameter is ignored and refers to the issue with more info

* replace MapDB Tuple2 with OTP T2

Step toward opentripplanner#2431

* Remove two tests, addresses opentripplanner#2431 and opentripplanner#2646

* Materialize generated test graphs to allow opentripplanner#2431

* Remove gtfs-lib dependency, fixes opentripplanner#2431

This also eliminates a MapDB dependency

* Remove tests for obsolete classes, fixes opentripplanner#2431 addresses opentripplanner#2646

* update to locationtech geotools opentripplanner#2538

this is based on work by @innovimax in PR opentripplanner#2690

this now compiles and passes all tests under JDK 11

this is simplified by the fact that R5 and gtfs-lib dependencies are
eliminated in the branch this is based on

* Remove AWS dependencies, fixes opentripplanner#2713

also partially addresses opentripplanner#2646

* Refactor to improve readability

* store fare details as array rather than list, addresses opentripplanner#2685

* remove more uses of AWS SDK, opentripplanner#2713

We removed direct AWS dependencies in opentripplanner#2715, but there was still an indirect dependency on AWS SDK via gtfs-lib. So some of the uses of the AWS SDK were not caught until we finally removed the transitive dependency on AWS SDK by removing gtfs-lib.

* allow compilation with stricter generics checking

* remove dependency on conveyal jackson2-geojson

this module defines some geojson serializers.
they referred to the old JTS package names which have changed in new versions of JTS.
we could patch com.conveyal.jackson2-geojson and re-release it, however JTS now includes its own GeoJSON writing capability, which we are likely to migrate toward. So as a stopgap measure I've copied in our GeoJSON serializer classes and changed the JTS package names they reference. That original code is under Apache 2 license, and Conveyal authorizes its inclusion and/or relicensing here as needed.
Note that this is only used in a few places in OTP.

* add JAXB API to allow compilation under Java 11

these classes were always available until Java 9, now the module must be added.
Perhaps Jackson uses / will use some other annotations now? To be investigated.

* add whitespace, remove dead code

response to review of PR 2714

* Added the safeRun() method - avoiding the System.exit(-1) call

* add factory method for empty coordinate sequences

This is used by the new implementation of org.locationtech.jts.io.WKTReader
All tests pass with this change

* Revert "Added the safeRun() method - avoiding the System.exit(-1) call"

This reverts commit 9ea53cf.

* add this PR to changelog

* The run() method returns a 'success' boolean

* Travis build on Openjdk 8 and 11 allowing failures on 11

* fix indentation

* remove openjdk 11 from travis build

I realized after adding this that it will cause two maven deployments on every release and two uploads to S3 on every build. Let's just occasionally test locally on JDK 11 until it succeeds, then migrate the Travis config to openjdk 11.

* PR comments; Removed "Exiting..." from a log line. Added javadocs for the return value of the run() method

* PR submitter should add to changelog

resolves opentripplanner#2716

* update link

* serviceDayLookout: more documentation, refactor to avoid duplicate entries, remove from API parameter

* reorder vertex type check in light of flex routing vertices

The flex routing changes introduced numerous vertex classes that implement TemporaryVertex. This change makes sure that transit vertices use the transit vertex weights instead of having a 0 weight since the vertices may also be instances of a TemporaryVertex.

* Remove CarFreeAtoZ from deployments

It has been using R5 for some time now.

* Update changelog regarding remove of CarFreeAtoZ

* Always store lower-bound estimate of weight in streetSearch

* Implement a euclidean heuristic for pre-transit vertices

* Only use pre-transit euclidean heuristic in certain circumstances

ie when CAR mode is activated or maxWalkDistance is > 5km

* Don't use euclidean heuristic for pre-transit vertices in walk+transit queries

* Fix opentripplanner#2685: Remove XML annotations from response objects, so that Jackson reverts to default behavior (before 2.7.4)

* add line to changelog

* Update Changelog.md

Add entry to changelog regarding InterleavedBidirectionalHeuristic refactor.

* Update Changelog.md

Move changelog entry to appropriate place.

* Update Changelog.md

Add closing paren to changelog entry

* Remove repo, add https

* Fix JTS coordinate order for Polygons/Polylines

* Provide test coverage of bug

* Changing min pattern hop length for continuous pickup/dropoff from 400 down to 50

* Disabling flexUseReservationServices to improve performance
  • Loading branch information
lboyarsky authored Aug 13, 2019
1 parent 1401cfa commit 93861f7
Show file tree
Hide file tree
Showing 331 changed files with 6,670 additions and 5,677 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ gen-py/
_site/
/otp
/otp-batch-analyst
*.DS_Store
lucene/
var/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: java
# OpenTripPlanner requires Java 8 and Travis doesn't (yet) support OpenJDK 8
jdk:
- oraclejdk8

jdk:
- openjdk8

# Replace Travis's default Maven installation step with a no-op.
# This avoids redundantly pre-running 'mvn install -DskipTests' every time.
install: true
Expand Down Expand Up @@ -62,4 +62,4 @@ deploy:
acl: public_read
on:
repo: opentripplanner/OpenTripPlanner
all_branches: true
all_branches: true
6 changes: 6 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
- Docs: improve configuration documentation
- Update onebusaway-gtfs to latest version from OBA project (#2636)
- Remove the coupling to OneBusAway GTFS within OTP's internal model by creating new classes replacing the external classes (#2494)
- Allow OTP to search more service days for transit service (#2592)
- Allow itineraries in response to be sorted by duration (#2593)
- Add support for GTFS-flex services: flag stops, deviated-route service, and call-and-ride (#2603)
- Fix reverse optimization bug (#2653, #2411)
- Remove CarFreeAtoZ from list of deployments
- Fix XML response serialization (#2685)
- Refactor InterleavedBidirectionalHeuristic (#2671)

## 1.3 (2018-08-03)

Expand Down
1 change: 0 additions & 1 deletion docs/Deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The following are known deployments of OTP in a government- or agency-sponsored
* **Atlanta, Georgia** The Metropolitan Atlanta Rapid Transit Authority's (MARTA) [trip planner](http://itsmarta.com/planatrip.aspx) and the Atlanta region's transit information hub [atltransit.org](https://atltransit.org/) both use OTP to power their website trip planners.
* **Boston, Massachusetts** The [Massachusetts Bay Transportation Authority trip planner](https://www.mbta.com/trip-planner).
* **Seattle, Washington** The [Sound Transit Trip Planner](https://www.soundtransit.org/tripplanner) is based on OTP. OTP also powers the trip planning feature of the [OneBusAway native apps](http://onebusaway.org/) in the Puget Sound region. Technical details are [here](https://github.com/OneBusAway/onebusaway-android/blob/master/SYSTEM_ARCHITECTURE.md#add-trip-planning-andor-bike-share-optional).
* **Arlington, Virginia** The [commute planning site](http://www.carfreeatoz.com/) for the Washington, DC metropolitan area depends on OpenTripPlanner to weigh the costs and benefits of various travel options, making use of profile routing.
* **Tampa, Florida** Hillsoborough Area Regional Transit uses an OpenTripPlanner server to power the trip planning feature of the [OneBusAway native apps](http://onebusaway.org/) in their region. Technical details are [here](https://github.com/OneBusAway/onebusaway-android/blob/master/SYSTEM_ARCHITECTURE.md#add-trip-planning-andor-bike-share-optional).
* [**Piemonte Region, Italy**](https://map.muoversinpiemonte.it/#planner) and the [**City of Torino**](https://www.muoversiatorino.it/) built on OpenTripPlanner by [5T](http://www.5t.torino.it/).
* [**Valencia, Spain**](http://www.emtvalencia.es/geoportal/?lang=en_otp) from the Municipal Transport Company of Valencia S.A.U.
Expand Down
2 changes: 1 addition & 1 deletion docs/Developers-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ are not included in mainline OTP.

OpenTripPlanner uses the same code formatting and style as the [GeoTools](http://www.geotools.org/) and
[GeoServer](http://geoserver.org) projects. It's a minor variant of the
[Sun coding convention](http://www.oracle.com/technetwork/java/codeconv-138413.html). Notably, **we do not use tabs**
[Sun coding convention](https://www.oracle.com/technetwork/java/codeconventions-150003.pdf). Notably, **we do not use tabs**
for indentation and we allow for lines up to 100 characters wide.

The Eclipse formatter configuration supplied by the GeoTools project allows comments up to 150 characters wide.
Expand Down
70 changes: 70 additions & 0 deletions docs/Flex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# GTFS-Flex routing

Many agencies run flexible services to complement their fixed-route service. "Flexible" service does
not follow a strict timetable or route. It may include any of the following features: boardings
or alightings outside its scheduled timetable and route; booking and scheduling in advance; or
transit parameters which depend on customer requests ("demand-responsive transit" or DRT). These
services are typically used in rural areas or for mobility-impaired riders.

A GTFS extension called [GTFS-Flex](https://github.com/MobilityData/gtfs-flex/blob/master/spec/reference.md) defines
how to model some kinds of flexible transit. A subset of GTFS-Flex has been implemented in
OpenTripPlanner as part of US DOT's [Mobility-on-Demand Sandbox Grant](https://www.transit.dot.gov/research-innovation/fiscal-year-2016-mobility-demand-mod-sandbox-program-projects).

In particular, OTP now has support for these modes of GTFS-Flex:

- "flag stops", in which a passenger can flag down the a vehicle along its route to board, or
alight in between stops
- "deviated-route service", in which a vehicle can deviate from its route within an area or radius to
do a dropoff or pickup
- "call-and-ride", which is an entirely deviated, point-to-point segment.

These modes can co-exist with fixed-route transit, and with each other. For example, some agencies
have fixed-route services that start in urban areas, where passengers must board at designated
stops, but end in rural areas where passengers can board and alight wherever they please. A
fixed-route service may terminate in an defined area where it can drop off passengers anywhere --
or have such an area at the beginning or middle of its route. A vehicle may be able to deviate a
certain radius outside its scheduled route to pick up or drop off passengers. If both a pickup and
dropoff occur in between scheduled timepoints, from the passenger's perspective, the service may
look like a call-and-ride trip. Other call-and-ride services may operate more like taxis, in which
all rides are independently scheduled.

## Configuration

In order to use flexible routing, an OTP graph must be built with a GTFS-Flex dataset and
OpenStreetMap data. The GTFS data must include `shapes.txt`.

In addition, the parameter `useFlexService: true` must be added to `router-config.json`.

A number of routing parameters can be used to control aspects of flexible service. These parameters
typically change the relative cost of using various flexible services relative to fixed-route
transit. All flex-related parameters begin with the prefix "flex" and can be found in the Javadocs
for `RoutingRequest.java`.

The following example `router-config.json` enables flexible routing and sets some parameters:

{
"useFlexService": true,
"routingDefaults": {
"flexCallAndRideReluctance": 3,
"flexMaxCallAndRideSeconds": 7200,
"flexFlagStopExtraPenalty": 180
}
}

## Implementation

The general approach of the GTFS-Flex implementation is as follows: prior to the main graph search,
special searches are run around the origin and destination to discover possible flexible options.
One search is with the WALK mode, to find flag stops, and the other is in the CAR mode, to find
deviated-route and call-and-ride options. These searches result in the creation of temporary,
request-specific vertices and edges. Then, the graph search proceeds as normal. Temporary graph
structures are disposed at the end of the request's lifecycle.

For flag stops and deviated-route service, timepoints in between scheduled locations are determined
via linear interpolation. For example, say a particular trip departs stop A at 9:00am and arrives
at stop B at 9:30am. A passenger would be able to board 20% of the way in between stop A and stop B
at 9:06am, since 20% of 30 minutes is 6 minutes.

For deviated-route service and call-and-ride service, the most pessimistic assumptions of vehicle
travel time are used -- e.g. vehicle travel time is calculated via the `drt_max_travel_time`
formula in the GTFS-Flex (see the spec [here](https://github.com/MobilityData/gtfs-flex/blob/master/spec/reference.md#defining-service-parameters)).
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pages:
- Scripting: 'Scripting.md'
- Security: 'Security.md'
- Troubleshooting: 'Troubleshooting-Routing.md'
- GTFS-Flex Routing: 'Flex.md'
- Development:
- "Developers' Guide": 'Developers-Guide.md'
- Architecture: 'Architecture.md'
Expand Down
117 changes: 24 additions & 93 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@
</scm>

<properties>
<geotools.version>10.5</geotools.version>
<geotools.version>20.1</geotools.version>
<geotools.wfs.version>16.5</geotools.wfs.version>
<jackson.version>2.9.7</jackson.version>
<jersey.version>2.18</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aws.version>1.9.39</aws.version>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -231,6 +231,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down Expand Up @@ -415,15 +416,10 @@
<name>check central first to avoid a lot of not found warnings</name>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>download.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
<url>https://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository>
<id>axis</id>
Expand All @@ -448,34 +444,6 @@
</repositories>

<dependencies>
<!-- Amazon AWS client libraries -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>${aws.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-ec2</artifactId>
<version>${aws.version}</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-sqs</artifactId>
<version>${aws.version}</version>
</dependency>
<!-- Kryo serialization, used to save graphs to disk. -->
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>4.0.2</version>
</dependency>
<!-- Extra serializers for Kryo -->
<dependency>
<groupId>de.javakaffee</groupId>
<artifactId>kryo-serializers</artifactId>
<version>0.42</version>
</dependency>
<!-- Logging library, implements slf4j logging API -->
<dependency>
<groupId>ch.qos.logback</groupId>
Expand All @@ -488,26 +456,6 @@
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.6</version>
</dependency>
<!-- AWS SDK uses Java commons logging. Redirect it to the slf4j API (we use the Logback implementation) -->
<!-- Why does this work? It seems like we'd need to declare JCL "provided" to avoid using the true JCL. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.6</version>
</dependency>
<!-- Guava provides improved collections, among other things. -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<!-- Trove provides optimized map/set collections for native types (int, long...) -->
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
<version>3.0.3</version>
</dependency>

<!-- GEOTOOLS AND JTS TOPOLOGY: geometry, rasters and projections. -->
<!-- GEOTOOLS includes JTS as a transitive dependency. -->
<dependency>
Expand Down Expand Up @@ -547,9 +495,14 @@
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-wfs</artifactId>
<artifactId>gt-opengis</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-wfs</artifactId>
<version>${geotools.wfs.version}</version>
</dependency>
<!-- provides EPSG database for projections (shapefile loading) -->
<dependency>
<groupId>org.geotools</groupId>
Expand All @@ -562,7 +515,7 @@
<groupId>de.grundid.opendatalab</groupId>
<artifactId>geojson-jackson</artifactId>
<version>1.2</version>
<!-- We explicitely exclude jackson-core/databind as we use a more recent
<!-- We explicitly exclude jackson-core/databind as we use a more recent
version than the one geojson-jackson depends on, and the two seems to
be somehow incompatible. -->
<exclusions>
Expand All @@ -577,12 +530,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>com.conveyal</groupId>
<artifactId>jackson2-geojson</artifactId>
<version>0.8</version>
</dependency>

<!-- TESTING -->
<dependency>
<groupId>junit</groupId>
Expand All @@ -596,7 +543,13 @@
<version>1.10.19</version>
<scope>test</scope>
</dependency>

<!-- Provides some shared serializers for Kryo. Introduces transitive dependencies on Guava, Trove, and Kryo. -->
<!-- Also provides classes for testing that a round trip through serialization reproduces the same network. -->
<dependency>
<groupId>com.conveyal</groupId>
<artifactId>kryo-tools</artifactId>
<version>1.2.0</version>
</dependency>
<!-- Jersey annontation-driven REST web services (JAX-RS implementation) -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
Expand Down Expand Up @@ -791,39 +744,17 @@
<artifactId>graphql-java</artifactId>
<version>2.2.0</version>
</dependency>
<!-- Provides annotations like XmlElement indicating how classes should be serialized -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<!-- Support for OTP scripting -->
<dependency>
<groupId>bsf</groupId>
<artifactId>bsf</artifactId>
<version>2.4.0</version>
</dependency>
<!--
Scripting language dependencies such as Groovy and Jython can double the size of the OTP JAR.
Therefore we don't include them by default. You can either update the POM in your fork to include the
scripting dependencies, or simply download them and add them to the classpath on the command line.
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.3.8</version>
</dependency>
<dependency>
<groupId>org.python</groupId>
<artifactId>jython</artifactId>
<version>2.7.0</version>
</dependency>
-->
<!-- OTP 2.0 will adopt routing methods based on those in R5. This also contains a serialization test framework. -->
<dependency>
<groupId>com.conveyal</groupId>
<artifactId>r5</artifactId>
<version>4.4.0</version>
<exclusions>
<exclusion>
<artifactId>slf4j-simple</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

</project>
36 changes: 18 additions & 18 deletions src/main/java/org/opensphere/geometry/algorithm/ConcaveHull.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
import org.opensphere.geometry.triangulation.model.Triangle;
import org.opensphere.geometry.triangulation.model.Vertex;

import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryCollection;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.LineSegment;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.LinearRing;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.geom.Polygon;
import com.vividsolutions.jts.geom.impl.CoordinateArraySequence;
import com.vividsolutions.jts.operation.linemerge.LineMerger;
import com.vividsolutions.jts.triangulate.ConformingDelaunayTriangulationBuilder;
import com.vividsolutions.jts.triangulate.quadedge.QuadEdge;
import com.vividsolutions.jts.triangulate.quadedge.QuadEdgeSubdivision;
import com.vividsolutions.jts.triangulate.quadedge.QuadEdgeTriangle;
import com.vividsolutions.jts.util.UniqueCoordinateArrayFilter;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryCollection;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.LineSegment;
import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.LinearRing;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.geom.impl.CoordinateArraySequence;
import org.locationtech.jts.operation.linemerge.LineMerger;
import org.locationtech.jts.triangulate.ConformingDelaunayTriangulationBuilder;
import org.locationtech.jts.triangulate.quadedge.QuadEdge;
import org.locationtech.jts.triangulate.quadedge.QuadEdgeSubdivision;
import org.locationtech.jts.triangulate.quadedge.QuadEdgeTriangle;
import org.locationtech.jts.util.UniqueCoordinateArrayFilter;

/**
* Computes a concave hull of a {@link Geometry} which is
Expand Down Expand Up @@ -179,11 +179,11 @@ private Geometry concaveHull() {

Collection<QuadEdge> quadEdges = qes.getEdges();
List<QuadEdgeTriangle> qeTriangles = QuadEdgeTriangle.createOn(qes);
Collection<com.vividsolutions.jts.triangulate.quadedge.Vertex> qeVertices =
Collection<org.locationtech.jts.triangulate.quadedge.Vertex> qeVertices =
qes.getVertices(false);

int iV = 0;
for (com.vividsolutions.jts.triangulate.quadedge.Vertex v : qeVertices) {
for (org.locationtech.jts.triangulate.quadedge.Vertex v : qeVertices) {
this.coordinates.put(v.getCoordinate(), iV);
this.vertices.put(iV, new Vertex(iV, v.getCoordinate()));
iV++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.Comparator;
import java.util.Map;

import com.vividsolutions.jts.triangulate.quadedge.QuadEdge;
import org.locationtech.jts.triangulate.quadedge.QuadEdge;

/**
* Comparator of a map containing QuadEdge as key
Expand Down
Loading

0 comments on commit 93861f7

Please sign in to comment.