Search in sources :

Example 1 with LinkSequenceProjection

use of org.rutebanken.netex.model.LinkSequenceProjection in project OpenTripPlanner by opentripplanner.

the class ServiceLinkMapperTest method createServiceLink.

private ServiceLink createServiceLink(String id, double distance, Double[] coordinates) {
    DirectPositionListType directPositionListType = new DirectPositionListType().withValue(coordinates);
    LinkSequenceProjection linkSequenceProjection = new LinkSequenceProjection().withLineString(new LineStringType().withPosList(directPositionListType));
    JAXBElement<LinkSequenceProjection_VersionStructure> linkSequenceProjection_versionStructure = MappingSupport.createJaxbElement(linkSequenceProjection);
    Projections_RelStructure projections_relStructure = new Projections_RelStructure().withProjectionRefOrProjection(linkSequenceProjection_versionStructure);
    return new ServiceLink().withId(id).withDistance(new BigDecimal(distance)).withProjections(projections_relStructure);
}
Also used : LinkSequenceProjection(org.rutebanken.netex.model.LinkSequenceProjection) DirectPositionListType(net.opengis.gml._3.DirectPositionListType) Projections_RelStructure(org.rutebanken.netex.model.Projections_RelStructure) LinkSequenceProjection_VersionStructure(org.rutebanken.netex.model.LinkSequenceProjection_VersionStructure) ServiceLink(org.rutebanken.netex.model.ServiceLink) LineStringType(net.opengis.gml._3.LineStringType) BigDecimal(java.math.BigDecimal)

Aggregations

BigDecimal (java.math.BigDecimal)1 DirectPositionListType (net.opengis.gml._3.DirectPositionListType)1 LineStringType (net.opengis.gml._3.LineStringType)1 LinkSequenceProjection (org.rutebanken.netex.model.LinkSequenceProjection)1 LinkSequenceProjection_VersionStructure (org.rutebanken.netex.model.LinkSequenceProjection_VersionStructure)1 Projections_RelStructure (org.rutebanken.netex.model.Projections_RelStructure)1 ServiceLink (org.rutebanken.netex.model.ServiceLink)1