Skip to main content
I'm currently trying to read in some GML (as a first step to doing some more complex transformations on it), and I'm having some issues with reading it in, different depending on which method I've attempted to use.

 

 

The file i'm trying to read in is an OSVectorMap District gml

 

First method:

 

 

Using the normal GML reader, I'm attempthing to read the file in, and pull the .xsd file from the Ordnance survey's website and I'm the error below. I know that I don't need proxy settings as I've used this method to read in OSVectorMap Local files in the past

 

HTTP transfer error: 'Failure when receiving data from the peer'

 

Please ensure that your network connection is properly set up

 

No proxy settings have been entered. If you require a proxy to access external URLs, please ensure the appropriate information has been entered

 

Second Method:

 

 

 

The second method I’ve tried was to download the OSVectorMap District .xsd file, and alter the xml to reference it locally, storing it in the same place as the gml files.

 

 

 

This produces a different result

 

 

 

<GML Reader> - No explicit XML Schema specified (through the XSD_DOC keyword) nor an xsi:schemaLocation or xsi:noNamespaceSchemaLocation were found in dataset 'Y:\\MAPINFO\\CORPWORK\\VM_District\\2013April\\OS VectorMap District (GML) SO\\data\\SO06.gml', determining schema files from the dataset XML namespace declarations...

 

XSD semantics configuration file: 'file:///C:/Program Files/FME/xml/gml_v3.2/nas_config.xml' including 'gml_config.xml'

 

<GML Reader> - Mapping embedded objects as 'ATTRIBUTES'

 

<GML Reader> - Mapping complex properties as 'NESTED_ATTRIBUTES'

 

<GML Reader> - No GML features were found in the set of XML Schemas, make sure that at least one of the schemas is a user, domain or community-specific "GML Application Schema".

 

 

 

 

 

I’m a bit stumped as to why either of these errors are appearing, so some help/ guidance would be appreciated

 

Have you tried the OS VectorMap District reader?
This should remove some of your troubles:

 

 

 


Thanks for the response about OS VectorMap District reader, I feel a bit silly not knowing that existed.

 

 

 

 

 

I've tried that using both of the methods and whilst Method one still can't see the online schema, Method two is gives

 

 

<GML Reader> - No explicit XML Schema specified (through the XSD_DOC keyword) nor an xsi:schemaLocation or xsi:noNamespaceSchemaLocation were found in dataset 'Y:/MAPINFO/CORPWORK/VM_District/2013April/OS VectorMap District (GML) SO/data/SO06.gml', determining schema files from the dataset XML namespace declarations...

<GML Reader> - Using the old GML 3.1.1 reader to read v3.1.1 and v2.1.2 documents.

Then I get a list of Reader Parameters and mapping file lines, and finally i get.

 

 

 

UniversalReader -- readSchema resulted in 0 schema features being returned

 

Merged 0 schema features read from 1 datasets into 0 resulting feature types

 

Opened mapping File C:\\....\\Temp\\FME_1365167604994_1120.fmw for output

 

Mapping File Generation was SUCCESSFUL

 

Mapping File Generation was SUCCESSFUL

 

FME Session Duration: 4.7 seconds. (CPU: 1.0s user, 0.7s system)

 

END - ProcessID: 2304, peak process memory usage: 66772 kB, current process memory usage: 66004 kB

 

 

Any other ideas as to what is going on?
I've never tried the Vectormap District reader, but we've always had to alter the gml files to reference the xsd etc. locally.

 

 

Top of our gml looks something like this

 

 

<osgb:FeatureCollection xmlns:osgb='http://node16/OSVector' xmlns:gml='http://www.opengis.net/gml' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://node16/OSVector http://node16/OSVector/CMDFeatures.xsd' fid='sk34ne'>
I don't think VMD has gone through more than 1 iteration, whilst VML has had a couple of versions, so I doubt it's a versioning issue. Can you view the data in the Universal Viewer?

 

 

VMD XSD is here: http://www.ordnancesurvey.co.uk/oswebsite/xml/cmdschema/district/index.html

 

 

I'll download some current VMD and take a look.
Ok, well I have no problem here. FME downloads the XSD and stores it locally and then parses it. You must be able to ape this in some way manually rather than manually changing all your headers... The log goes something like this:

 

 

HTTP Transfer: Downloading resource 'http://www.ordnancesurvey.co.uk/xml/cmdschema/district/v1/OSVectorMapDistrict.xsd' to local file 'C:\\_FME\\FME_TEMP\\FME_XSD_CACHE\\fmexsd_1365170929468_10192.xml' HTTP transfer summary - download-size: '19253 bytes', download-time: '0.156 seconds', url: 'http://www.ordnancesurvey.co.uk/xml/cmdschema/district/v1/OSVectorMapDistrict.xsd' 'http://www.ordnancesurvey.co.uk/xml/cmdschema/district/v1/OSVectorMapDistrict.xsd' mapped to 'C:\\_FME\\FME_TEMP\\FME_XSD_CACHE\\fmexsd_1365170929468_10192.xml' Parsing schema document 'C:\\_FME\\FME_TEMP\\FME_XSD_CACHE\\fmexsd_1365170929468_10192.xml' ...

 

I suggest you raise this issue as a formal ticket with Safe to see if they can help, or if you're lucky someone else will chime in with the answer here!

 

 
Right, this is quick and dirty, but you are welcome to try it. The first time you sucessfully connect FME appears to download the XSD, parse it and then add a pointer into a SQLLite DB in the same folder.

 

 

Go to your FME temporary directory and find the folder FME_XSD_CACHE. Zip up what's there and extract this for FME 2013, its a copy of my database having successfully parsed the XSD. Then try to read your data:

 

 

http://goo.gl/oQxZI

 

 

This is not an ideal approach though as you may at any time flush your temp files, so I'd suggest picking it up with Safe anyway.
If only you could edit your posts on this list... I meant to add that if you define an environment variable on your machine as FME_TEMP you'll have no problem finding where your temp files are going as you'll have set the location. Frankly this is best practice anyway, more here:

 

 

http://fmepedia.safe.com/articles/FAQ/FME-TEMP-environment-variable

 


Hi - I've been having some similar problems to do with the xsd.

 

I've followed Dave's suggestions and changed the local temp directory , defined as a system variable but getting the following error message:

 

 

 

URI 'http://www.ordnancesurvey.co.uk/xml/cmdschema/district/v1/OSVectorMapDistrict.xsd' mapped to 'http://www.ordnancesurvey.co.uk/xml/cmdschema/district/v1/OSVectorMapDistrict.xsd'

 

HTTP transfer error: 'Couldn't resolve host name'

 

Please ensure that your network connection is properly set up

 

No proxy settings have been entered.  If you require a proxy to access external URLs, please ensure the appropriate information has been entered

 

UniversalReader -- readSchema resulted in 0 schema features being returned

 

 

 

The C:\\Temp\\FME_XSD_CACHE  folder is created, with two files a url_resource database and an fmexsd xml file

 

 

so that looks to be ok ....

 

 

Any ideas yadda yadda  .............

 

 

Ta,

 

 

Bruce

Reply