geoJSON to WorldGuard region converter

Status
This thread has been locked.

Steffbeard

Feedback score
0
Posts
10
Reactions
0
Resources
0
I am looking to have a plugin commissioned that converts geoJSON (or .KML files) into data sets that can be converted to WorldGuard regions using the WorldGuard API.

There's a catch tho: I need to run the coordinates in the geoJSON file through an equation that scales them down since the map I am using for this project is on a 1:200 scale and it uses this equation to convert IRL lat/long into in-game x and z coords:

f(x) = (x / 360.0) * (40075000/200)

x being the coordinate (works for both lat and long)

then it must go into the WorldGuard API for creating Regions

Code:
List<BlockVector2> points = Lists.newArrayList();
points.add(BlockVector2.at(point, point1));
points.add(BlockVector2.at(point2, point3));
points.add(BlockVector2.at(point4, point5));
int minY = 0;
int maxY = 54;
ProtectedRegion region = new ProtectedPolygonalRegion("(name of region goes here)", points, minY, maxY);

I'd prefer if there is a way to pull the .kmz files directly from GADM database and then convert it to .kml or .geojson and then run the plugin but if I have to manually put the .geojson in a folder that's fine too as long as it can parse them and spit out WorldGuard regions like I want it to.

My discord is open for any estimates and quotes, I want to shop around first and I would probably just make the plugin myself but I am busy with a lot of other plugins that need to be finished for this server.

Add me to discuss this: zune#9223

Thank you all in advance
 
Status
This thread has been locked.
Top