[gdal-dev] Importing KML to Mysql with extended data fields
Shawn L
shawn at rmrf.us
Thu May 26 09:44:51 PDT 2016
That did the trick. What would the syntax be to create new KML based on the
output of a SQL query be then?
thanks
On Thu, May 26, 2016 at 11:27 AM, Even Rouault <even.rouault at spatialys.com>
wrote:
> Shawn
>
> I suppose that your GDAL build has only the KML driver built in. It doesn't
> support reading SimpleData. For that, you need to build GDAL against
> libkml to
> have the LIBKML driver : http://gdal.org/drv_libkml.html
>
> Even
>
> >
> > I'm trying to import a KML file that has a bunch of SimpleData fields
> > inside of ExtendedData into mysql.
> >
> > I've gotten the basic syntax down for importing the file, but I can't
> seem
> > to get the simpledata fileds to transfer over.
> >
> > Here's an example. I don't really need all the fields -- I'm only really
> > interested in storing the polygon and the GEOID10 field, but I can
> > manipulate the database to remove them later easily enough.
> >
> > <Placemark>
> > <styleUrl>#falseColor0</styleUrl>
> > <ExtendedData>
> > <SchemaData schemaUrl="#S_tl_2015_26_tabblock10_SSSSSSSS
> > SSSDDSS">
> > <SimpleData name="STATEFP10">13</SimpleData>
> > <SimpleData name="COUNTYFP10">131</SimpleData>
> > <SimpleData name="TRACTCE10">970100</SimpleData>
> > <SimpleData name="BLOCKCE10">1125</SimpleData>
> > <SimpleData name="GEOID10">131319701001125</Simp
> > leData>
> > <SimpleData name="NAME10">Block 1125</SimpleData
> >
> > <SimpleData name="MTFCC10">G5040</SimpleData>
> > <SimpleData name="UR10">R</SimpleData>
> > <SimpleData name="UACE10"></SimpleData>
> > <SimpleData name="UATYPE"></SimpleData>
> > <SimpleData name="FUNCSTAT10">S</SimpleData>
> > <SimpleData name="ALAND10">9.67522e+06</SimpleDa
> > ta>
> > <SimpleData name="AWATER10">4866</SimpleData>
> > <SimpleData name="INTPTLAT10">+46.7776681</Simpl
> > eData>
> > <SimpleData name="INTPTLON10">-088.9520440</Simp
> > leData>
> > </SchemaData>
> > </ExtendedData>
> > <Polygon>
> > <outerBoundaryIs>
> > <LinearRing>
> > <coordinates>
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160526/8aee4997/attachment.html>
More information about the gdal-dev
mailing list