[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] PostGIS functions inside triggers
From:       Eduin Yezid Carrillo Vega <yecarrillo () gmail ! com>
Date:       2009-02-19 17:01:23
Message-ID: 75b8f7010902190901gde56585h865a25c31ef1bb92 () mail ! gmail ! com
[Download RAW message or body]

Thanks Ralf. Both tables have primary keys and GeomFromText definition
is fine now. Still getting empty values.

Eduin Yesid Carrillo Vega
Bogotá D.C., Colombia



On Mon, Feb 16, 2009 at 1:40 PM, Ralf Suhr <gisbox@web.de> wrote:
> Mhm my fault.
>
> Change one line in the function.
>
> NEW.the_geom := ST_GeomFromText('POINT(' || new.lat || ' ' ||  new.lon ||
> ')',4326);
>
> And one line in the definition of the table two.
>
>>CREATE TABLE table2
>>(
>>       gid serial NOT NULL,
>>       table2_id character varying,
>>       the_geom geometry,
>        CONSTRAINT table2_pkey PRIMARY KEY (table2_id),
>>       CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
>>       CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) =
>>'MULTIPOLYGON'::text OR the_geom IS NULL),
>>       CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 4326)
>> )
>>WITH (OIDS=FALSE);
>
> thats all.
>
> Ralf
>
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic