A setback is defined as how far away from a property line an object is placed. For example, some municipalities may require a garage to be at least 10 feet away from a property line. Setbacks are usually defined by local building or zoning departments. For generators, these definitions can vary widely depending on a variety of factors. Some of these include if the unit is for residential or commercial use, the zoning of the land, and the size of the lot. Before you begin work, talk to your local building department to find out what the specific requirements are for your area.
As part of the process, you have to submit an application for placement. For the city of Lake Oswego in Oregon, this involves submitting a plan of your land, with the generator drawn on the plan. (See reference 1) You must indicate on the plan the exact distance to all property lines, and the distance from buildings. After submission, a plans examiner will review your application and, if any deficiencies are found, you must correct them. After approval a permit for construction will be issued. This is typical of most municipalities. A plans reviewer or a building inspector must approve of the plan before a permit is issued.
Another consideration is easement restrictions. An easement is a right of way another party has to your land. Utility easements are fairly common. A utility company has the right to enter your property to inspect or repair their equipment, even if you hang a "No Trespassing" sign. As part of the permitting process, the inspector will run a search to determine if the placement will interfere with easements. For example, a gas pipeline may be buried on your land. You may not be able to place the generator directly over the pipeline, in case the utility company has to dig it up.
If the proposed location is not approved, you may be able to file a variance appeal. If you do, the zoning board will look at all the criteria, and issue a final ruling. Filing an appeal is not a guarantee that you will win. For example in the city of West Palm Beach in Florida, a homeowner filed an appeal. The generator was encroaching 1.75 feet past the setback line. After review, the zoning board denied the appeal. (See reference 2)