rdf4j-postgis  Version 0.1.0.0
GPXHandler Class Reference
Inheritance diagram for GPXHandler:
Collaboration diagram for GPXHandler:

Public Member Functions

void startElement (String uri, String localName, String qName, Attributes attributes) throws SAXException
 
void endElement (String uri, String localName, String qName) throws SAXException
 

Public Attributes

List< List< Coordinate > > coordinates =new LinkedList<List<Coordinate>>()
 
Boolean insegment =false
 
Integer currentIndex =0
 

Member Function Documentation

◆ endElement()

void endElement ( String  uri,
String  localName,
String  qName 
) throws SAXException
36  {
37  // TODO Auto-generated method stub
38  super.endElement(uri, localName, qName);
39  switch(qName) {
40  case "trkseg":
41  insegment=false;
42  break;
43  }
44  }

References GPXHandler.insegment.

◆ startElement()

void startElement ( String  uri,
String  localName,
String  qName,
Attributes  attributes 
) throws SAXException
20  {
21  // TODO Auto-generated method stub
22  super.startElement(uri, localName, qName, attributes);
23  switch(qName) {
24  case "trkseg":
25  coordinates.add(new LinkedList<Coordinate>());
26  insegment=true;
27  break;
28  case "trkpt":
29  Coordinate coord=new Coordinate(Double.valueOf(attributes.getValue("lat")),Double.valueOf(attributes.getValue("lon")));
30  coordinates.get(currentIndex).add(coord);
31  break;
32  }
33  }
List< List< Coordinate > > coordinates
Definition: GPXHandler.java:13

References GPXHandler.coordinates, GPXHandler.currentIndex, and GPXHandler.insegment.

Member Data Documentation

◆ coordinates

List<List<Coordinate> > coordinates =new LinkedList<List<Coordinate>>()

◆ currentIndex

Integer currentIndex =0

Referenced by GPXHandler.startElement().

◆ insegment

Boolean insegment =false