[gdal-dev] ogr2ogr problem converting UK Ordnance Survey MasterMap

Jez Walters Jez.Walters at ipl.com
Wed Jun 30 11:17:12 EDT 2010


Frank,


Thanks for looking in to this!  I've just repeated the problem with the Ordnance Survey sample MasterMap, which is available from here:

http://www.ordnancesurvey.co.uk/oswebsite/products/innovations/sampledata/OSMasterMap_Topo/58116-SX9192-2c1.gz

I tried converting the above GML to ESRI shapefile using the following command:

ogr2ogr SX9192 58116-SX9192-2c1

One thing I've noticed is that the schema referenced in the GML (http://www.ordnancesurvey.co.uk/xml/schema/v7/OSDNFFeatures.xsd) defines a number of elements called "complexType".  The "complexType" element with a name of "CartographicTextType" is defined like this:

<complexType name="CartographicTextType">
	<complexContent>
		<extension base="osgb:AbstractFeatureType">
			<sequence>
				<element name="anchorPoint" type="gml:PointPropertyType"/>
				<element name="changeHistory" type="osgb:changeHistoryType" maxOccurs="unbounded"/>
				<element name="descriptiveGroup" type="osgb:descriptiveGroupType" minOccurs="0" maxOccurs="unbounded"/>
				<element name="descriptiveTerm" type="string" minOccurs="0" maxOccurs="unbounded"/>
				<element name="make" type="osgb:makeType" minOccurs="0"/>
				<element name="physicalLevel" type="osgb:physicalLevelType"/>
				<element name="physicalPresence" type="osgb:physicalPresenceType" minOccurs="0"/>
				<element name="textRendering" type="osgb:textRenderingType"/>
				<element name="textString" type="string"/>
			</sequence>
		</extension>
	</complexContent>
</complexType>

>From which I conclude that the orientation is actually part of the "textRendering" element.  I'm sure I'm on to something with this, but I'm not sure how to proceed from here!


Warm regards,


Jez


-----Original Message-----
From: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com] On Behalf Of Frank Warmerdam
Sent: Wednesday 30 June 2010 15:38
To: Jez Walters
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey MasterMap

Jez,

Can you provide a mastermap file I can test with?

Best regards,

On Wed, Jun 30, 2010 at 4:31 PM, Jez Walters <jez.walters at ipl.com> wrote:
>
> Not quite sure if I've got the right forum, but I'm having trouble using the
> 'ogr2ogr' utility (part of GDAL 1.7.2) to convert Ordnance Survey GML into
> ESRI shapefiles.
>
> The 'orientation' field is being ignored when I convert the CartographicText
> layer, although this field gets successfully translated for the
> CartographicSymbol layer.  All the other CartographicText layer fields
> appear just fine in the generated '.dbf' file.
>
> Is there a way of forcing ogr2ogr to recognise the orientation field?  Can
> anyone suggest an alternative Open Source conversion utility?  I'm fairly
> new to GIS systems, so I might be making an obvious mistake, but any advice
> is very gratefully received!  :-)
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/ogr2ogr-problem-converting-UK-Ordnance-Survey-MasterMap-tp5237796p5237796.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


The information transmitted is intended only for the person
or entity to which it is addressed and may contain
confidential and/or privileged material. If you are not the
addressee, any disclosure, reproduction, copying,
distribution, or other dissemination or use of this
communication is strictly prohibited. If you have received
this transmission in error please notify the sender
immediately and then delete this email.

Any representations or commitments expressed in this email
are subject to contract.

This message has been scanned for viruses and dangerous
content. However, it is essential that the recipient also
checks this message using commercially available mail
scanning and anti-virus software. IPL Information Processing
Limited accepts no liability for any loss or damage resulting
from any virus or other dangerous content in this message.

IPL Information Processing Limited is registered in England
and Wales under company registration number 1418818.
Registration took place at Cardiff on 10 May 1979. IPL
Information Processing Limited's registered office and
normal place of business is Eveleigh House, Grove Street,
Bath, BA1 5LR, United Kingdom. IPL is also registered for
Value Added Tax (VAT) under registration number GB 601 2931 83.



More information about the gdal-dev mailing list