Minimum distance of GeoPoints in PolygonTarget

55 views
Skip to first unread message

Juno Internet KaufDA

unread,
Nov 3, 2010, 12:44:23 PM11/3/10
to adwor...@googlegroups.com
Hi everyone,

my question is related to the CampaingTargetService. I want to add several PolygonTargets to our campaigns, a few work fine, but most of these polygons just throw "POLYGON_DUPLICATE_VERTICES"-error. On generating the mutate-request, each polygon is checked for duplicate vertices, so they are really unique (i triple checked by hand). A similar error occurs while using the adwords-webinterface and using copy&paste to add the vertices. Each vertices shows up on the map, but the polygon cant be saved because the webinterface found double vertices. I can reproduce this error just by clicking a triangle of 3 very narrow points together, so i'm guessing this error is related to distance or internal rounding, but I couldn't find any minimum distance in the documentation and I don't know why 6 decimal places are used in the webinterface, if only 3 or 4 saved. I hope someone could help me with this problem.


Best regards,

Jan

AdWords API Advisor

unread,
Nov 4, 2010, 3:38:24 PM11/4/10
to AdWords API Forum
Hi Jan,

I dug into this problem a bit, and it looks like the cause is how
equality is determined for GeoPoints. The latitude and longitude is
first converted to an hours, minutes, and seconds value, and then
compared. This format isn't as accurate as the micro degrees, which
is why you are getting an error for values that are very close
together. Each second equals about 277 micro degrees, so values that
are closer than 277 micro degrees apart may be treated as equal.

This behavior isn't ideal, and I'll work with the core engineering
team to address it. In the near term though you should check to
ensure that no two values are closer than 277 micro degrees apart.

Best,
- Eric Koleda, AdWords API Team

On Nov 3, 12:44 pm, Juno Internet KaufDA <mcc.kau...@googlemail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages