[postgis-users] line from points (& feature manipulation/editing)

Wood Brent pcreso at pcreso.com
Tue Oct 5 01:53:53 PDT 2004


> > Summat I'm also interested in, improved feature editing & manipulation in
> > PostGIS, building lines from points, assembling polygons from lines,
> merging
> > polygons by removing shared borders, splitting polygons by inserting a new
> > line, etc....
> 
> Isn't "merging polygons" already implemented by GeomUnion ?

Yes :-)  I just checked the docs. I need to try it but I think you are right.

> 
> mmm. what do you mean by natively ?
> GEOS is a JTS port.

Ahh! I was unaware of that....

> Everything available in JTS can be made available in PostGIS.

Hmm... so far I haven't been able to remove a shared line segment in JUMP. The
"combine polygons" operation actually creates a multipolygon comprising the
two, it doesn't identify the outer perimeter of the specified polygons & remove
all interior lines to combine the polygons to form a new larger single polygon.

The GRASS v5.6 v.digit (which I have not tried yet) looks like it should be
able to do what I want, but I need to get GRASS talking to my PostGIS data
first, which I'm still working on... 

I'll play with GeomUnion some, it does look like it will do what I need.

What a great forum :-)



> > (unless I'm missing something...) 
> 
> Yes. You're missing that ORDER BY acts on the result set, which in this
> case is a single record.
> If you want to use it to order aggregate input you should do:
> 
> SELECT linefrompoint(
> 	(SELECT the_geom FROM <table> ORDER by <ordering_attr(s)>)
> );
> 
> Which is use a subselect to feed ordered values to the aggregate.

Of course. Obvious when someone points it out :-)

Is that not the (or at least an) answer to your question of how an order should
be specified for a linefrompoint function? 


Thanks,

  Brent Wood




More information about the postgis-users mailing list