[postgis-users] Decomposing geometries

Josh Livni josh at umbrellaconsulting.com
Sun Dec 16 09:35:20 PST 2007


Assuming you have a postgis database, a table called 'lines' and a table 
called 'polys', and in each there is a field called 'id' and a field 
called 'the_geom' which holds the geometry, then you could try:
  'SELECT id, AsText(the_geom) from lines' - which would give you two 
columns back, one of which could be parsed to get just the coordinates 
for the line. 
If this isn't want you're looking for, can you be more specific about 
your database schema, and other details that might help (eg if the 
AsText function doesn't fit your requirement for something you can use 
as a 'list of lines')?

  -Josh

M Lubratt wrote:
> Hello!
>
> I have a simple mapping program for my own use.  I have a database 
> with multipolygons and linestrings in it.  I would like to be able to 
> query all these geometries and just get a list of lines that I can 
> plot on the screen.
>
> Could anyone point me in the right direction?  I've tried Google and 
> the documentation; but, I haven't found what I'm looking for.
>
> Thanks!
> Mark
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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