mentby.com
Blog | Jobs | Help | Signup | Login

loading

from EWKB to WKB

Thu, 25 Apr 2013 03:53:29 -0700 Post Comments

predicate of direction is possible?

Sat, 19 Jan 2013 21:08:30 -0800 Post Comments

I have an add-on function[1] to return N, NW, W, SW, S, SE, E, or NE
from an azimuth direction. E.g.:

SELECT ST_Cardinal_Direction(ST_Azimuth(A.geom, B.geom))
FROM A, B
WHERE ...

The function can be changed to instead return 'east', 'west', 'south',
or however you want to define.

-Mike

[1]  http://trac.osgeo.org/postgis/wiki/UsersWikiCardinalDirection

Difficult Problem with Polygons

Mon, 29 Oct 2012 02:16:19 -0700 Post Comments

Sounds like you have a finite element mesh with nodes and elements.
You can use ST_Relate with pattern 'FF2F11212' to pick out elements
that share the same edge. This DE-9-IM is sort-of a custom ST_Touches,
but only takes linear boundary overlaps. So if you have a table
"elements", and you want to find ones that touch ID 567:

SELECT elements.*
FROM elements, elements as e
WHERE e.id = 567 AND
    ST_Relate(elements.geom, e.geom, 'FF2F11212');

I'm not certain about your second question.

-Mike
Profile Widget
Copy and paste this HTML code to your blog or website: