[postgis-users] Geometry vs Linestring

Pier Lorenzo Marasco pl.marasco at gmail.com
Wed May 7 07:06:22 PDT 2014


Thank You for your reply ! I really appreciate it !
But why on some computer it make a "linestring" column and in other not?
I've tested in 3 different computer and one of this return directly
"linestring"... this is really a mystery for me...

L.



2014-05-07 15:56 GMT+02:00 Stephen Woodbridge <woodbri at swoodbridge.com>:

> 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
>
> insert into "l_506" (oid, geom) from SELECT ...
>
> CREATE TABLE AS does not know what the query will return as far as
> geometry types so it make a general "geometry" column.
>
> -Steve
>
>
> On 5/7/2014 9:38 AM, Pier Lorenzo Marasco wrote:
>
>> Hi all,
>>
>> I'm trying to make something very easy but I've a problem with results.
>> I've two tables and I need to make lines from the joins of these two.
>> I've try with this :
>>
>> CREATE TABLE "l_506" AS
>> SELECT elements.oid, ST_MakeLine(seeds.geom) AS geom
>> FROM elements
>>     JOIN seeds ON (elements.oid=seeds.oid)
>> WHERE elements.code='0506'
>> GROUP BY elements.oid;
>>
>> All the elements in seeds are linestring but what I achieve is a
>> geometry table. Ok.. I should alter the column type and everything goes
>> as I aspect but I would like to understand where I'm getting wrong.
>>
>> L.
>>
>> --
>> Pier Lorenzo Marasco
>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
Pier Lorenzo Marasco
Via D.Moreni,2
50135 Firenze

cell/mobile   +39 329 35 37527
Casa/home  +39 055 011 71 20
skype pl.marasco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140507/ef9975c3/attachment.html>


More information about the postgis-users mailing list