<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Chaitanya,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I’m afraid I don’t understand GML enough to know which xlinks need
resolving. :-( How can I determine this?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Also, you mention having to create the ‘.resolved.gml’ file, but
this file isn’t produced by GDAL v1.7.2 – or am I missing something?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Jez<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'> </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Chaitanya kumar CH
[mailto:chaitanya.ch@gmail.com] <br>
<b>Sent:</b> Tuesday 13 July 2010 17:16<br>
<b>To:</b> Jez Walters<br>
<b>Cc:</b> Even Rouault; gdal-dev@lists.osgeo.org; Martin Daly<br>
<b>Subject:</b> Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey
MasterMap<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Jez,<br>
<br>
I'm afraid xlink resolution is currently a slow process and I am still working
out some kinks in it. But if you want to resolve the xlinks you have to go
through creating the .resolved.gml file.<br>
However, you can still make it faster if you think there are some elements with
xlinks which need not be resolved. You just have to mention them using that
option.<br>
Detailed docs are at <a href="http://www.gdal.org/ogr/drv_gml.html">http://www.gdal.org/ogr/drv_gml.html</a>.<o:p></o:p></p>
<div>
<p class=MsoNormal>On Tue, Jul 13, 2010 at 9:39 PM, Jez Walters <<a
href="mailto:Jez.Walters@ipl.com">Jez.Walters@ipl.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'>Chaitanya,</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'>Unfortunately (if I’m understanding you
correctly) I can’t use the GML_SKIP_RESOLVE_ELEMS option, because the OS
MasterMap GML contains <u>lots</u> of elements like this:</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'><osgb:referenceToFeature
xlink:href='#osgb1000001788085778'/></span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'>When you say “this is a quick and dirty
fix”, are you referring to the setting of the GML_SKIP_RESOLVE_ELEMS option, or
do you mean that the latest GDAL code is in some sense temporary?</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'>Jez</span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span
lang=EN-US style='font-size:10.0pt'>From:</span></b><span lang=EN-US
style='font-size:10.0pt'> Chaitanya kumar CH [mailto:<a
href="mailto:chaitanya.ch@gmail.com" target="_blank">chaitanya.ch@gmail.com</a>]<br>
<b>Sent:</b> Tuesday 13 July 2010 16:51<br>
<b>To:</b> Jez Walters<br>
<b>Cc:</b> Even Rouault; <a href="mailto:gdal-dev@lists.osgeo.org"
target="_blank">gdal-dev@lists.osgeo.org</a>; Martin Daly<o:p></o:p></span></p>
<div>
<div>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><br>
<b>Subject:</b> Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey
MasterMap<o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Jez,<br>
<br>
If you don't have any xlinks in your GML files you can skip a bottle-neck by
setting the configuration option GML_SKIP_RESOLVE_ELEMS to ALL. Please note
that this is a quick and dirty fix. The code will change shortly.<o:p></o:p></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On
Tue, Jul 13, 2010 at 9:02 PM, Jez Walters <<a
href="mailto:Jez.Walters@ipl.com" target="_blank">Jez.Walters@ipl.com</a>>
wrote:<o:p></o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Even,<br>
<br>
<br>
My ultimate objective is to read OS MasterMap GML using MapServer, but
MapServer skips various fields when reading this GML directly. I don't
know if this is a fault with GDAL/OGR or with how MapServer is calling it.
In order to overcome this restriction, I've been converting the GML to
ESRI Shapefiles using ogr2ogr. Fortunately, MapServer appears to have no
difficulty reading ESRI Shapefiles! :-)<br>
<br>
I've been playing with your latest GDAL code and the '-splitlistfields' and
'-maxsubfields 1' options let me do this conversion, but it does seem rather
slow now. Please don't misunderstand me, but given that GDAL v1.7.2 works
too without these options it's difficult to see the gain for what I am trying
to achieve.<br>
<br>
Perhaps it would be possible to speed things up by combining the stages that
produce the '.resolved.gml' and '.gfs' files?<o:p></o:p></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br>
<br>
Jez<br>
<br>
<br>
-----Original Message-----<br>
From: Even Rouault [mailto:<a href="mailto:even.rouault@mines-paris.org"
target="_blank">even.rouault@mines-paris.org</a>]<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Sent:
Monday 12 July 2010 22:09<br>
To: <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><o:p></o:p></p>
</div>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Cc: Jez
Walters; 'Martin Daly'<br>
Subject: Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey MasterMap<br>
<br>
Jez,<br>
<br>
if you checkout latest GDAL trunk, you'll find a new -splitlistfields option
for ogr2ogr that will split fields of type IntegerList, RealList or StringList
into as many subfields of single type as necessary. You can also specify
-maxsubfields an_integer_value to limit the number of subfields (can be usefull
if you just want to keep the first element of the list, or to keep the number
of subfields to a reasonable number, as some features from your GML file have a
big number of elements in the list)<br>
<br>
Even<br>
<br>
Le Monday 12 July 2010 20:04:00 Even Rouault, vous avez écrit :<br>
> Jez,<br>
><br>
> Yes this is a limitation of the shapefile format (and most drivers,<br>
> PostgreSQL databases being one of the exceptions).<br>
><br>
> Try adding -fieldTypeToString IntegerList,RealList,StringList to your<br>
> ogr2ogr command line. This will transform any field of those types into a<br>
> String field by concatenating the values into a single string (what you
can<br>
> see with ogrinfo). Beware that if the list if longer more than a few
items,<br>
> there will be a truncation at 80 characters.<br>
><br>
> I'm considering to see if it's practical or not to add an option to
ogr2ogr<br>
> to split fields of type *List into several fields of simple type.<br>
><br>
> Best regards,<br>
><br>
> Even<br>
><br>
> PS: For the record, in <a href="http://download.osgeo.org/gdal/daily/"
target="_blank">http://download.osgeo.org/gdal/daily/</a>, you can find<br>
> daily snapshots of the source code of the trunk (1.8.0dev) and the 1.7<br>
> stable branch.<br>
><br>
> Le Monday 12 July 2010 18:09:16 Jez Walters, vous avez écrit :<br>
> > Even,<br>
> ><br>
> ><br>
> > I've just rebuilt GDAL/OGR using the latest code from the GDAL
'trunk',<br>
> > but now I get the following error using ogr2ogr to convert an OS<br>
> > MasterMap chunk (e.g.<br>
> > <a
href="http://www.ordnancesurvey.co.uk/oswebsite/products/innovations/sampledata"
target="_blank">http://www.ordnancesurvey.co.uk/oswebsite/products/innovations/sampledata</a><br>
> >/O SMasterMap_Topo/58116-SX9192-2c1.gz) into ESRI shapefiles:<br>
> ><br>
> > "ERROR 6: Can't create fields of type StringList on shapefile
layers."<br>
> ><br>
> > The various fields for which this error is reported do not appear to
be<br>
> > in the resultant shapefiles. Unfortunately this makes the new GDAL
code<br>
> > unusable for me. :-(<br>
> ><br>
> > Any thoughts?<br>
> ><br>
> ><br>
> > Jez<br>
> ><br>
> ><br>
> > -----Original Message-----<br>
> > From: Even Rouault [mailto:<a
href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>]<br>
> > Sent: Sunday 11 July 2010 11:12<br>
> > To: <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
> > Cc: Martin Daly; Peter J Halls; Jez Walters<br>
> > Subject: Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey<br>
> > MasterMap<br>
> ><br>
> > Just to inform you that now that the NAS driver is in GDAL trunk,
I've<br>
> > been able to port its enhancements to the main GML driver. On the few<br>
> > samples I've tested, OS Mastermap GML files seem to be read correctly<br>
> > now.<br>
> ><br>
> > See <a href="http://trac.osgeo.org/gdal/ticket/3680" target="_blank">http://trac.osgeo.org/gdal/ticket/3680</a><br>
> ><br>
> > Le Friday 02 July 2010 09:04:38 Martin Daly, vous avez écrit :<br>
> > > > Here it is not only GDAL/OGR that has a
problem! Currently, I<br>
> > > > know of no importer that can handle this construct, other
than the<br>
> > > > tool (from Snowflake) used by OSGB to generate it - and
there is also<br>
> > > > the question of onwards storage.<br>
> > ><br>
> > > Not even close, I'm afraid.<br>
> > ><br>
> > > There are plenty of tools to read (all parts of) OS MM:<br>
> > ><br>
> > > <a
href="http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/informat"
target="_blank">http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/informat</a><br>
> > >io n/ technical/software.html<br>
> > ><br>
> > > e.g. (an excellent one, at a very reasonable price...)<br>
> > ><br>
> > > <a
href="http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/informat"
target="_blank">http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/informat</a><br>
> > >io n/ technical/software/cadcorp.html<br>
> > ><br>
> > > Also, as far as I am aware, OS GB use in-house software to
generate the<br>
> > > data.<br>
> > ><br>
> > > Martin<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>The
information transmitted is intended only for the person<br>
or entity to which it is addressed and may contain<br>
confidential and/or privileged material. If you are not the<br>
addressee, any disclosure, reproduction, copying,<br>
distribution, or other dissemination or use of this<br>
communication is strictly prohibited. If you have received<br>
this transmission in error please notify the sender<br>
immediately and then delete this email.<br>
<br>
Any representations or commitments expressed in this email<br>
are subject to contract.<br>
<br>
This message has been scanned for viruses and dangerous<br>
content. However, it is essential that the recipient also<br>
checks this message using commercially available mail<br>
scanning and anti-virus software. IPL Information Processing<br>
Limited accepts no liability for any loss or damage resulting<br>
from any virus or other dangerous content in this message.<br>
<br>
IPL Information Processing Limited is registered in England<br>
and Wales under company registration number 1418818.<br>
Registration took place at Cardiff on 10 May 1979. IPL<br>
Information Processing Limited's registered office and<br>
normal place of business is Eveleigh House, Grove Street,<br>
Bath, BA1 5LR, United Kingdom. IPL is also registered for<br>
Value Added Tax (VAT) under registration number GB 601 2931 83.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br>
<br clear=all>
<br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
/t<span style='font-family:"MS Mincho"'>ʃ</span>a<span style='font-family:"MS Mincho"'>ɪ</span>θənjə/
/k<span style='font-family:"MS Mincho"'>ʊ</span>m<span style='font-family:"MS Mincho"'>ɑ</span>r/
<br>
+91-9494447584<br>
17.2416N 80.1426E<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<div>
<p><span style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#999999'>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.<o:p></o:p></span></p>
<p><span style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#999999'>Any
representations or commitments expressed in this email are subject to contract.<o:p></o:p></span></p>
<p><span style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#999999'>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.<o:p></o:p></span></p>
<p><span style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#999999'>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.<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<p class=MsoNormal><br>
<br clear=all>
<br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
/t<span style='font-family:"MS Mincho"'>ʃ</span>a<span style='font-family:"MS Mincho"'>ɪ</span>θənjə/
/k<span style='font-family:"MS Mincho"'>ʊ</span>m<span style='font-family:"MS Mincho"'>ɑ</span>r/
<br>
+91-9494447584<br>
17.2416N 80.1426E<o:p></o:p></p>
</div>
<body>
<p
style="font-size: 8pt; color: rgb(153, 153, 153); font-family: Arial;">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.</p>
<p
style="font-size: 8pt; color: rgb(153, 153, 153); font-family: Arial;">Any
representations or commitments expressed in this email are subject to
contract.</p>
<p
style="font-size: 8pt; color: rgb(153, 153, 153); font-family: Arial;">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.</p>
<p
style="font-size: 8pt; color: rgb(153, 153, 153); font-family: Arial;">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.</p>
</body>
</body>
</html>