Loading ...
Sorry, an error occurred while loading the content.
 

private elements

Expand Messages
  • jeetsukumaran
    Hello. My geodata has some additional information that I wish to save along with the standard fields offered by gpx. From what I can make out, I should declare
    Message 1 of 3 , Aug 1, 2003
      Hello.

      My geodata has some additional information that I wish to save along
      with the standard fields offered by gpx. From what I can make out, I
      should declare a namespace to hold my private elements.

      Sounds kinky ... and I have no idea how to do it!

      Could someone please help, by, for example, showing me how the
      following information might be encoded:

      Waypoint:
      Name:BRIDGE
      Lat: 2.20321
      Lon: 101.22322
      Ele: 212.00
      Time: 2003-08-01T13:00Z
      Desc: Cross it when we come to it
      Src: Garmin e-Trex

      I want to add:
      Keywords: Peat-swamp; conservation; project; river; survey;
      RSOEasting: EEEEEEE
      RSONorthing: NNNNNNN
      Category: Survey


      I know this much -

      <wpt lat="2.20321" lon="101.22322">
      <ele>212.00</ele>
      <time>2003-08-01T13:00Z</time>
      <name>BRIDGE</name>
      <desc>Cross it when we come to it</desc>
      <sym>Crossing</sym>
      <wpt>

      How do I add the fields above? What file headers do I need to place
      at the top of the gpx file? What elements do I add to the <wpt>
      element?

      Thanks!

      -- jeet
    • davewissenbach
      ... along ... I ... Peat-swamp; conservation; project; river; survery; EEEEEE
      Message 2 of 3 , Aug 2, 2003
        --- In gpsxml@yahoogroups.com, "jeetsukumaran" <jeetsukumaran@p...>
        wrote:
        > Hello.
        >
        > My geodata has some additional information that I wish to save
        along
        > with the standard fields offered by gpx. From what I can make out,
        I
        > should declare a namespace to hold my private elements.
        >
        > Sounds kinky ... and I have no idea how to do it!
        >
        > Could someone please help, by, for example, showing me how the
        > following information might be encoded:
        >
        > Waypoint:
        > Name:BRIDGE
        > Lat: 2.20321
        > Lon: 101.22322
        > Ele: 212.00
        > Time: 2003-08-01T13:00Z
        > Desc: Cross it when we come to it
        > Src: Garmin e-Trex
        >
        > I want to add:
        > Keywords: Peat-swamp; conservation; project; river; survey;
        > RSOEasting: EEEEEEE
        > RSONorthing: NNNNNNN
        > Category: Survey
        >
        >
        > I know this much -
        >
        > <wpt lat="2.20321" lon="101.22322">
        > <ele>212.00</ele>
        > <time>2003-08-01T13:00Z</time>
        > <name>BRIDGE</name>
        > <desc>Cross it when we come to it</desc>
        > <sym>Crossing</sym>
        <kinky:Keywords>Peat-swamp; conservation; project; river;
        survery;</kinky:Keywords>
        <kinky:RSOEasting>EEEEEE</kinky:RSOEasting>
        <kinky:RSONorthing>NNNNN</kinky:RSONORTHING>
        <kinky:Category>Survery</kinky:Category>
        > <wpt>
        >
        > How do I add the fields above? What file headers do I need to
        place
        > at the top of the gpx file?

        For a header, use this

        <gpx
        xmlns="http://www.topografix.com/GPX/1/0"
        version="1.0" creator="Wissenbach Map3D 2.8"
        xmlns:kinky="http://www.sukumarin.com/kinky"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.topografix.com/GPX/1/0
        http://www.topografix.com/GPX/1/0/gpx.xsd
        http://www.sukumarin.com/kinky
        http://www.sukumarin.com/kinky/kinky.xsd">

        Then at the schema location for the namespace listed, you provide an
        XML Schema, which looks
        something like this:

        <?xml version="1.0" encoding="utf-8"?>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://wwww.sukumarin.com/kinky"
        xmlns="http://www.sukumarin.com/kinky"
        elementFormDefault="qualified">

        <annotation><documentation>
        This schema describes the extensions to the public gpx
        format used in the
        Map program by Jeet. Every element in the gpx format allows
        the insertion of element content, from another namespace. For
        example,
        Kinky adds Easting, Northing, and
        Category</documentation></annotation>

        <xs:element name="RSAEasting" type="xs:string" minOccurs="0" />
        <xs:element name="RSANorthing" type="xs:string" minOccurs="0" />
        <xs:element name="Category" type="xs:string" minOccurs="0" />

        </xs:schema>

        In your gpx document, kinky: is shorthand for your namespace
        http://www.sukumarin.com/kinky.

        I'd suggest that you get a book on XML Schema, such as Wrox Press's
        XML Schema, which is where I learned this. (But some of this comes
        from trial and error.

        What elements do I add to the <wpt>
        > element?
        >
        > Thanks!
        >
        > -- jeet
      • jeetsukumaran
        Thanks! This helps a lot. XML might as well be Sumerian to me, right now ... so you are right, I do have to read up on it. I plan to use the MS xml parser to
        Message 3 of 3 , Aug 2, 2003
          Thanks! This helps a lot. XML might as well be Sumerian to me, right
          now ... so you are right, I do have to read up on it.

          I plan to use the MS xml parser to parse gpx files. Just out of
          curiosity, what files do I have to include with my program when I
          redistribute it? The MS documentation is a little confusing,
          referring to installer merge files and the like.

          -- jeet

          --- In gpsxml@yahoogroups.com, "davewissenbach" <davewissenbach@y...>
          wrote:
          > --- In gpsxml@yahoogroups.com, "jeetsukumaran" <jeetsukumaran@p...>
          > wrote:
          > > Hello.
          > >
          > > My geodata has some additional information that I wish to save
          > along
          > > with the standard fields offered by gpx. From what I can make
          out,
          > I
          > > should declare a namespace to hold my private elements.
          > >
          > > Sounds kinky ... and I have no idea how to do it!
          > >
          > > Could someone please help, by, for example, showing me how the
          > > following information might be encoded:
          > >
          > > Waypoint:
          > > Name:BRIDGE
          > > Lat: 2.20321
          > > Lon: 101.22322
          > > Ele: 212.00
          > > Time: 2003-08-01T13:00Z
          > > Desc: Cross it when we come to it
          > > Src: Garmin e-Trex
          > >
          > > I want to add:
          > > Keywords: Peat-swamp; conservation; project; river; survey;
          > > RSOEasting: EEEEEEE
          > > RSONorthing: NNNNNNN
          > > Category: Survey
          > >
          > >
          > > I know this much -
          > >
          > > <wpt lat="2.20321" lon="101.22322">
          > > <ele>212.00</ele>
          > > <time>2003-08-01T13:00Z</time>
          > > <name>BRIDGE</name>
          > > <desc>Cross it when we come to it</desc>
          > > <sym>Crossing</sym>
          > <kinky:Keywords>Peat-swamp; conservation; project; river;
          > survery;</kinky:Keywords>
          > <kinky:RSOEasting>EEEEEE</kinky:RSOEasting>
          > <kinky:RSONorthing>NNNNN</kinky:RSONORTHING>
          > <kinky:Category>Survery</kinky:Category>
          > > <wpt>
          > >
          > > How do I add the fields above? What file headers do I need to
          > place
          > > at the top of the gpx file?
          >
          > For a header, use this
          >
          > <gpx
          > xmlns="http://www.topografix.com/GPX/1/0"
          > version="1.0" creator="Wissenbach Map3D 2.8"
          > xmlns:kinky="http://www.sukumarin.com/kinky"
          > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          > xsi:schemaLocation="http://www.topografix.com/GPX/1/0
          > http://www.topografix.com/GPX/1/0/gpx.xsd
          > http://www.sukumarin.com/kinky
          > http://www.sukumarin.com/kinky/kinky.xsd">
          >
          > Then at the schema location for the namespace listed, you provide
          an
          > XML Schema, which looks
          > something like this:
          >
          > <?xml version="1.0" encoding="utf-8"?>
          > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
          > targetNamespace="http://wwww.sukumarin.com/kinky"
          > xmlns="http://www.sukumarin.com/kinky"
          > elementFormDefault="qualified">
          >
          > <annotation><documentation>
          > This schema describes the extensions to the public gpx
          > format used in the
          > Map program by Jeet. Every element in the gpx format allows
          > the insertion of element content, from another namespace. For
          > example,
          > Kinky adds Easting, Northing, and
          > Category</documentation></annotation>
          >
          > <xs:element name="RSAEasting" type="xs:string" minOccurs="0" />
          > <xs:element name="RSANorthing" type="xs:string" minOccurs="0" />
          > <xs:element name="Category" type="xs:string" minOccurs="0" />
          >
          > </xs:schema>
          >
          > In your gpx document, kinky: is shorthand for your namespace
          > http://www.sukumarin.com/kinky.
          >
          > I'd suggest that you get a book on XML Schema, such as Wrox Press's
          > XML Schema, which is where I learned this. (But some of this comes
          > from trial and error.
          >
          > What elements do I add to the <wpt>
          > > element?
          > >
          > > Thanks!
          > >
          > > -- jeet
        Your message has been successfully submitted and would be delivered to recipients shortly.