If I use
ogr2ogr -f LIBKML m32540000.parcel.kml ../../3254.kml -ct \
'+proj=affine +xoff=-.00005 +yoff=-0.00004' \
-nln land -clipdst mChopper.kml -clipdstlayer mChopper \
-clipdstwhere "Name = 'CHOPPER_32540000'" \
-sql 'SELECT Name FROM "3254"'
I get this KML,
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Document id="land">
<name>land</name>
<Placemark id="land.1">
<name>3254-0 地號</name>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>
120.866241,24.1815623333333,0...
How can I change that second
<name>3254-0 地號</name>
field to
<name>Something else</name>
without resorting to sed, awk, perl, etc.?
I only want this one line to change.
No I don't want to trigger SimpleData,
swelling my file.
I am hoping all I need to do is adjust the
-sql 'SELECT Name FROM "3254"'
line. I changed the first <name>
field via -nln
,
now how about the second?
Note my output consists of only one "SQL row",
so it would be fine if I changed "all the rows" to the same value.
Alas,
-sql 'SELECT 22 AS Name FROM "3254"'
Just removes the <name>
tag and creates SimpleData.