Search

# Another Radian Test – Finding the distance between lines and areas

Following up on my previous post with ArcGIS and the Near Table, I created an SQL query in Manifold 8 to do both the near distances and group them by the number of points within specific distances (I grouped them every 50 km.).  The entire process took 47 seconds (or about 9 times faster than ArcGIS 10.1).

But, to keep things on the same playing field, I just computed the NEAR part of the query, and it ran in 40 seconds.  So, Manifold 8 was way faster than ArcGIS 10.1, but 3x slower than ArcGIS Pro.

I then wrote the following query in the Radian engine:

```SELECT count(*) AS CNT,
first(floor(GeomDistance([L Table].[Geom (I)],
[P Table].[Geom (I)], 1)/50000)*50000+50000) AS DistZone,
[UNIQUE_ID]
INTO bobo
FROM [P Table]
RIGHT JOIN [L Table]
ON GeomWithin([L Table].[Geom (I)],[P Table].[Geom (I)], 500000,1)
GROUP BY [UNIQUE_ID]

this query took 30 seconds (or about 20% faster than Manifold 8).

Once again, to level the playing field, I created a query to just run the NEAR aspect:

```SELECT GeomDistance([L Table].[Geom (I)], [P Table].[Geom (I)], 1) AS DistZone, [UNIQUE_ID]
INTO bobo2
FROM [P Table]
RIGHT JOIN [L Table] ON GeomWithin([L Table].[Geom (I)],[P Table].[Geom (I)], 500000,1)