TownyAdvanced / MapTowny

A Towny add-on Bukkit plugin that enables towns to show up on a web-map.
MIT License
15 stars 17 forks source link

Fix unfair display of territories in private. #22

Closed 79372275372 closed 2 years ago

79372275372 commented 2 years ago

When a player claims territory on the perimeter and does not claim it inside - the territory is displayed on the map as if it fully belongs to him. Example - https://imgur.com/a/IXpzQIV

silverwolfg11 commented 2 years ago

I think you meant to file this as a bug, so I fixed the label for you.

Can you please also provide the following information:

I also want to note that if you're using either Dynmap or BlueMap, this is an issue that cannot be fixed because those platforms do not support the concept of negative space (having holes within the claim).

PolitcubesDeveloper commented 2 years ago

The concept of holes for map plugins like Dynmap or BlueMap could be implemented in your plugin. This problem can be solved, you already know how to identify holes in a polygon, it remains to cut it into simple polygons, by triangulating or splitting it, for example, into Thiessen Polygons and draw without a contour. The contour can be drawn separately, drawing a line around each hole and the outer contour, which is just as easily determined, for example, without resorting to finding a new solution by union the holes and input polygons (S1+S2+input = outer line S3) The best method is the FME::DonutBridgeBuilder algorithm, which draws a polygon with holes in one stroke, however, there is not a single detailed explanation of how it works. This problem and related ones are solved by geographic information systems such as Qgis, you could also explore approaches to the solution from this position

image

79372275372 commented 2 years ago

I use:

  • 2.0.0-BETA-2
  • dynmap v3.4-beta-3
  • towny 0.97.2.0
  • 1.16.5
silverwolfg11 commented 2 years ago

@PolitcubesDeveloper Thank you for the suggestions. I'll be sure to take a look into those algorithms and see if I can get them to work on Dynmap/BlueMap for this use case.

However, I'll create this as a separate issue as an enhancement since this current issue is not a bug, but that of a non-existing feature.

Currently, the plugin does not support holes in polygons for BlueMap/Dynmap, so this issue will be closed.