Subscribe to this thread
Home - General / All posts - Spatial Overlay difficulties
ColinD

2,081 post(s)
#07-Aug-14 23:26

I am having trouble getting Spatial Overlay to produce a reliable result. In the attached sample data there is a vegetation map and survey tracks (areas) within some of the communities. Because the original project is confidential I have anonymised everything including the geographic location.

The task is to either transfer the community name from the vegmap to the transects within each community, or to transfer the sum of the areas from the transect drawing to each community. I have split the original transect drawing by the boundaries of the veg polygons, set precision at 0.1 for both drawings and run Normalize Topology on both. In either case I don't get all of the data across.

This is not the first time I have encountered this problem, is there an SQL solution to Spatial Overlay that would be reliable.

Many thanks for your thoughts

Attachments:
SpatialOverlayProblem.map


Aussie Nature Shots

jkelly


1,234 post(s)
#08-Aug-14 00:11

Sorry I don't have much time, but below is a query that will get the CommLocal from the vegmap, and match it to the ID from the transect.

This could be wrapped in an update statement so it updates automatically, but I didn't have time to fiddle with that.

I originally tried to use a contains join on the lines, but there must be some precision issues going on there, because not all lines were being selected, and this could be why the spatial overlay is not reliable. Because you have already split the lines with each vegmap, i used centroidInner, then did a contains query. THIS WILL NOT WORK IF THE TRANECTS ARE NOT SPLIT WITH THE VEGMAP AREAS. A query could be written to do all splitting and updating no worries to take out that extra step, but again, I had no time.

Hope this helps

select

[Vegmap] .[CommLocal], t1.Id

from [Transects] t1

INNER JOIN

[Vegmap] 

on contains([Vegmap].[Geom (I)], CentroidInner(t1.[Geom (I)]))


James Kelly

http://www.locationsolve.com

ColinD

2,081 post(s)
#08-Aug-14 01:01

Thanks James, I replaced t1.Id with t1.[Area (I)] and it did the trick (transects are in fact 4m wide areas).

If anyone has the time, it would be useful to know why Spatial Overlay isn't behaving as it should.


Aussie Nature Shots

Graeme

990 post(s)
#08-Aug-14 02:07

I think it may be related to the precision setting of the Map component - this is a player in your scenario. Yours has a default precision of 0.000001, your drawings 0.05. Running SO as-is gives a partial result, but if you change the Map precision to match the drawings, SO gives a full result.

ColinD

2,081 post(s)
#08-Aug-14 02:52

Well that one had escaped me Graeme, thanks.


Aussie Nature Shots

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.