Example
Netex_gtfs_exm1_Shapes_1.xml
standards/gtfs/Netex_gtfs_exm1_Shapes_1.xml
Element names link to their declarations.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ==== GTFS Shapes to NeTEx Example ======
This Example provides an example of mapping of a GTFS Shapes.txt file to NeTEx
The data comes from the sample-feed.zip available at http://code.google.com/transit/spec/transit_feed_specification.html
1. DATA
Shapes.txt
shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence,shape_dist_traveled
AB2o,53.00, 1.00,1,100
AB2o,53.10, 1.10,2,120
AB2o,53.20, 1.20,3,130
CITY,53.00, 1.00,1,100
CITY,53.10, 1.10,2,120
CITY,53.20, 1.20,3,130
2. MAPPING
A GTFS Shape maps to a NeTEx gml:LineString
GTFS NeTEx
shape_id, <LinkSequenceProjection #shape_id> @id <gml:LineString #shape_id">
shape_pt_lat, <LinkSequenceProjection #shape_id><gml:LineString #shape_id><gml:pos >'#shape_pt_lat
shape_pt_lon,shape_pt_lat, <LinkSequenceProjection #shape_id><gml:LineString ><gml:pos >y </gml:pos>
shape_pt_sequence, (pml ordered collection)
shape_dist_traveled <LinkSequenceProjection #shape_id><Distance> #shape_dist_traveled
3. Notes
LinkSequenceProjection (Added) Can be derived from projection of individual links and points
GTFS Data copyright Google Inc
version 1.1 revised ids
NeTEx (C) CEN Copyright 2010-2019
-->
<PublicationDelivery xmlns="http://www.netex.org.uk/netex" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://www.netex.org.uk/netex ../../../xsd/NeTEx_publication.xsd">
<PublicationTimestamp>2001-12-17T09:30:47.0Z</PublicationTimestamp>
<ParticipantRef>SYS001</ParticipantRef>
<!--- ======WHAT WAS REQUESTED ========== -->
<PublicationRequest version="1.0">
<RequestTimestamp>2001-12-17T09:30:47.0Z</RequestTimestamp>
<ParticipantRef>SYS002</ParticipantRef>
</PublicationRequest>
<PublicationRefreshInterval>P3M</PublicationRefreshInterval>
<Description>Example of GTFS Shape data shapes.txt file)</Description>
<!--- =============== RESULTS =========== -->
<dataObjects>
<TimetableFrame version="any" id="mygtfsxm:DTA">
<!--- ======= CODESPACEs======== -->
<codespaces>
<Codespace id="mygtfsxm">
<Xmlns>mygtfsxm</Xmlns>
<XmlnsUrl>http://www.demoagency.com/</XmlnsUrl>
<Description>Demo Agency</Description>
</Codespace>
</codespaces>
<!--- =======FRAME DEFAULTS======== -->
<FrameDefaults>
<DefaultCodespaceRef ref="mygtfsxm"/>
</FrameDefaults>
<vehicleJourneys>
<ServiceJourney version="any" id="mygtfsxm:AB2o">
<LinkSequenceProjection version="any" id="mygtfsxm:AB2o">
<gml:LineString srsName="WGS84" gml:id="AB2o">
<gml:pos>53.00 1.00</gml:pos>
<gml:pos>53.10 1.10</gml:pos>
<gml:pos>53.20 1.20</gml:pos>
</gml:LineString>
</LinkSequenceProjection>
</ServiceJourney>
<ServiceJourney version="any" id="mygtfsxm:CITY">
<LinkSequenceProjection version="any" id="mygtfsxm:CITY">
<gml:LineString srsName="WGS84" gml:id="CITY">
<gml:pos>53.00 1.00</gml:pos>
<gml:pos>53.10 1.10</gml:pos>
<gml:pos>53.20 1.20</gml:pos>
</gml:LineString>
</LinkSequenceProjection>
</ServiceJourney>
</vehicleJourneys>
</TimetableFrame>
</dataObjects>
</PublicationDelivery>