title: How do I create a circle with latitude, longitude and radius with GeoTools?
body: <p>Right now I have:</p>
  
  <pre><code>Polygon circle = geometryBuilder.circle(
  myLong,
  myLat, 
  radiusInMeters, 10);
  </code></pre>
  
  <p>And it creates (with lat=28.456306, long=-16.292034 and radius=500) a nonsense polygon with huge latitudes and longitudes, such as:</p>
  
  <pre><code>POLYGON ((483.678055 28.482505000000003, 388.1865521874737 -265.4101211462366, 138.1865521874737 -447.04575314757676, -170.8304421874737 -447.0457531475768, -420.8304421874737 -265.41012114623663, -516.321945 28.482504999999943, -420.83044218747375 322.3751311462365, -170.8304421874738 504.01076314757677, 138.18655218747358 504.0107631475768, 388.18655218747364 322.3751311462367, 483.678055 28.482505000000003))
  </code></pre>
  
  <p>I expected to have ten pairs of coordinates with lat's and long's nearby the center point I supplied.</p>
  
  <p>Any help would be more than helpful. Thanks in advance!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>In addition to @iant 's answer, I had to create a <code>Point</code> as a <code>Feature</code> </p>
  
  <pre><code>//build the type
  SimpleFeatureType TYPE = null;
  try {
      TYPE = DataUtilities.createType("", "Location", "locations:Point:srid=4326," + "id:Integer" // a
              // number
              // attribute
              );
  } catch (Exception e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
  }
  
  SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);
  GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
  com.vividsolutions.jts.geom.Point point = geometryFactory.createPoint(
          new Coordinate(
                  currentDevicePosition.getLongitude(), 
                  currentDevicePosition.getLatitude()
                  )
          );
  featureBuilder.add(point);
  SimpleFeature feature = featureBuilder.buildFeature( "fid.1" ); // build the 1st feature
  </code></pre>
  
  <p>as explained in iant's Gist here: <a href="https://gitlab.com/snippets/17558" rel="noreferrer">https://gitlab.com/snippets/17558</a> and here: <a href="http://docs.geotools.org/" rel="noreferrer">http://docs.geotools.org/</a>, oh, and also I was missing a dependency as explained here <a href="https://stackoverflow.com/questions/19356113/schemaexception-in-java">SchemaException in java</a></p>