SPLIT BY, SPLITVALUE, SPLITINDEX examples

5 views
Skip to first unread message

Keith

unread,
Mar 26, 2008, 10:49:37 AM3/26/08
to JEQL Users
M,

Are there any examples, showing how to use SPLIT BY, SPLITVALUE,
SPLITINDEX clauses?
I want split each polygon into its vertices's or coordinate pairs to
find the closest vertex in another polygon shapefile.

Keith

Martin Davis

unread,
Mar 26, 2008, 10:55:55 AM3/26/08
to jeql-...@googlegroups.com
Sigh...   I'm happy to see you charging ahead, but I have to admit that SPLIT BY is not yet implemented. It's next on my list to do - as you can see it should be very useful.

I'll try and think of a short-term workaround for this...

M

Martin Davis

unread,
Mar 26, 2008, 12:21:39 PM3/26/08
to jeql-...@googlegroups.com
Keith,

As usual, I'm curious - what is your use case for wanting to find closest vertices, rather than say the closest points?

A nice way to add this functionality would be to provide a closestVertices(geom, geom) function, written directly in Java.   Then you could just use this in a join query.

JTS has a closest points function, so that would be easy to add.  Doing closestVertices isn't too hard either.

These can easily be added as an extension (a jar file that you just add to your JEQL install, and then use an import statement to declare.)   I'll try and whip something up...

Keith

unread,
Mar 26, 2008, 1:36:45 PM3/26/08
to JEQL Users
Martin,

I'm not sure what the difference is between closest Points and closest
vertices. BTW, I've seen others issue an MBR or envelope overlap test
before the ClosestPoint function so ClosestPoint doesn't have to scan
the entire table. I want to warp or rubbersheet a shapefile to another
shapefile. The warping is performed in another program. I've already
written this link generation in Visual basic, I'm just trying to apply
geometry problems I'm familiar with to JEQL. The ClosestPoint function
sounds useful to me, but you may have more pressing matters to finish
first. I should probably stick to the geometry functions already built
and test those.

Keith

On Mar 26, 10:21 am, "Martin Davis" <mtncl...@gmail.com> wrote:
> Keith,
>
> As usual, I'm curious - what is your use case for wanting to find closest
> vertices, rather than say the closest points?
>
> A nice way to add this functionality would be to provide a
> closestVertices(geom, geom) function, written directly in Java. Then you
> could just use this in a join query.
>
> JTS has a closest points function, so that would be easy to add. Doing
> closestVertices isn't too hard either.
>
> These can easily be added as an extension (a jar file that you just add to
> your JEQL install, and then use an import statement to declare.) I'll try
> and whip something up...
>
> On Wed, Mar 26, 2008 at 7:55 AM, Martin Davis <mtncl...@gmail.com> wrote:
> > Sigh... I'm happy to see you charging ahead, but I have to admit that
> > SPLIT BY is not yet implemented. It's next on my list to do - as you can see
> > it should be very useful.
>
> > I'll try and think of a short-term workaround for this...
>
> > M
>

Martin Davis

unread,
Mar 26, 2008, 4:21:16 PM3/26/08
to jeql-...@googlegroups.com
closestPoint & closestVertices are names I just made up, so I guess they do need more explanation!

closestPoints would return the two closest points in two geometries - which may or may not be vertices (one always will be, but the other could be in the middle of an edge).  ClosestVertices would always return vertices.

For your warping case, I think you would want closestVertices.    As I said, pretty easy to implement as a Java extension to Jeql.  (It might be a nice function to have in JTS, too).   If you're keen let me know and I'll try and work on it.   Do you have any data samples that this could be applied to?

It's a good point about testing the BBox first.  This makes a bigger difference in systems which have a spatial indexing capability - which Jeql doesn't, yet (but I'm thinking about it).

Also, you probably want a distance tolerance, since you're probably only interested in points which are closer than a specified distance.  So maybe a closestVerticesWithinDistance function...

Great to hear you thinking about how to use Jeql to address various spatial tasks - that's exactly what I wanted to accomplish.  If you have any other ones which you're wondering about how to do, let me know.

M
Reply all
Reply to author
Forward
0 new messages