Subscribe to this thread
Home - General / All posts - Move areas by a set offset along a variable heading
rwells4 post(s)
#14-Dec-16 10:44

I have data sourced from a tractor GPS console, recording planting operations. The data is a coverage map, comprised of a number of areas the width of the planter, and variable in length. The GPS antenna is offset in the direction of travel in relation to the planter. While the console allows an offset to be put in the offset is incorrect. This has resulted in stepping in the coverage map.

If someone knows a script that can use the heading and a known offset to move the areas accordingly that would be fantastic (my scripting is close to non-existent). I have previously tried to adapt a script taken from these forums that generates a new set of points shifted according to heading recorded on an existing set of data, however I failed to get the script to shift the areas.

As an example, in the attached file the polygons need to be moved 4 m in the direction of travel.

Thank you

Attachments:
Coverage map.map

ColinD

2,081 post(s)
#14-Dec-16 11:13

This can be done by determining how far in the x (easting) and y (northing) is needed to move that 4 m then using the Assign Projection dialog enter those values in the local offset fields. Not necessarily positive values.


Aussie Nature Shots

atomek

422 post(s)
#14-Dec-16 12:38

every area in the drawing has to be moved in a different direction so moving the whole drawing is not a solution

Dimitri


7,413 post(s)
#14-Dec-16 11:25

See also http://www.georeference.org/doc/manifold.htm#manually_georegister_an_image.htm

atomek

422 post(s)
#14-Dec-16 14:44

Instead of a script I used a drawing linked to a query than transforms the geom from your original drawing. The query is as below

OPTIONS COORDSYS("Coverage Drawing" AS COMPONENT);

select MoveVertically(MoveHorizontally([geom (I)],(4 * sin(Deg2Rad([heading])))),(4 * cos(Deg2Rad([heading])))) as [geom],

(4 * cos(Deg2Rad([heading]))) as [y]'sense check

(4 * sin(Deg2Rad([heading]))) as [x], 'sense check

[heading]

from [Coverage Drawing]

The displacement distance of 4 meters is hardcoded into this query. Working .map is attached.

Attachments:
Coverage map 2.map

tjhb
10,094 post(s)
#14-Dec-16 23:56

There are some anomalies, where the original area has the wrong [heading] attribute (taken from the wrong waypoint I think). This results in some areas being shifted off the tractor's path.

In the attached image, the darker areas are misdrawn.

(There is nothing wrong with atomek's query.)

Attachments:
Coverages.png

rwells4 post(s)
#15-Dec-16 00:20

Well spotted. The headings used were added from points that were also recorded during the operation, unfortunately the coverage areas didn't include heading automatically. The areas you saw had errant points contained within them that caused the heading to be off (probably from where the machine, and therefore the GPS antenna, was rocked from side to side due to rough ground).

Thanks for taking the time to look at the problem.

tjhb
10,094 post(s)
#15-Dec-16 00:42

If this needs fixing, I would take the approach of measuring the bearing of the original area (bounding box -> long sides and short sides -> bearing).

rwells4 post(s)
#15-Dec-16 00:15

Thank you atomek, that is a much more elegant way of getting there. I appreciate you taking time to assist me.

dale

630 post(s)
#15-Dec-16 10:11

We have the same issue with towed underwater video, and sonar data, where the sonar head is offset from the GPS. In other software we use to process and analyse video and sonar data, we enter layback in X, Y and Z from the GPS.

Is this an nice example for Radian GIS?

Dimitri


7,413 post(s)
#15-Dec-16 13:38

Is this an nice example for Radian GIS?

Sure is. Easy query to shift geoms.

But, (a minor quibble), Radian is a database tool and is not a GIS. :-)

Attachments:
rs.png

dale

630 post(s)
#15-Dec-16 20:29

In my casehaste = conflation it seems!

Function for Radian as per the Calling all Manifold users post

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