[postgis-users] simple spatial sql question
Andreas Laggner
andreas.laggner at fal.de
Thu Aug 23 07:19:33 PDT 2007
Hi Sean,
I am a newbie to but perhaps i can help you.....i do not use "AS" in the
end oh the create table but an ";" to set the end of the statement.
I copy a intersection-statement from my collection that worked....
create table intersect_gf3(gid integer) with oids;
select
addgeometrycolumn('','intersect_gf3','the_geom','31467','MULTIPOLYGON',2);
/(alter table intersect_gf3 drop constraint enforce_geotype_the_geom;)
THIS LINE IS ONLY NEEDED IF YOUR CONSTRAINT MAKES TROUBLE/
insert into intersect_gf3
select t1.gid,intersection(t1.the_geom, t2.the_geom)
from gf_veg1 t1, gf_clc t2
where t1.the_geom && t2.the_geom;
Sean Grimland schrieb:
> I am a newbie to sql and am having a problem with this
> query. The explain query tool in pgAdmin says that
> there is a syntax error near the SELECT but I can't
> figure out what the error is. Any help is greatly
> appreciated.
>
> CREATE TABLE hydro.bra_hydro as
> SELECT intersectsion(r.the_geom, m.the_geom) AS
> intersection_geom,
> r.*
> FROM hydro.watrcrsl AS r, cadastre.countries_2004 AS m
> WHERE r.the_geom && m.the_geom
> AND intersects(r.the_geom, m.the_geom)
> AND m.iso_3digit = 'BRA';
>
>
> Sean
>
>
>
> ____________________________________________________________________________________Ready for the edge of your seat?
> Check out tonight's top picks on Yahoo! TV.
> http://tv.yahoo.com/
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
--
Dipl. Geoökologe Andreas Laggner
Institut für Ländliche Räume (LR)
Bundesforschungsanstalt für Landwirtschaft (FAL)
Institute of Rural Studies
Federal Agricultural Research Centre (FAL)
Bundesallee 50
D-38116 Braunschweig
Tel.: (+49) (0)531 596 5515
Fax: (+49) (0)531 596 5599
E-mail: andreas.laggner at fal.de
Homepage: http://www.lr.fal.de/
More information about the postgis-users
mailing list