[postgis-users] multipoint2point

nicklas.aven at jordogskog.no nicklas.aven at jordogskog.no
Tue Sep 15 01:07:27 PDT 2009


You can use st_dump for that pupose. Then you will get one row per point in your multipoint. select (st_dump(the_multipoint)).geom from thetable /Nicklas

2009-09-15 wrote:

thank you very much ST_MULTI works fine and solves my problem, is there a 
>function to cast a MULTIPOINT to POINT?
>
>
>----- Original Message ----- 
>From: "Richard Greenwood"
>To: "PostGIS Users Discussion"
>Sent: Tuesday, September 15, 2009 5:25 AM
>Subject: Re: [postgis-users] multipoint2point
>
>
>> You could use st_multi() to cast them al to multi point:
>> ST_Multi(geometry)
>>
>> Returns the geometry as a MULTI* geometry. If the geometry is
>> already a MULTI*, it is returned unchanged.
>>
>> SELECT ST_MULTI(wkb_geometry) FROM table;
>>
>>
>> On Mon, Sep 14, 2009 at 6:22 AM,wrote:
>>> Hi,
>>> I have a postgistable with different geometrytyps in one table: points 
>>> and
>>> multipoints (get this information via ST_GeometryType).
>>> UMN Mapserver have no problems to show the geometrys, but if I try to 
>>> export
>>> this table via ogr2ogr there is an error:
>>> Attempt to write non-poin(MULTIPOINT) to point shapefile.
>>> How can I cast all my geometrys to point?
>>> Jo
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>
>>
>>
>> -- 
>> Richard Greenwood
>> richard.greenwood at gmail.com
>> www.greenwoodmap.com
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> 
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090915/097326a9/attachment.html>


More information about the postgis-users mailing list