title: Render Geolocation coordinates into image using Java
body: <p>I need to print a polygon given a set of Longitude and Latitude coordinates. 
  I am starting with just two coordinate for initial testing. The problem is Java Image API works on pixel points and that Longitude and Latitude are big decimals. </p>
  
  <p>So even if I have this code:</p>
  
  <pre><code>BufferedImage bi = new BufferedImage(500, 500, BufferedImage.OPAQUE);
  Graphics2D ig2 = bi.createGraphics();
  
  double[] xArr = toDoubleArray(Arrays.asList(Double.valueOf("121.91359648077058"), Double.valueOf("121.92293884686991")));
  double[] yArr = toDoubleArray(Arrays.asList(Double.valueOf("11.995724479140792"), Double.valueOf("11.999118908426375")));
  
  Path2D path = new Path2D.Double();
  
  path.moveTo(xArr[0], yArr[0]);
  System.out.println("x[0]=" + xArr[0] + "," + "y[0]=" + yArr[0]);
  for(int i = 1; i &lt; xArr.length; ++i) {
      path.lineTo(xArr[i], yArr[i]);
      System.out.println("x[" + i + "]="  + xArr[i] + "," + "y[" + i + "]" + yArr[i]);
  }
  path.closePath();
  ig2.draw(path);
  ImageIO.write(bi, "PNG", new File("polygons.png"));
  </code></pre>
  
  <p>It will just be a single pixel, which is 121 and 11 inside the 500,500 buffer image. 
  What can be done to be able to render Geolocation coordinates into an image? I really don't need the lines just plot the points in the image is sufficient, hover the <code>Path2D</code> is the closest one I found since it supports <code>double</code> values.</p>