[gdal-dev] ogr2ogr problem converting UK Ordnance Survey
MasterMap
Chaitanya kumar CH
chaitanya.ch at gmail.com
Tue Jul 13 12:15:31 EDT 2010
Jez,
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.
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.
Detailed docs are at http://www.gdal.org/ogr/drv_gml.html.
On Tue, Jul 13, 2010 at 9:39 PM, Jez Walters <Jez.Walters at ipl.com> wrote:
> Chaitanya,
>
>
>
> Unfortunately (if I’m understanding you correctly) I can’t use the
> GML_SKIP_RESOLVE_ELEMS option, because the OS MasterMap GML contains *lots
> * of elements like this:
>
>
>
> <osgb:referenceToFeature xlink:href='#osgb1000001788085778'/>
>
>
>
> 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?
>
>
>
>
>
> Jez
>
>
>
>
>
> *From:* Chaitanya kumar CH [mailto:chaitanya.ch at gmail.com]
> *Sent:* Tuesday 13 July 2010 16:51
> *To:* Jez Walters
> *Cc:* Even Rouault; gdal-dev at lists.osgeo.org; Martin Daly
>
> *Subject:* Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey
> MasterMap
>
>
>
> Jez,
>
> 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.
>
> On Tue, Jul 13, 2010 at 9:02 PM, Jez Walters <Jez.Walters at ipl.com> wrote:
>
> Even,
>
>
> 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! :-)
>
> 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.
>
> Perhaps it would be possible to speed things up by combining the stages
> that produce the '.resolved.gml' and '.gfs' files?
>
>
>
> Jez
>
>
> -----Original Message-----
> From: Even Rouault [mailto:even.rouault at mines-paris.org]
>
> Sent: Monday 12 July 2010 22:09
> To: gdal-dev at lists.osgeo.org
>
> Cc: Jez Walters; 'Martin Daly'
> Subject: Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey
> MasterMap
>
> Jez,
>
> 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)
>
> Even
>
> Le Monday 12 July 2010 20:04:00 Even Rouault, vous avez écrit :
> > Jez,
> >
> > Yes this is a limitation of the shapefile format (and most drivers,
> > PostgreSQL databases being one of the exceptions).
> >
> > Try adding -fieldTypeToString IntegerList,RealList,StringList to your
> > ogr2ogr command line. This will transform any field of those types into a
> > String field by concatenating the values into a single string (what you
> can
> > see with ogrinfo). Beware that if the list if longer more than a few
> items,
> > there will be a truncation at 80 characters.
> >
> > I'm considering to see if it's practical or not to add an option to
> ogr2ogr
> > to split fields of type *List into several fields of simple type.
> >
> > Best regards,
> >
> > Even
> >
> > PS: For the record, in http://download.osgeo.org/gdal/daily/, you can
> find
> > daily snapshots of the source code of the trunk (1.8.0dev) and the 1.7
> > stable branch.
> >
> > Le Monday 12 July 2010 18:09:16 Jez Walters, vous avez écrit :
> > > Even,
> > >
> > >
> > > I've just rebuilt GDAL/OGR using the latest code from the GDAL 'trunk',
> > > but now I get the following error using ogr2ogr to convert an OS
> > > MasterMap chunk (e.g.
> > >
> http://www.ordnancesurvey.co.uk/oswebsite/products/innovations/sampledata
> > >/O SMasterMap_Topo/58116-SX9192-2c1.gz) into ESRI shapefiles:
> > >
> > > "ERROR 6: Can't create fields of type StringList on shapefile layers."
> > >
> > > The various fields for which this error is reported do not appear to be
> > > in the resultant shapefiles. Unfortunately this makes the new GDAL code
> > > unusable for me. :-(
> > >
> > > Any thoughts?
> > >
> > >
> > > Jez
> > >
> > >
> > > -----Original Message-----
> > > From: Even Rouault [mailto:even.rouault at mines-paris.org]
> > > Sent: Sunday 11 July 2010 11:12
> > > To: gdal-dev at lists.osgeo.org
> > > Cc: Martin Daly; Peter J Halls; Jez Walters
> > > Subject: Re: [gdal-dev] ogr2ogr problem converting UK Ordnance Survey
> > > MasterMap
> > >
> > > Just to inform you that now that the NAS driver is in GDAL trunk, I've
> > > been able to port its enhancements to the main GML driver. On the few
> > > samples I've tested, OS Mastermap GML files seem to be read correctly
> > > now.
> > >
> > > See http://trac.osgeo.org/gdal/ticket/3680
> > >
> > > Le Friday 02 July 2010 09:04:38 Martin Daly, vous avez écrit :
> > > > > Here it is not only GDAL/OGR that has a problem! Currently, I
> > > > > know of no importer that can handle this construct, other than the
> > > > > tool (from Snowflake) used by OSGB to generate it - and there is
> also
> > > > > the question of onwards storage.
> > > >
> > > > Not even close, I'm afraid.
> > > >
> > > > There are plenty of tools to read (all parts of) OS MM:
> > > >
> > > >
> http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/informat
> > > >io n/ technical/software.html
> > > >
> > > > e.g. (an excellent one, at a very reasonable price...)
> > > >
> > > >
> http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/informat
> > > >io n/ technical/software/cadcorp.html
> > > >
> > > > Also, as far as I am aware, OS GB use in-house software to generate
> the
> > > > data.
> > > >
> > > > Martin
>
> 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.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
> /tʃaɪθənjə/ /kʊmɑr/
> +91-9494447584
> 17.2416N 80.1426E
>
> 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.
>
--
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100713/74f46114/attachment.html
More information about the gdal-dev
mailing list