code: public Geometry simplifyGeometryAtResolution(Geometry geometry, double resolution) throws Exception {
  		double inverseRes = 1/resolution;
  		double p = Math.log10(inverseRes);
  		double exp = Math.ceil( p );
  		if( exp < 0 ) exp = 0;
  		double factor = Math.pow(10,exp);
  
  		Geometry simplifiedGeometry = simplify(geometry, resolution, factor);
  		
  		return simplifiedGeometry;
  	}
docs: Accepts a geometry and a resolution. Returns a version of the geometry
  which is simplified for the given resolution. If the initial geometry
  is already simplified enough, then return null.
  @param geometry Geometry to simplify
  @param resolution Resolution at which the geometry should be simplified
  @return The simplified geometry. Null, if no simplification is possible.
  @throws Exception