[mapserver-users] Extracting X,Y from MULTIPOINT data

Andy Colson andy at squeakycode.net
Mon Aug 10 06:51:58 PDT 2009


Suman Chatterjee wrote:
> Hi all,
> 
> I have some multipoint data in postgis that I got from street 
> intersections. But I am not able to extract the X,Y coordinates from the 
> MULTIPOINT data.
> 
> Is there any function in postgis by which I can extract the X,Y point 
> data from them?
> 
> Please help!
> 
>  
> 
> Thanks,
> 
> Suman
> 

Yes.  Are you looking for all points?  Just the first?  Some subset? 
How do you want to see it?

Did you try ST_AsText(col)?

There is also ST_NumPoints(geometry) and ST_PointN(geometry,integer) if 
you want to look at them individually.  An example of what youd like to 
see, or what you are trying to do might be helpful.

More functions here:

http://postgis.refractions.net/documentation/manual-1.3/ch06.html

-Andy



More information about the MapServer-users mailing list