[postgis-users] point to multipoint

Nathan Widmyer lighthousej at gmail.com
Thu Nov 26 07:32:49 PST 2009


ST_Collect worked for me.
I have a column of multipolygons.  I can take the ST_Centroid of each
multipolygon and it produces a multipoint.
Don't have the SQL at hand, but it's something close to:

UPDATE table SET geom_multip=(SELECT
ST_Collect(ST_Centroid(geom_multipoly)) FROM table2 WHERE
ST_IsValid(geom_multipoly)) WHERE id=X

Take that SQL as you need to use it.

Nate

On Wed, Nov 25, 2009 at 7:52 PM, Mehmet Sirin <m.sirin07 at googlemail.com> wrote:
> hi, is someone out there who can explain how to make several points to a
> multipoint.. i tried st_union and st_collect but what comes out is a
> multilinestring and geometrycollection(string(..)) respectively.
>
> code with which the unwilling multilinestring happens:
>
> select astext(st_union(c.geom_4326)) from (
>     select * from (select * from(
>         select *,buffer(geom_4326,0.01)as buff from gc_berechnet where
> name='Neuer Graben' and
>         gemeinde='Osnabrück')a)b, zip_coordinates zc
> where contains(buff,zc.geom) )c
>
>
> what i want to do:
> 1.buffering a pointt (A) with a radius of 1km
> 2.take a look which other points lie in this buffer polygon
> 3.find out which point inside the buffer is nearest to the first point (A) i
> buffered.
> important for 3. : when having a multipoint i can easily use st_distance to
> determine the closest point to point (A)
>
>
> you can tell me how to create multipoint ? then i love you^^
>
>
>
> leaving you kind regards
> mehmet sirin c.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>



More information about the postgis-users mailing list