Skip to content

Instantly share code, notes, and snippets.

@peteroupc
peteroupc / polygonwkt.java
Last active April 20, 2017 03:38
Generates polygon WKT from an array of latitude/longitude coordinates
/*
Any copyright to this file is released to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
If you like this, you should donate
to Peter O. at:
http://peteroupc.github.io/
*/
public static String polygonWkt(double[] latlon){
if(latlon.length%2 != 0)