On Tue, 11 Dec 2012, Donald Noble wrote:
I tried downloading the XML file from data.gov.uk:

The XML file is mentioned at:
   http://data.gov.uk/dataset/naptan
and it is available as a zip file at:
   http://www.dft.gov.uk/NaPTAN/snapshot/NaPTANxml.zip
I think it gets regularly updated.

but when I opened it the 500MB file was all on the second line, apart from the XML version tag on the first line. This meant I struggled to even look at the file to see if I could do anything useful with it. 

The file NaPTANxml.zip is about 31MB and, as you say, after unzipping it NaPTAN.xml is about 500MB. If you're using linux, you can format NaPTAN.xml using:
   xmllint --format NaPTAN.xml >format.xml
The file format.xml is about 750MB.  I think xmllint is in the debian
package called libxml2-utils.

Therefore I was wondering if anyone has (or is able to produce) an extract for the area around Glasgow (or even for Scotland) preferably already in osm format that I could use.

I haven't done that. However, in case it's of any use, I've put a zipped version of format.xml at:
   http://www.rowmaps.com/temporary/format.zip
It's about 36MB. I regard this directory as a temporary space and so I will delete this file later. Regard it as having the same licence as the original file:
   http://www.nationalarchives.gov.uk/doc/open-government-licence/

To whet your appetite, here's an extract:
    <StopPoint CreationDateTime="2003-08-27T00:00:00" ModificationDateTime="2012-07-02T14:24:40" 
Modification="new" RevisionNumber="0" Status="active">
      <AtcoCode>60901000</AtcoCode>
      <NaptanCode>45238737</NaptanCode>
      <Descriptor>
        <CommonName>Balmore Square</CommonName>
        <Landmark>Balmore Square</Landmark>
        <Street>Balmore Road</Street>
        <Indicator>before</Indicator>
      </Descriptor>
      <Place>
        <NptgLocalityRef>N0076070</NptgLocalityRef>
        <Town>Glasgow</Town>
        <LocalityCentre>1</LocalityCentre>
        <Location>
          <Translation>
            <GridType>UKOS</GridType>
            <Easting>258877</Easting>
            <Northing>668372</Northing>
            <Longitude>-4.2579340692</Longitude>
            <Latitude>55.8877326565</Latitude>
          </Translation>
        </Location>
      </Place>
      <StopClassification>
        <StopType>BCT</StopType>
        <OnStreet>
          <Bus>
            <BusStopType>MKD</BusStopType>
            <TimingStatus>OTH</TimingStatus>
            <MarkedPoint>
              <Bearing>
                <CompassPoint>NW</CompassPoint>
              </Bearing>
            </MarkedPoint>
          </Bus>
        </OnStreet>
      </StopClassification>
      <StopAreas>
        <StopAreaRef CreationDateTime="2012-11-28T15:27:31" Modification="new" 
Status="active">609G04088</StopAreaRef>
      </StopAreas>
      <AdministrativeAreaRef>127</AdministrativeAreaRef>
      <PlusbusZones>
        <PlusbusZoneRef CreationDateTime="2010-10-07T14:27:15" ModificationDateTime="2010-10-07T14:27:15" 
Modification="new" RevisionNumber="0" Status="active">GLGC</PlusbusZoneRef>
      </PlusbusZones>
    </StopPoint>

There's some explanation at:
   http://www.dft.gov.uk/naptan/schema/2.1/guide/naptan-070325.doc

--
Barry Cornelius
http://www.northeastraces.com/
http://www.thehs2.com/
http://www.rowmaps.com/
http://www.oxonpaths.com/
http://www.barrycornelius.com/
_______________________________________________
Talk-GB mailing list
Talk-GB@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-gb

Reply via email to