<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>First - <br>
</p>
<p>Thanks to Simon for an interesting angle on how to load gml data
into PostGIS. Using Postgres xml operators combined with the
Postgis ST_GeomFromGML() function is a new one for me :-)</p>
<p>However, the "standard" open source procedure for loading gml
files into PostGIS would be to use the OGR2OGR command-line tool
(and not psql) for this operation. More information on OGR2OGR :
<a class="moz-txt-link-freetext" href="https://gdal.org/programs/ogr2ogr.html">https://gdal.org/programs/ogr2ogr.html</a> and
<a class="moz-txt-link-freetext" href="https://www.gisinternals.com/">https://www.gisinternals.com/</a><br>
</p>
<p>More specific information on GML -> PostGIS using OGR2OGR:
<a class="moz-txt-link-freetext" href="https://gis.stackexchange.com/questions/302944/using-ogr2ogr-to-convert-multiple-gml-files-to-a-postgis-table">https://gis.stackexchange.com/questions/302944/using-ogr2ogr-to-convert-multiple-gml-files-to-a-postgis-table</a>.</p>
<p>And Shao, I would kindly like to second Barend Köbben's
suggestion, that you do some self study on the subjects of
database schemas and PostGIS technology. There is a ton of
information waiting for you just by using google search with the
relevant search words. If you prefer your information in a book
form, i can recommend "PostGIS in Action, 2. edition" for a primer
in PostGIS and spatial databases. Available from Amazon. This book
include information about both OGR2OGR and general SQL<br>
</p>
<pre class="moz-signature" cols="72">--
Med venlig hilsen / Kind regards
Bo Victor Thomsen
GIS- and Database specialist
AestasGIS Denmark
</pre>
<p><span
style="font-size:12.0pt;font-family:"Georgia",serif;mso-fareast-language:EN-US"
lang="EN-GB"></span></p>
<p><br>
</p>
<div class="moz-cite-prefix">Den 01-09-2019 kl. 09:13 skrev Simon
(SPDBA) Greener:<br>
</div>
<blockquote type="cite"
cite="mid:bb136289-15b2-4b92-a3e8-ec877d03ef18@spatialdbadvisor.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">Yes.<br>
<br>
</div>
<div dir="auto">One method is to copy the gml into a table (column
declared as text or xml). Then use XML XQUERY processing to
shred the GML document into nodes that ST_GeomFromGML() can
consume.<br>
<br>
</div>
<div dir="auto">Simon<br>
<br>
</div>
<div dir="auto"><!-- tmjah_g_1299s -->39 Cliff View Drive, Allens
Rivulet, Tas 7150<!-- tmjah_g_1299e --><br>
</div>
<div dir="auto"><!-- tmjah_g_1299s -->(H) 0362396397<!-- tmjah_g_1299e --><br>
</div>
<div dir="auto"><!-- tmjah_g_1299s -->(M) 0418396391<!-- tmjah_g_1299e --><br>
</div>
<div dir="auto"><a href="http://www.spatialdbadvisor.com"
moz-do-not-send="true"><!-- tmjah_g_1299s --></a><a
href="http://www.spatialdbadvisor.com" moz-do-not-send="true">www.spatialdbadvisor.com</a><!-- tmjah_g_1299e --><!-- tmjah_g_1299s -->
/
<!-- tmjah_g_1299e --><a href="http://www.spdba.com.au"
moz-do-not-send="true"><!-- tmjah_g_1299s --></a><a
href="http://www.spdba.com.au" moz-do-not-send="true">www.spdba.com.au</a><!-- tmjah_g_1299e --><br>
<br>
</div>
<div dir="auto"><!-- tmjah_g_1299s -->Sent from
<!-- tmjah_g_1299e --><a href="http://www.bluemail.me/r?b=15487"
moz-do-not-send="true"><!-- tmjah_g_1299s -->BlueMail<!-- tmjah_g_1299e --></a><!-- tmjah_g_1299s -->
<!-- tmjah_g_1299e --></div>
<div class="gmail_quote">On 1 Sep. 2019, at 16:57, Shaozhong SHI
<<a href="mailto:shishaozhong@gmail.com" target="_blank"
moz-do-not-send="true">shishaozhong@gmail.com</a>> wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi, all,
<div>Can psql copy gml into postgis?</div>
<div>Regards,</div>
<div>Shao</div>
<pre class="blue"><hr>
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>