<div dir="ltr"><div>You can also cnahge the type of the column of the table afterward to be more precise than geometry(0).<br></div><div>(see ALTER TABLE ...)<br><br></div>Cheers,<br>Rémi-C<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-05-07 16:11 GMT+02:00 Nicolas Ribot <span dir="ltr"><<a href="mailto:nicolas.ribot@gmail.com" target="_blank">nicolas.ribot@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,<div><br></div><div>You could also cast the call to st_makeline into a specific geometry type, with some SRID (or 0 if data has no SRID) :</div><div><br></div><div>... <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">ST_MakeLine(seeds.geom)::geometry(Linestring, <srid>)</span></div>
<span class="HOEnZb"><font color="#888888">
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Nicolas</span></div><div><br></div><div><br></div>
</font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 7 May 2014 15:56, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Linestrings are geometry objects. If you want your table to have tighter constraints on it create the table first and use addgeometrycolumn() to set the geometry type and constraints then use<br>
<br>
insert into "l_506" (oid, geom) from SELECT ...<br>
<br>
CREATE TABLE AS does not know what the query will return as far as geometry types so it make a general "geometry" column.<br>
<br>
-Steve<div><div><br>
<br>
On 5/7/2014 9:38 AM, Pier Lorenzo Marasco wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi all,<br>
<br>
I'm trying to make something very easy but I've a problem with results.<br>
I've two tables and I need to make lines from the joins of these two.<br>
I've try with this :<br>
<br>
CREATE TABLE "l_506" AS<br>
SELECT elements.oid, ST_MakeLine(seeds.geom) AS geom<br>
FROM elements<br>
JOIN seeds ON (elements.oid=seeds.oid)<br>
WHERE elements.code='0506'<br>
GROUP BY elements.oid;<br>
<br>
All the elements in seeds are linestring but what I achieve is a<br>
geometry table. Ok.. I should alter the column type and everything goes<br>
as I aspect but I would like to understand where I'm getting wrong.<br>
<br>
L.<br>
<br>
--<br>
Pier Lorenzo Marasco<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-<u></u>bin/mailman/listinfo/postgis-<u></u>users</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>